Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions samples/competitors/d3-raw/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ function drawChart(series: Series[], dates: Date[]): ChartControls {
// Update scales
xScale.domain(constrainedXDomain);
yScale.domain(newYDomain).nice();
currentYDomain = yScale.domain() as [number, number];

// Re-render everything
updateAxes();
Expand Down Expand Up @@ -625,6 +626,7 @@ function drawChart(series: Series[], dates: Date[]): ChartControls {
currentYDomain = newYDomain;
xScale.domain(newXDomain);
yScale.domain(newYDomain).nice();
currentYDomain = yScale.domain() as [number, number];

updateAxes();
updateLines();
Expand Down Expand Up @@ -837,6 +839,7 @@ function drawChart(series: Series[], dates: Date[]): ChartControls {

xScale.domain(currentXDomain);
yScale.domain(currentYDomain).nice();
currentYDomain = yScale.domain() as [number, number];

// Re-render
updateAxes();
Expand Down