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

Add a configuration to set the "origin" or "middle" for area graphs #882

Open
3 tasks done
Paradox52525 opened this issue Mar 11, 2025 · 0 comments
Open
3 tasks done
Labels
feature-request New feature or request

Comments

@Paradox52525
Copy link

Checklist

  • I am running the latest version of the card
  • I checked if there isn't another feature request opened with the same request
  • I checked that the feature is not already available in the dev branch

Is your feature request related to a problem? Please describe.
Area line graphs currently always fill the area between the line/value and zero - positive values on the graph will fill "below" the line and negative values will fill "above" the line, both stopping when they reach zero on the y axis. There does not appear to be a way to configure this to make the "center" of an area graph something other than zero.

I would like to make a simple temperature over time area graph that displays temperatures above freezing as "positive" and temperatures below freezing as "negative". I use Fahrenheit temperatures though, so freezing is 32 degrees, not zero. I would like to be able to configure 32 as the "center point" for an area graph instead of zero. Fahrenheit temperatures above freezing would display as "positive" and fill the space below the line until reaching 32 on the y-axis. Fahrenheit temperatures below freezing would display as "negative" and fill above the line until reaching 32 on the y-axis.

Describe the solution you'd like
Add an optional setting to tell area graphs which value on the y-axis to use as the "origin" or "center". Data points above that value would be treated as "positive" and would fill below the line. Data points below that value would be treated as "negative" and fill above the line.

Mockup:
Image

Describe alternatives you've considered
Discussed here: https://community.home-assistant.io/t/apexcharts-card-a-highly-customizable-graph-card/272877/4295?page=44

It is possible to visually get the graph to center on a value other than zero using formatter and transform settings, but this causes other issues (like the mouseover sensor values on the graph are no longer correct).

Additional context
Add any other context or screenshots about the feature request here.

@Paradox52525 Paradox52525 added the feature-request New feature or request label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant