Skip to content

Commit

Permalink
fix(tooltip): Values where following the selected point
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Jan 26, 2021
1 parent e7ed408 commit 0145ca2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/apex-layouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export function getLayoutConfig(config: ChartCardConfig, hass: HomeAssistant | u
},
},
y: {
formatter: function (_, opts, conf = config, hass2 = hass) {
let value = opts.w.globals.series[opts.seriesIndex].slice(-1)[0];
formatter: function (value, opts, conf = config, hass2 = hass) {
if (value !== null && typeof value === 'number' && !Number.isInteger(value)) {
value = (value as number).toFixed(1);
}
Expand Down

0 comments on commit 0145ca2

Please sign in to comment.