Skip to content

Commit

Permalink
fix: yaxis would always start at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed May 24, 2021
1 parent a6d73ba commit 50ef9e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/ui-lovelace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -997,16 +997,14 @@ views:
all_series_config:
stroke_width: 2
series:
- entity: sensor.random0_100
yaxis_id: first
- entity: sensor.random_0_1000
yaxis_id: second
- entity: sensor.random0_100
yaxis_id: first
transform: 'return Number(x) + 30;'
- entity: sensor.random0_100
yaxis_id: first
transform: 'return Number(x) - 30;'
transform: 'return Number(x) + 60;'
yaxis:
- id: first
apex_config:
Expand Down
4 changes: 2 additions & 2 deletions src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ class ChartsCard extends LitElement {
}
return lMinMax;
});
let min: number | null = 0;
let max: number | null = 0;
let min: number | null = null;
let max: number | null = null;
minMax?.forEach((elt) => {
if (!elt) return;
if (min === undefined || min === null) {
Expand Down

0 comments on commit 50ef9e4

Please sign in to comment.