PDA

View Full Version : How to give different field for label and legend in piechart in extjs



vijayakumar84
30 May 2013, 5:16 AM
Hi
can anybody tell How to give different field for label and legend in pie chart in extjs. I have a store with with two field with name,value.I want display name field in legend and value field in label .Now am getting same value for both label and legend


Thanks

slemmon
2 Jun 2013, 9:19 PM
You'll need to make a renderer function for the pie series to display something other than the default label field. The legend will match the label field, but what is displayed as the label can be manipulated through the renderer.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.chart.series.Pie-cfg-renderer