• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF11 CFChartseries Data Attribute

Engaged ,
Aug 04, 2014 Aug 04, 2014

Copy link to clipboard

Copied

Has anyone had success in using CF11's new "data" attribute of CFCHARTSERIES?  In particular I'm currently trying to get a pie chart working.  The documentation says:

The chart data. This is an array of arrays.Specify the data as follows: 2,3],[4,5]] or [[3,4,5],[6,7,3]] for charts with z parameter such as bubble chart, or {{[3,4]}} in case of pie charts.


I'm having trouble following what they're trying to say for pie charts.  Inputting what the documentation says, {{[3,4]}}, gives an error.  Using the array of arrays I can only get one pie slice to show or I get multiple charts showing...all with only one piece of data.

The ZingCharts JSON I believe should be something like this but all I get are errors with each variation of this I try:

[

            {

                "values":[11],

                "text":"Item 0"

            },

            {

                "values":[36],

                "text":"Item 1"

            },

            {

                "values":[4],

                "text":"Item 2"

            },

            {

                "values":[59],

                "text":"Item 3"

            }

        ]

This is the result of using [[4],[5]]

2pies.PNG

This is what I get when using [[4,5,6]]:

1pie.PNG

Anyone had success with this?

Views

278

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation