Who no lines drawn when I select FixedScaleAxis? #1369
Unanswered
ErikDOlson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tried with both 0.11 and latest 1.0 -- I am trying to plot a date-time series with lots of points (100+), so I'd like to just show it as a continuous set of line sqgments. If I use the default axes, this seems to work with showLine: true and showPoint: false in the options. But the axis formatting is terrible, because the dates are all shown as raw integer numbers, and it's drawing 100+ of them on the X-axis.
So I switch to FixedScaleAxis or AutoScaleAxis. But now it won't show the line segments. In fact, if showPoint is set to false, I get nothing on the graph at all!
Am I doing something dumb here?
...
for (var i=0; i < data1.length; i++) {
var yPt = parseFloat(data1[i]["Reading"]) ;
var row = {x : new Date(data1[i]["Date"]*1000), y: yPt };
formattedData.push( row);
}
...
new Chartist.Line(
'#' + subid(nodeid),
{
series: [formattedData],
},
{
showLine: true,
showPoint: false,
axisX: {
type: Chartist.AutoScaleAxis,
divisor: 5,
labelInterpolationFnc: value =>
new Date(value).toLocaleString(undefined, {
month: 'short',
day: 'numeric'
})
},
// fullWidth: true,
}
);
Beta Was this translation helpful? Give feedback.
All reactions