Any way to hide the legend in a history graph chart?

Is there any way to get rid of the legend in the bottom chart and have the bar go over the whole width of the card to correlate better with the other graph?

The documentation doesn’t list anything useful but I hope there’s some workaround.

Set “show_names: false”.

1 Like

Ah, I tried

Show:

  • Names: false

Because I saw that in another card but it didn’t work Thanks. The bar still isn’t using the full width, tho. But I guess that’s not possible with this card?

Show a screenshot.

Ildar’s advice DOES work!

type: history-graph
entities:
  - entity: sensor.back_yard_battery_state
show_names: false

Your screenshot shows it’s not going the whole width. See the graph in my initial screenshot. Thats the whole width. From the left border to the right border.

Post your card code that includes the code for the top graph. Your OP is not very clear to assist with your desired results. Too many variables…

  • Is the other graph a History Graph?
  • It is possible with card_mod…

It’s possible, but not something I’d recommend. After looking at the card’s structure, the bar and the lower text are conjoined. I’d look for another solution.

You definitely added a few cards into a stack (probably a custom stack-in-card).
The 1st card does not have paddings, the 2nd does.
Seems that the 1st card is mini-graph-card which has an option to remove own paddings.

You’re right, should have provided more details. Here’s the code to the graph, it’s a mini graph card:

type: custom:mini-graph-card
entities:
  - entity: sensor.filter_wz_pm25
    aggregate_func: max
    name: Max
  - entity: sensor.filter_wz_pm25
    aggregate_func: median
    name: Median
  - entity: sensor.filter_wz_pm25
    aggregate_func: min
    name: Min
name: Luftqualität
hours_to_show: 72
points_per_hour: 6
icon: mdi:virus
show:
  labels: true
  legend: false
  state: false
line_width: 2
lower_bound: 0
font_size: 60
color_thresholds:
  - value: 0
    color: "#44A047"
  - value: 1
    color: "#69AB3A"
  - value: 2
    color: "#8EB62E"
  - value: 3
    color: "#B3C121"
  - value: 4
    color: "#D8CC15"
  - value: 5
    color: "#FED709"
  - value: 6
    color: "#FEC507"
  - value: 7
    color: "#FEB305"
  - value: 8
    color: "#FEA104"
  - value: 9
    color: "#FE8F02"
  - value: 10
    color: "#FE7E01"
  - value: 11
    color: "#E9640F"
  - value: 12
    color: "#D54B1E"
  - value: 13
    color: "#C1322D"
  - value: 14
    color: "#AD193C"
  - value: 15
    color: "#99004B"
  - value: 15.5
    color: "#960047"
  - value: 16
    color: "#930043"
  - value: 16.5
    color: "#90003F"
  - value: 17
    color: "#8E003B"
  - value: 17.5
    color: "#8B0037"
  - value: 18
    color: "#880033"
  - value: 18.5
    color: "#86002F"
  - value: 19
    color: "#83002B"
  - value: 19.5
    color: "#800027"
  - value: 20
    color: "#7E0023"

It shows PM2.5 in a graph, data is provided by the purifier.

This is the bottom graph, a history graph, already with your suggested change to hide the names:

type: history-graph
entities:
  - entity: fan.filter_wz_level
grid_options:
  columns: 12
  rows: 2
hours_to_show: 36
show_names: false

This one shows the state of the air purifier, on or off. (Haven’t found a way yet to get the fan speed in a graph because the purifier reports that in a weird way).

It looks like this now:

The quality graph goes all the way from left to right. I’d like to keep it like that because I will mostly see that graph on my phone and I’d like to make use of as much screen space as possible. However the bar graph has some padding right and especially left. Now instead of adding padding to the quality and reducing the used screen space I’d like to remove the padding in the bar chart so both are the same length and show the same amount of time. That way it would be easy to read the correlation between the fan’s state and the air’s quality.

I hope I have now been able to explain myself more clearly.