Home Forums Chart Support Stacked Column chart with json

Stacked Column chart with json

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

    Hi,

    i need a stacked column chart generated by this json file:

    {
      "Device1": [
        {
          "CountOption1": 1,
          "CountOption2": 0,
          "CountOption3": 1,
          "CountOption4": 0,
          "CountOption5": 0,
          "CountOption6": 0
        }
      ],
      "Device2": [
        {
          "CountOption1": 4,
          "CountOption2": 5,
          "CountOption3": 1,
          "CountOption4": 0,
          "CountOption5": 1,
          "CountOption6": 0
        }
      ]
    }

    I struggle how to dynamic convert “Devices X” in cancasjs required format.

    Thanks

    #29875

    @mwick,

    Parsing json file as per format accepted by CanvasJS should work fine in your case. Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

    #29877

    Thanks, but i need the columns in differnt format. That is my issue.

    Each Column shoud show the “Device”, so in my example there should only show 2 Stacked Columns. Each Columns should have the CountOptions 1-6.

    #29888

    Any Ideas how to solve this?

    #29890

    @mwick,

    Parsing JSON according to your requirements should work fine in this case. Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

    #29891

    Great, thank you!

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

You must be logged in to reply to this topic.