Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make gradient color for metric puted as bar in mixed chart in Superset 4.0.0. #29564

Closed
do-you-zorya opened this issue Jul 11, 2024 · 2 comments

Comments

@do-you-zorya
Copy link

How to make bars colors in mixed chart to gradient?
My best shot is add color for my metric "test" in JSON metadata:

"label_colors": {"plan": "#6C8CD5", "test": "#E98F11"},

Copy link

dosubot bot commented Jul 11, 2024

To create gradient colors for bars in a mixed chart in Superset 4.0.0 for the metric "test" instead of using a solid color, you can use one of the predefined color schemes that include gradient colors. For example, you can use the "echarts_gradient" scheme. Here is how you can specify it in the JSON metadata:

{
  "color_scheme": "echarts_gradient",
  "metrics": [
    {
      "metric_name": "test",
      "color": "echarts_gradient"
    }
  ]
}

This will apply the "echarts_gradient" color scheme to the bars for the metric "test". The "echarts_gradient" scheme includes the colors ['#f6EFA6', '#D88273', '#BF444C'], which will create a gradient effect [1].

To continue talking to Dosu, mention @dosu.

@rusackas
Copy link
Member

Unfortunately, this isn't currently supported. You can open an ideas thread in Github Discussions or open a PR/SIP to add support, but I'll close this for now as an Issue since it's not a bug.

@rusackas rusackas closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants