whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

how to set the text color for one pie chart slice Options · View
stevenpannell
#1 Posted : Friday, March 04, 2011 9:46:01 PM
Rank: Newbie

Groups: Registered

Joined: 8/7/2010
Posts: 4
Hi,

There is a problem with the pie chart in that when the slice color is yellow it is impossible to read the white text. Therefore, i try and change the color of the text, as follows, sadly this is not working.

How can i change the text color for one specific slice of a pie chart?


ChartPoint point = new ChartPoint(position, tmp);
series1.getPoints().add(point);
// background yellow, white is not readable, change it!
if(point.getBackColor()==Color.YELLOW)
point.getTextPaint().setColor(Color.BLACK);


thanks!
Baydalka Volodymyr
#2 Posted : Wednesday, March 09, 2011 4:45:07 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

There is one thing what you should know about ChartPoint.getTextPaint() method. As you know points use property values from series in general cases. That's mean ChartPoint.getTextPaint() returns Paint instance from parent series. You should create new instance of Paint class, setup it and set via ChartPoint.setMarkerPaint method (ChartPoint.setTextPaint method in future versions).

Best regards,
Volodymyr Baydalka
Andriod development and support team
stevenpannell
#3 Posted : Wednesday, March 09, 2011 4:48:01 PM
Rank: Newbie

Groups: Registered

Joined: 8/7/2010
Posts: 4
Thanks a lot for your help. I take a look and post the results back here.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.