Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Who no lines drawn when I select FixedScaleAxis?#1369

Unanswered
ErikDOlson asked this question inQ&A
Discussion options

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,
}
);

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@ErikDOlson

[8]ページ先頭

©2009-2025 Movatter.jp