Home Forums Chart Support Wrong graph is getting plot for data with label

Wrong graph is getting plot for data with label

Viewing 4 posts - 1 through 4 (of 4 total)
  • #26024

    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.

    Thanks,
    Tejal

    #26044

    Tejal,

    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.

    —-
    Manoj Mohan
    Team CanvasJS

    #26057

    Hello Manoj,

    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)
    https://jsfiddle.net/ftuyxrm9/1/

    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/

    Thanks,
    Tejal

    #26090

    Tejal,

    Can you please share some pictorial representation of your requirement, so that we can understand the scenario better and suggest you an appropriate solution?

    —-
    Manoj Mohan
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.