We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The setData method automatically sorts x-keys, but it's problematic in some cases, particular when parseTime: false is speficied.
setData
parseTime: false
Given this data,
Morris.Line({ element: 'demo', data: [ {x: '9:30am', y: 10}, {x: '9:45am', y: 20}, {x: '10:00am', y: 30}, {x: '10:15am', y: 40}, {x: '10:30am', y: 50}, ], xkey: 'x', ykeys: ['y'], labels: ['ever increasing'], parseTime: false });
We get this chart.
Notice that the leftmost x-key becomes 10:00am, where it should have been 9:30am.
Btw I had hard time figuring this out... users reported this problem but it only occurred when the x-keys span between 9:59am and 10:00am. :)
I think when parseTime: false is specified, automatic sorting on x-keys should be disabled, as the doc says:
Set to false to skip time/date parsing for X values, instead treating them as an equally-spaced series.
So it makes more sense to leave X values as they are.
The text was updated successfully, but these errors were encountered:
Good spot! I guess I was just lucky that all my graphs with parseTime: false so far have had ordered x-keys :)
Sorry, something went wrong.
7775332
No branches or pull requests
The
setData
method automatically sorts x-keys, but it's problematic in some cases, particular whenparseTime: false
is speficied.Given this data,
We get this chart.
Notice that the leftmost x-key becomes 10:00am, where it should have been 9:30am.
Btw I had hard time figuring this out... users reported this problem but it only occurred when the x-keys span between 9:59am and 10:00am. :)
I think when
parseTime: false
is specified, automatic sorting on x-keys should be disabled, as the doc says:So it makes more sense to leave X values as they are.
The text was updated successfully, but these errors were encountered: