Hi - has anyone ever created a Bar in Pie chart or a Pie of Pie chart or even just an exploding pie chart? Is it even possible?
Thank you
Hi - has anyone ever created a Bar in Pie chart or a Pie of Pie chart or even just an exploding pie chart? Is it even possible?
Thank you
Hi,
Can you explain a bit more what you’re trying to do? It’s not quite clear what is requested.
thanks.
Hi - I wanted to try to to create an exploding pie chart like you an do in excel.
Exploding as in a pulled slice?
Erik
The pulled slice requires a little trick. As you may or may not know the graphs in Connect are powered by the amCharts library. This library has many option of which a subset is exposed in the user interface of the Designer. These options are found in the Chart Properties dialog. This dialog also includes a Source tab which provides direct access to the JSON configuration of the chart. This can be utilized to drive features what are not show in the interface of the Designer.
AmChart’s “pulledField” property for pie charts
In the amChart documentation I found the “pulledField” property. See: AmPieChart | JavaScript Charts v. 3 | amCharts
“Name of the field in chart’s dataProvider which holds a boolean value telling the chart whether this slice must be pulled or not.”
How to set the pulledField in your template
To pull a field requires us to mark the desired field by setting a custom property and tell the amChart library which property to look for.
The User script
Selector: #pie
var data = JSON.parse( results.attr( 'data-amchart' ) ); data.dataProvider[0].thePulledfield = true; results.attr( 'data-amchart', JSON.stringify( data ) );
Admittedly it is not trivial but hope it is of some help.
Erik
Awesome - Thank you for the information. I will start working on this to see if I can get it to work.