You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// dynamically determine the stylistic width of the graph, then strip the 'px'
let width =String(this.graph.attr('width') || this.graph.style('width')).replace('px', '');
let height = String(this.graph.attr('height') || this.graph.style('height')).replace('px', '');
let xExtent = d3.extent(this.getTimeData()); // a series of millisecond times
let xScale = d3.scaleTime().domain(xExtent).range([0, width]);
let xAxis = d3.axisBottom(xScale);
d3.select('lines').append("svg").append("g").call(xAxis);
resulted in erroneous translations such as: transform="translate(20.8287963768115960.5,0)"
(notice the two decimal points in the x value)
the fix
let width = Number(String(this.graph.attr('width') || this.graph.style('width')).replace('px', ''));
let height = Number(String(this.graph.attr('height') || this.graph.style('height')).replace('px', ''));