Home forums Feature Requests & Feedback Creating Multi Series Chart in AJAX with JSON

This topic contains 13 replies, has 2 voices, and was last updated by  yansonalvin97 2 weeks, 5 days ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #20538

    Hi canvasjs developers.

    Please can you help me generate a multi series chart in ajax based on JSON. I already know how to generate a single series chart in ajax with json but Im having a hard time for multi series chart.

    Please please help me I hope you will answer. Please man.

    #20545

    Vishwas R
    Keymaster

    @yansonalvin97,

    Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

    #20547

    Thanks man. Nice solution. Keep it up. I will just tell you if mine works…
    One more question, is it possible to switch from multi series chart like stackedBar, stackedColumn graph to pie graph or doughnut graph?

    #20555

    Works fine. But I still have a concern.
    Please refer to the provided link of image Graph
    The data of this graph comes from a json and I dont want to have a duplicate in the year. Can you please tell me whats going on? Thank you. This is my json
    JSON

    • This reply was modified 3 weeks, 2 days ago by  yansonalvin97.
    #20565

    Vishwas R
    Keymaster

    @yansonalvin97,

    One more question, is it possible to switch from multi series chart like stackedBar, stackedColumn graph to pie graph or doughnut graph?

    Pie/Doughnut charts doesn’t support multi-series as of now. However switching between stackedBar/stackedColumn to pie/doughnut works fine where chart accepts and renders only first dataSeries.

    The data of this graph comes from a json and I dont want to have a duplicate in the year. Can you please tell me whats going on? Thank you. This is my json

    Can you kindly create jsfiddle with sample data, so that we can understand it better and help you out?


    Vishwas R
    Team CanvasJS

    #20569

    Here is my jsfiddle Now its not working online but in my laptop it works and it renders. please help

    #20573

    Vishwas R
    Keymaster

    @yansonalvin97,

    You need to group them based on year that you get from JSON. Please take a look at the updated jsfiddle.

    Also, its better to initialize chart once rather than initializing within ajax calls.


    Vishwas R
    Team CanvasJS

    #20579

    Wish I have a talent like your’s. Works like a gem. Thank you very much Vishwas R.

    #20584

    Hi Vishwas, is it possible to have another dropdown in order to filter the courses based on the college or department? I wish to have another dropdown next to the chart type which you have provided me yesterday. Here is my jsfiddle. Thank you very much Vishwas.

    #20591

    Vishwas R
    Keymaster

    @yansonalvin97,

    You can modify and customize chart-options dynamically. Adding another dropdown to filter based on department/course should work fine if you handle chart-options accordingly. Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

    #20593

    Thank you again Vishwas R

    #20596

    Hi again Vishwas. Did you see my JSON file ? Instead of the courses in the drop down list how can I replace it with the college field? In my JSON it consist of two college which is the CIT and COE. I want CIT and COE as the drop down values. Thank you again.

    #20615

    Vishwas R
    Keymaster

    @yansonalvin97,

    You can add dropdown to either course or college or based on both and updating the chart options according to the drop-down option that has been selected will work fine. Please take a look at this updated jsfiddle.


    Vishwas R
    Team CanvasJS

    #20617

    Thank you again. It works..

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

You must be logged in to reply to this topic.