Skip to content

Commit

Permalink
update legend tutorial code, fixes #1534
Browse files Browse the repository at this point in the history
  • Loading branch information
SlicedSilver committed May 8, 2024
1 parent 12e4eed commit 2fd496e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/tutorials/how_to/legend-3line.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ legend.style.color = CHART_TEXT_COLOR;
container.appendChild(legend);

const getLastBar = series => {
const lastIndex = series.dataByIndex(Math.Infinity, -1);
const lastIndex = series.dataByIndex(Number.MAX_SAFE_INTEGER, -1);
return series.dataByIndex(lastIndex);
};
const formatPrice = price => (Math.round(price * 100) / 100).toFixed(2);
Expand Down

0 comments on commit 2fd496e

Please sign in to comment.