Home › forums › Report Bugs › Data order in dataseries
This topic contains 7 replies, has 3 voices, and was last updated by jarode 2 years, 5 months ago.
here is my problem : http://jsfiddle.net/ouw8utLm/2/
when you use 2 or more data series, the order of the x(label) is not always the same, as you can see in this exemple, the first x = 10 and the second x=20 so the graph display the result of the x=10 and x=20 in the same place i=0 and this is not correct.
What should be the right result ?:
As the first dataseries is created first, the second data series should navigate trough the first serie and find the correspondant x, but there is a new problem the show-up here, if the 2end serie contain some elements that the first doesn’t have? what should we do( see it in a générique perspective, cause the x could be a lable or a date or…)
Thanks for your awesome support :)
See this example:
For ordering data you can set x values as per your requirement. In previous reply Boogie is given an nice example.
Thanks for your reply :)
unfortunately, this solution is working for number only.
I’ve updated my example to see a more generic of this problem.
Thanks for you support.
I don’t see the problem. View example: http://jsfiddle.net/Vitegor/k01jrm34/
Just add a integer value for X, which will correspond to the Label
we are talking about a generic way, we don’t know the type of data that will be displayed, it’s not like I’m putting the data into the graph, but I’m getting it from a data base, so I don’t have a way to know witch one is 1 and witch one is 2.
I hop you understand the situation.
I hope that a understand your problem :)
When retrieving data you can specify for each unique label a unique corresponding value for X in a cycle on all received data
yes I can give them a value for the x.
I can also go back each time and find if there is a matching label to give the same x.
but I think that it’ll take some time cause I’ll need to pass trough each element of each data series to find the match, and if it doesn’t exist give it a new one.
is this what are you trying to explain to me ?
You must be logged in to reply to this topic.