tracker issue : CF-3800311

select a category, or use search below
(searches all categories and all time range)
Title:

CFCHARTSERIES Data Attribute Will Not Produce Pie Chart According to Documentation

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Paul Mascari / Paul Mascari (Paul Mascari)

Created: 08/05/2014

Components: Charting/Graphing

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Listed in the version 11.0.03.292480 Issues Fixed doc
Problem Description:
Documentation for the "data" attribute of CFCHARTSERIES says this for pie charts: "This is an array of arrays.Specify the data as follows: ...  {{[3,4]}} in case of pie charts."   Trying to follow the documentation results in errors or unusable graphs.

Steps to Reproduce:
<cfset theData = {{[3,4]}}>
<cfchart  name="chart_Data">
<cfchartseries type="pie" data="#theData#"></cfchartseries>
</cfchart>

Actual Result:
Error: "Invalid CFML construct"

Expected Result:
A pie chart with two slices of value 3 and 4.

Any Workarounds:
None.  I cannot find the correct structure required for pie charts.  Using  "array of arrays" as the documentation says does not produce anything usable.
Such as 
<cfset theData = [[3,5,6]]> will give a pie chart with no slices.
<cfset theData = [[3],[5],[6]]> produces 3 pie charts, no of which have slices.

Please fix or provide an example of the required format...preferably including data labels and colors.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3800311

External Customer Info:
External Company:  
External Customer Name: sdsinc_pmascari
External Customer Email:  
External Test Config: My Hardware and Environment details: 

Win 2008 R2 64 bit, IIS7

Attachments:

  1. August 05, 2014 00:00:00: 1_1pie.PNG
  2. August 05, 2014 00:00:00: 2_2pies.PNG
  3. August 05, 2014 00:00:00: 3_3pies.PNG
  4. August 26, 2014 00:00:00: 4_badExample.PNG

Comments:

Ideally, this attribute would accept a JSON string identical to what you would pass to the "series" object in ZingCharts such as: [ { "values":[11], "text":"11", "legendText":"Item 1" }, { "values":[36], "text":"36", "legendText":"Item 2" }, { "values":[4], "text":"4", "legendText":"3D aspect" }, { "values":[59], "text":"59", "legendText":"test 4" } ]
Comment by External U.
11426 | August 05, 2014 09:13:33 AM GMT
cfcharseries data attribute takes array of array as value. The correct use case would be: <cfset theData = [["a",4], ["b", 7], [9, 10]]> <cfchart> <cfchartseries type="pie" data="#theData#"></cfchartseries> </cfchart> This would now render single pie chart with items as a, b, c and values as 4, 7, 9 (Comment added from ex-user id:nawani)
Comment by Adobe D.
11427 | August 26, 2014 07:17:19 AM GMT
@Anuj Nawani No, that does NOT work! Did you even test it or are you using some version of CF the rest of us don't have? That produces 3 solid pies all labeled as "Series 1". I attached the screenshot.
Comment by External U.
11428 | August 26, 2014 07:32:31 AM GMT
The attached image, "badExample.png" is using @Anuj Nawani code exactly. The 'chart' is unusable.
Comment by External U.
11429 | August 26, 2014 07:36:05 AM GMT
This is issue with CF11 release which is now fixed and will be available in CF11 HF1. (Comment added from ex-user id:nawani)
Comment by Adobe D.
11430 | August 26, 2014 07:58:49 AM GMT
So....when might we see the "fix" released? Indicating a bug is fixed and then not releasing it for use is infuriating. CF11 charts are unusable in production until these issues are fixed.
Comment by External U.
11431 | September 04, 2014 09:42:56 AM GMT
Verified this is fixed in CF11 Update 3. Anuj's example on 5:47:19 AM GMT+00:00 Aug 26, 2014 (after changing 9 to "c") now renders a single 3-slice pie chart w/ values 4, 7, 10. Thanks!, -Aaron
Comment by External U.
11432 | November 06, 2014 03:43:13 AM GMT