Skip to content

Commit

Permalink
add the new data
Browse files Browse the repository at this point in the history
  • Loading branch information
hardingjam committed Feb 19, 2025
1 parent 0218bf4 commit 766300a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,20 @@
}
function setupChart() {
console.log('setupChart');
if (chartElement === undefined) return;
console.log('chartElement', chartElement);
chart = createChart(chartElement);
series = createSeries(chart);
setOptions();
updateNewDataPoints();
}
$: if (data || series) updateNewDataPoints();
$: if (timeDelta) setTimeScale();
$: if ($lightweightChartsTheme) setOptions();
$: if (chartElement && data.length > 0 && !chart) setupChart();
onMount(() => {
setupChart();
Expand Down

0 comments on commit 766300a

Please sign in to comment.