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

Feature: rangeArea compatibility #510

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Buddy-Matt
Copy link

I've added in some functionality to allow plotting of the new "areaRange" chart type (https://apexcharts.com/angular-chart-demos/range-area-charts/combo/)

There are a few niggles - such as the pop-up values not quite working properly (it appears they've changed how this works specifically for rangeArea charts) - but it works well enough for my needs, so thought I'd share it back with you for further development.

There's also a new bit of code to allow specific legend items to be hidden - mainly because this was easier to implement than plotting the mean & range from a single series.

Example of the chart in action - replicating the Home Assistant statistics history card look & feel (which is basically the functionality I want):

image

and the YAML to get this going:

type: custom:apexcharts-card
entities:
  - entity: sensor.smart_meter_electricity_power
    name: Grid Power (range)
    color: rgb(255,0,0)
    stroke_width: 0
    opacity: 0.3
    type: rangeArea
    statistics:
      type: range
      period: 5minute
    show:
      legend: false
  - entity: sensor.smart_meter_electricity_power
    name: Grid Power
    color: rgb(255,0,0)
    stroke_width: 1
    type: line
    statistics:
      type: mean
      period: 5minute

@GustavSVJ
Copy link

Is there anything I can do to help get this closed?

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

Successfully merging this pull request may close these issues.

None yet

2 participants