I'm using the Sencha Touch 2.1 with Charts 1.1 to display some data.
I have a pie chart depicted below:
I want the labels to stay where they are now , but I want them to be horizontal (not rotated).
extend: 'Ext.chart.PolarChart',
requires: [
'Ext.chart.axis.Numeric',
'Ext.chart.axis.Category',
'Ext.chart.series.Pie',
'Charting.store.charts.perStore',
'Ext.chart.interactions.Rotate'
],
config: {
colors: ["#6295C7", "#CCCCC", "#FFFFF"],
store: 'chrtProduct',
// centered:true,
// innerPadding:20,
series: [{
type: 'pie',
labelField: 'verdeling',
label:{
/*display:'middle',
orientation:'horizontal',*/
field:'patVerdeling',
font: '1em Trade Gothic LT Std Bold',
contrast:true,
disableCallout:true
},
xField: 'patVerdeling'
//,rotation:90
}]
//,interactions: ['rotate']
The following code doesn't seem to do anything when uncommented.
display:'middle',
orientation:'horizontal',
Label
does have arotationRads
config option, but that defaults to zero (it comes from thesprite.Text
object) and is most likely changed internally by the pie chart when it rotates. That's why it's able to re-rotate the labels when the chart rotates. Good luck though. - Jordan Kasper