问题
can anybody tell How to show label with line and display label outside in extjs4.1.I want to display label outside of pie and show line to map the label
eg
/ \ \
test test1 test2
回答1:
You've got the display option of the label config, that you can set to 'outside'.
As for the lines, you'll have to draw them yourself... Which would be a quite involved hack IMO. If you're interested in trying, that takes place in Ext.chart.Label#renderLabels(), and uses Ext.chart.series.Pie's onCreateLabel()
and onPlaceLabel()
methods. Don't forget to take your trigonometry with you before diving in there!
来源:https://stackoverflow.com/questions/16891460/how-to-show-label-with-line-and-display-label-outside-in-piechart-in-extjs4-1