Skip to content
Snippets Groups Projects
Verified Commit b7273c10 authored by Mike Greiling's avatar Mike Greiling
Browse files

fix bug in which axes are scaled only to first data set

parent 045795d0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -153,8 +153,9 @@
const axisYScale = d3.scale.linear()
.range([this.graphHeight - this.graphHeightOffset, 0]);
 
axisXScale.domain(d3.extent(this.timeSeries[0].values, d => d.time));
axisYScale.domain([0, d3.max(this.timeSeries[0].values.map(d => d.value))]);
const allValues = this.timeSeries.reduce((all, { values }) => all.concat(values), []);
axisXScale.domain(d3.extent(allValues, d => d.time));
axisYScale.domain([0, d3.max(allValues.map(d => d.value))]);
 
const xAxis = d3.svg.axis()
.scale(axisXScale)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment