-
4 May 2012 6:05 AM #1
Unanswered: angleField for pie chart
Unanswered: angleField for pie chart
Hi,
I am trying to create a pie chart using "angleField" config. But its showing error in console.
Also when I am using the "field" config instead of "angleField", the chart is working properly.
Though "field" config does the work, I need "angleField" for my code.
The code:
The Error as shown in console:Code:Ext.define('senchaChart.view.PieChart',{ extend: 'Ext.chart.Chart', alias: 'widget.piechart', requires: [ 'Ext.chart.series.Pie' ], config: { cls: 'chartpanel', theme: 'Energy', animate: true, store: 'ChartStore', series: [ { type: 'pie', angleField: 'data', highlight: false, label: { field: 'name' } } ] } })
Thanks in advance.Code:Uncaught TypeError: Object [object Object] has no method 'getXField'
-
16 Jun 2012 6:11 AM #2
Think you need to use 'field' instead of 'angleField' instead.
-
25 Sep 2012 12:29 AM #3
When using ExtJS4 (Sencha Architect 2.1 not Sencha Touch) there is no field called "field" in the property list.
Maybe it is generated in the code, but in the list you only have anglefield and lengthfield.
properties_pie_series.png
-
25 Sep 2012 1:16 AM #4
What version of touch?
If it is the latest 2.1.0 B3 then a lot has changed.
Look in the framework source PieChart.js - \touch\examples\kitchensink\app\view
for direction on charting. API examples are not yet complete.
It is field not angleField
-
25 Sep 2012 4:25 AM #5
anglefield works using pie chart
anglefield works using pie chart
Sencha Architect uses anglefield in the last version.
I am using this code and renders the pie chart, in the examples there is no mention to angleField, and it is using field. However, I am not sure is the correct way since Sencha Architect generates code without using the field.Code:series: [ { type: 'pie', highlight: 'segment: {margin: 10}', label: { field: 'name', display: 'rotate', contrast: true, font: '12px Arial' }, showInLegend: true, angleField: 'value' } ]
In the label they use the "field", but for the series you have anglefield and lenghtfield.
Regards
-
25 Sep 2012 10:58 AM #6
What version of Touch are you using?


Reply With Quote