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

Fillgradient in scatter graphs #393

Open
wrowlands3 opened this issue Mar 14, 2024 · 1 comment
Open

Fillgradient in scatter graphs #393

wrowlands3 opened this issue Mar 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@wrowlands3
Copy link

Describe the solution you'd like
Scatter fillgradient defaults to fillcolor when used in home assistant, could support for this be added in a future release or am I missing something? It would be great to use colorscale in the fillgradient.

How would it be defined in yaml?

type: custom:plotly-graph
entities:
  - entity: ''
    y: 1
    x: $ex [new Date(Date.now()).setHours(-24), new Date(Date.now()).setHours(-23), new Date(Date.now()).setHours(24)]
    fill: tozeroy
    fillgradient:
      colorscale:
        - 0, red
        - 1, blue
      start: 0
      stop: 1
      type: vertical
hours_to_show: 24

Scribble
Currently looks like this,
current
Should like more like this
should

Additional context
https://plotly.com/python/reference/scatter/#scatter-fillgradient
Colorscales detailed here: https://plotly.com/python/colorscales/

@wrowlands3 wrowlands3 added the enhancement New feature or request label Mar 14, 2024
@dbuezas
Copy link
Owner

dbuezas commented Mar 14, 2024

I didn't know about fill gradients.
I suggest you try using this in plain plotlyjs, I don't think this card changes anything about it.
You can start with this codepen: https://codepen.io/chris3edwards3/pen/BaNxxwY and test it in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants