Home › forums › Chart Support › Wrong graph is getting plot for data with label
Hello CanvasJS Team,
I have following snippets,
1. Data with x key: https://jsfiddle.net/ewfkLga5/
2. Data with label key: https://jsfiddle.net/ewfkLga5/1/
In my scenario I am using label for x coordinates(in 2nd snippet) which plots wrong graph as show in 2nd snippet. It works fine if I replace label with x. Why so and how can I handle this.
When just labels are passed without x-values, x-values are automatically added in successive order as 0,1,2,3,4… You can overcome it by passing the values to the x property instead of label.
Considering this thread as a duplicate of Canvas Data, hence closing the same.
We have added label in order to show all the coordinate on x-axis like following link. In this our all data labels (0,1,0,0,2,4) are getting plot.
with labels: https://jsfiddle.net/t61foax5/1/
But if will use x instead of label it shows: (which we don’t want)
So in my previous conversation its mandatory for me to use label instead of x. Please suggest solution to plot proper graph data by using labels https://jsfiddle.net/ewfkLga5/1/
Can you please share some pictorial representation of your requirement, so that we can understand the scenario better and suggest you an appropriate solution?
You must be logged in to reply to this topic.