Legend position deprecated
Hi, before all, thanks for this wonderful api !
But i'm wondering after a lot of searches in stackoverflow and the documentation i can't find an updated guide for positionning legend in my PieChart.
Can someone tells me how to put the legend horizontally or vertically but aligned to the right of the charts ?
Thank in advance !
Any body?
According to the documentation of Legend#getPosition(): LegendPosition, Legend#setPosition(LegendPosition):
This property is deprecated - Use
horizontalAlignment,verticalAlignment,orientation,drawInside,direction.
Have you tried those?
Yeah it's working but it telling that
setPosition() is deprecated. However, It is working fine as of now but wanted to know new method
legend.setVerticalAlignment(Legend.LegendVerticalAlignment.CENTER);
legend.setHorizontalAlignment(Legend.LegendHorizontalAlignment.RIGHT);
legend.setOrientation(Legend.LegendOrientation.VERTICAL);
Try this code. Thanks