ITADN

Bar chart starting position cuts off the last bar

#232Closedphilwingfield 创建于 2023-12-12
P
philwingfieldcommented
Hi and thanks for a great component! I have an issue, I don't know if it's considered correct behaviour. I have a daily bar chart with period of a week, with three entities on it. ``` type: custom:history-explorer-card cardName: historycard-63986712 header: hide legendVisible: true combineSameUnits: true defaultTimeRange: 7d barGraphHeight: 175 statistics: period: day uiLayout: selector: hide interval: hide graphs: - type: bar options: ymin: 0 interval: daily entities: - entity: sensor.hot_tub_today_cost name: Hot tub fill: rgba(0,0,0,0) color: '#3333ff' - entity: sensor.smart_meter_electricity_cost_today name: Elec fill: rgba(0,0,0,0) color: '#ccccff' - entity: sensor.smart_meter_gas_cost_today name: Gas fill: rgba(0,0,0,0) color: '#33dd33' ``` I guess it calculates a bar width and spacing and also a default x-position for the scrolling, but I would imagine that it should show the most recent set of three bars on the right? This is the default initial display: ![image](https://github.com/alexarch21/history-explorer-card/assets/22032540/b7a18628-0b60-403a-9f5f-8850b73cb7b1) I have to scroll it left a little bit to show what I think it should be showing: ![image](https://github.com/alexarch21/history-explorer-card/assets/22032540/ebd7930a-83ec-479f-a551-c03c5f268ee7) I think the bar width is correct as it looks like it can show 7 days of the three bars (sorry there is some data missing I only just got the live metering data in). I think the starting x-position is wrong though. I know I'm nitpicking but what do you think? Thanks, Phil
关闭于 2024-01-01 3 条评论