Home Forums Chart Support Multi-series spline Issue

Multi-series spline Issue

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

    jtr

    I am having issues getting a multi-series spline chart working. I can do it when hard coding the data arrays but am using json data.
    I have it working just fine with a single series but it bombs when I add the second data series. My syntax must be off somewhere but I think I have followed it correctly. I am newbie to this forum and to canvasjs. Any help would be welcomed. I am happy to sare the code.
    I am using the php echo json_encode in the databapoints; section

    • This topic was modified 3 weeks, 3 days ago by jtr. Reason: extra info
    #44869

    @jtr,

    Please take a look at this Gallery Page for an example on rendering chart with data from JSON in PHP. If you are still facing issue, kindly create a sample project reproducing the issue you are facing & share it with us so that we can look into the code, understand the scenario better and help you out.


    Manoj Mohan
    Team CanvasJS

    #44873

    jtr

    I finally worked it out.
    It was because the title variable from php changed from text to number during a looping increment (for year). The canvasjs does not accept numerics as title objects it would seem. All I had to do in the end was to strval() the title variable before doing the json_encode.

    #44887

    @jtr,

    Glad that you figured it out :)

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.