kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.89k stars 233 forks source link

secondary labels not showing #991

Closed squirtbrnr closed 11 months ago

squirtbrnr commented 12 months ago

My graph will only show the lower and upper bound labels. It does not show the secondary bound labels. image

      - type: custom:mini-graph-card
        entities:
          - entity: sensor.dsgv
        hours_to_show: 6
        points_per_hour: 12
        show:
          fill: false
          points: true
          labels: true
          labels_secondary: true
        animate: true
        height: 300
        color_thresholds:
          - value: 40
            color: "#FF0000"
          - value: 65
            color: "#C0C0C0"
          - value: 250
            color: "FFFF00"
        color_thresholds_transition: hard
        lower_bound: 40
        upper_bound: 300
        lower_bound_secondary: 65
        upper_bound_secondary: 250
ildar170975 commented 12 months ago

There is only ONE graph - what secondary labels do you expect?

squirtbrnr commented 12 months ago

Sorry, I thought secondary labels meant a second range overlayed on the entire graph, not necessarily two separate graphs with two separate ranges. Is there a way to do that? Have multiple labels on the Y axis?

ildar170975 commented 12 months ago

Secondary Y-axis is related to some set of data associated to this axis. You cannot define two different axis for one set of data - neither in this graph nor in mathematics. If you need a secondary Y-axis for just ONE graph - your only way is adding a second graph associated with secondary Y-axis and make it invisible. Check docs how to hide a line.

ildar170975 commented 12 months ago

Please close the issue if it is resolved.