Open DevoliaEsp opened 3 months ago
+1 same for me. Reverted back to 2.0.4 and everything works ok again. For me, forceNiceScale: true
seems to not work when I have multiple series (assigned to different y-axes), e.g. (truncated example):
series:
- entity: sensor.thing
name: Thing
yaxis_id: first
- entity: sensor.thing2
name: Thing2
yaxis_id: second
yaxis:
- id: first
apex_config:
forceNiceScale: true
- id: second
opposite: true
apex_config:
forceNiceScale: true
Same here , it's fine in 2.04
Same for he. I had to revert to 2.0.4 to have forceNiceScale work as expected. I also have multiple series (assigned to different y-axes).
My config (works on 2.0.4 and stops working since 2.1.0).
type: custom:apexcharts-card
graph_span: 2h
header:
show: true
title: Power RAW last 1h
show_states: true
colorize_states: true
apex_config:
chart:
height: 250px
legend:
show: false
yaxis:
forceNiceScale: true
yaxis:
- id: power
apex_config:
forceNiceScale: true
- id: percent
opposite: true
decimals: 0
min: 0
max: 100
apex_config:
tickAmount: 5
series:
- entity: sensor.house_consumption
curve: smooth
type: line
stroke_width: 1
yaxis_id: power
extend_to: false
- entity: sensor.pv_power
curve: smooth
type: line
stroke_width: 1
yaxis_id: power
extend_to: false
- entity: sensor.meter_active_power_total
curve: smooth
type: line
stroke_width: 1
yaxis_id: power
extend_to: false
- entity: sensor.battery_power
curve: smooth
type: line
stroke_width: 1
yaxis_id: power
extend_to: false
- entity: sensor.energy_monitoring_smartplug_moc
curve: stepline
type: line
stroke_width: 1
yaxis_id: power
extend_to: false
- entity: sensor.battery_state_of_charge
curve: stepline
type: line
stroke_width: 1
yaxis_id: percent
extend_to: false
I've looked into the source code changes and the only thing that could have impact was update to "apexcharts": "^3.49.2"
🤔
I've quickly checked and this also does not work:
type: custom:apexcharts-card
graph_span: 2h
yaxis:
- id: power
apex_config:
forceNiceScale: true
series:
- entity: sensor.house_consumption
yaxis_id: power
On 2.0.4 it works just fine:
Still no update on this big 😔
I'm afraid this is not a bug but a feature in the underlying apexcharts library, so it probably cannot be fixed in this repository. Here it is stated that this behaviour is probably intended although I don't understand the reason for it: https://github.com/apexcharts/apexcharts.js/issues/4283#issuecomment-1971274210 If you still want this to be fixed you probably need to open an issue here: https://github.com/apexcharts/apexcharts.js/issues
not sure why its as intended where 2.04 the logic works but now it doesn't... sorry I disagree.
@ausfas It is not a bug because the logic behind forceNiceScale was changed intentionally in the apexcharts library. Whether thats good or bad is another question, but as I stated this repository is the wrong place to discuss this, because this repository will never be able to solve the problem. That is because this repository serves as a bridge between Home Assistant and Apexcharts, so anything related directly to Apexcharts, like this problem, has nothing to do with this repository.
Checklist
Describe the bug Since apex V2.1.0 and later, it seems that "forceNiceScale", an yaxis motion listed in apex_config, simply doesn't work anymore
Version of the card Version: 2.1.2
To Reproduce This is the configuration I used: `type: custom:apexcharts-card update_interval: 15min apex_config: xaxis: axisBorder: show: false yaxis:
Screenshots Before (V2.0.4) and after (2.1.0/2.1.2)
Desktop (please complete the following information):