Home › forums › Using CanvasJS › Step Chart Inversion?
Tagged: step, step chart, Step Line
This topic contains 2 replies, has 2 voices, and was last updated by James 7 months, 4 weeks ago.
I have a step chart that is behaving strangely. In a data range, I have 3 values lets say.
0, 650, 0. (each of these is a y value, x values are timestamps)
However, the lines do not appears as I’d expect. from the 0 to 650, I expect the line to look like an inverted L, or ___|, staying at 0 until it reaches the coordinate where y = 100, then stay at 100 until the point where y = 0 once more. I am getting the opposite behavior. Am I doing something improperly? Here is a chart appearance for reference. The blue-green line is the step chart.
It seems to be working fine.
Here is the jsfiddle with the scenario you have described. If the issue still persist, can you kindly create jsfiddle with the issue you are facing so that we can look into it and help you out?
I have figured out the issue. My data is pulled from a database, and is ordered by timestamp, making the newest item first. If I reverse the order, so that the oldest data pulled is first, the issue is corrected. The chart didn’t have a problem interpreting reverse date order data normally, but it seems with the step line chart this is important! :)
You must be logged in to reply to this topic.