-
Hi David, First of all: very nice card with great possiblities! I love it and try to implement it in my Energy overviews everywhere! I'm trying to built a barchart like this: So I think I'll have to use barmode: overlay and have to set different widths for the bars, I first tried without specifying the widths: Then i tried to set the individual widths of the bars, but no matter what I put there for number , the results are the same: a very small bar: So, my questions are:
And I think the barmode: group doesn't work, it looks the same as barmode: overlay (or I'm do something wrong of course :-)): grtz, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 18 replies
-
Hi there, happy to hear you are enjoying it! I think what you are trying to achieve should be possible by:
Pro tip: if you want to style plots, google for "plotlyjs how to xyz". That usually will get you in the right direction quite quickly :) I'm moving this issue to the discussion section since it is more a question than a bug report or feature request. |
Beta Was this translation helpful? Give feedback.
-
Hi David, Thx for the quick response! I had the unit wrong for sure: grtz Martin |
Beta Was this translation helpful? Give feedback.
-
Hello, I am also trying to plot 2 series as bar. Like @elbertov, I can't get "barmode: group" to work. @dbuezas Do you have some advice ? |
Beta Was this translation helpful? Give feedback.
-
I have following bar chart. In previous version the bars where nice and alligned, now there are realy smal: Is this a config problem (Heat Energy and Heizöl)? type: custom:plotly-graph
entities:
- entity: sensor.hmip_sens_out_stho_temperature
statistic: mean
period: hour
name: Aussentemp
- entity: sensor.at_yesterday
statistic: mean
period: day
time_offset: '-1d'
extend_to_present: true
show_value: true
- entity: sensor.eg_energy_daily
statistic: state
period: day
filters:
- store_var: egenergy
- entity: sensor.odg_energy_daily
statistic: state
period: day
- entity: sensor.odg_energy_daily
statistic: state
period: day
type: bar
opacity: 0.5
texttemplate: '%{y:0.1f}'
name: Heating Energy
filters:
- map_y: y + vars.egenergy.ys[i]
- entity: sensor.daily_heizoel
statistic: state
period: day
unit_of_measurement: kWh
name: Heizöl
texttemplate: '%{y:0.1f}'
type: bar
opacity: 0.5
filters:
- map_y_numbers: y * 10
title: Heat Energy LTS
hours_to_show: 576
refresh_interval: 10
defaults:
entity:
show_value: true
|
Beta Was this translation helpful? Give feedback.
-
Ok, that was hard: Problems
Solutiontype: custom:plotly-graph
entities:
- entity: sensor.energy_heating_oil
statistic: state
period: day
type: bar
opacity: 0.5
texttemplate: '%{y:0.1f}'
filters:
- delta
- filter: i>0 # the first value has the timestamp of the beginning of the plot, not the day (home assistant API)
- entity: sensor.energy_house
statistic: state
period: day
texttemplate: '%{y:0.1f}'
type: bar
opacity: 0.5
filters:
- delta
- filter: i>0
layout:
barmode: group
title: Heat Energy LTS
hours_to_show: 100
refresh_interval: 10 |
Beta Was this translation helpful? Give feedback.
-
Hello, Sorry to bother you again David, but the problem with barmode group is still alive :( entities:
- entity: sensor.pm_main_kwh
name: energy
statistic: sum
period: day
type: bar
opacity: 0.5
filters:
- delta
- entity: sensor.pm_main_kwh_cost
name: cost
statistic: sum
period: day
type: bar
opacity: 0.5
filters:
- delta
layout:
barmode: group
hours_to_show: 10d
refresh_interval: auto
title: Daily Energy I fixed it with time_offset and width, so not a big deal .... |
Beta Was this translation helpful? Give feedback.
Ok, that was hard:
Problems
Solution