Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

fix: dual line chart color consistency for secondary y axis #18

Merged
merged 1 commit into from
Mar 14, 2019

Conversation

kristw
Copy link
Collaborator

@kristw kristw commented Mar 13, 2019

🐛 Bug Fix

  • Address Airbnb's PRODUCT-67932

It appears that if a metric appears in the "metric_2" parameter of a dual-axis chart, it will not have the same color as a metric of the same name which is set in the "metric" parameter of a different chart, and visa versa. Practically, this means that the same metric will be colored inconsistently in a dashboard.

Solution

This was due to nvd3 appending ' (right axis)' to category name before passing to color function.

Before

image

After

image

cc: @michellethomas @graceguo-supercat

@kristw kristw requested a review from a team as a code owner March 13, 2019 23:56
@kristw kristw added #bug Something isn't working reviewable labels Mar 14, 2019
@michellethomas
Copy link
Contributor

Looks like you may need to get someone on apache-superset/embeddable-charts-team to approve.

@kristw kristw added this to the v0.10.1 milestone Mar 14, 2019
@kristw kristw merged commit 1ef0d68 into master Mar 14, 2019
@delete-merged-branch delete-merged-branch bot deleted the kristw--dual-line branch March 14, 2019 23:35
nytai referenced this pull request in preset-io/superset-ui-plugins Apr 27, 2020
nytai referenced this pull request in preset-io/superset-ui-plugins Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
#bug Something isn't working reviewable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants