Home Forums Report Bugs line chart: new line not visible on pushing dataseries

line chart: new line not visible on pushing dataseries

Viewing 6 posts - 1 through 6 (of 6 total)
  • #20960

    I am trying to add new dataSeries using this:
    var newseries={
    {y:frustrated[1],x:’2′, indexLabel:'{y}%’},
    {y:frustrated[2],x:’3′, indexLabel:'{y}%’}]
    here frustrated array contains three float values which i got from ajax response.
    Problem is that the data is being pushed into the data array but i can only see tooltips corresponding to the new line, not the line….

    I’ve tried changing it to a column chart… again on adding new data columns get shifted and all but the new columns are not visible.



    It seems like you are passing invalid x-values to chart. Passing valid number to x-value of dataPoint should work fine in your case.
    If this doesn’t solve your requirement, please share a jsfiddle so that we can understand your requirement better and help you out.

    Priyanka M S
    Team CanvasJS


    I have used this:
    valueFormatString: ‘Test #’,
    So as far as x values are concerned they are fine…. because it is showing the chart with Test 1 Test 2 and Test 3 on X-axis
    its only so that assigning a new variable to datapoints doesn’t show the line… like i said tooltips are visible.

    PS: I am using https://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.7.0/canvasjs.min.js

    • This reply was modified 4 years, 7 months ago by akshay30498.


    Can you kindly share a jsfiddle with sample data, so that we can look at your code, understand and help you out?
    We recommend you to use latest version of CanvasJS.

    Priyanka M S
    Team CanvasJS


    the “frustrated” array actually contained string “20”, “25” and “30”
    just thought about it while creating the fiddle
    So i used parseInt() around it and it showed line.
    What a noob mistake XD XD

    Anyways now it is working ^_^ yeye!!!
    thanx for the help tho :)

    Also about new version… why don’t u guys have a cdn for latest version? i don’t like downloading stuff … so i use cdn and latest cdn is for version 1.7.0 can u plz host the latest version on a cdn….



    Glad that it’s working fine now.

    Instead of CDN, you can serve CanvasJS script from https://canvasjs.com/assets/script/canvasjs.min.js

    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.