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

ChartPoint labels was disappeared Options · View
aazwork
#1 Posted : Wednesday, October 06, 2010 4:14:24 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
Location: Belarus
Baydalka Volodymyr wrote:
Break-changes
* changed labels format declaration for series/points (method ChartPoint.setLabelFormat)

1) My labels has been disappeared, when I started use new version of aiCharts library.
2) I initialized my label with following settings:
Code:
series.setLabelFormat("%YVALUE0$#.#####%");
series.setVLabelAlignment(Alignment.Far);
series.setHLabelAlignment(Alignment.Near);
series.getTextPaint().setColor(Color.RED);
series.setLineWidth(1);
What I'm doing wrong ? setLabelFormat()
3) Even previous version of library didn't make my label text RED. Why?
regards
Baydalka Volodymyr
#2 Posted : Wednesday, October 06, 2010 7:19:49 PM
Rank: Developers Team


Groups: Registered, Administrators

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

1) Have you enabled point labels (series.setShowLabel(Boolean.TRUE)) ?
2) With new format declaration, format string should look like series.setLabelFormat("{YVALUE0,#.#####}");
3) Have you tried using series.getTextPaint().setColor(Color.RED) code to set color for legend items? To set the text color for legend you should use ChartLegend.getTextPaint() method.

Best regards,
Volodymyr Baydalka
Andriod development and support team
aazwork
#3 Posted : Wednesday, October 06, 2010 9:30:24 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
Location: Belarus
Baydalka Volodymyr wrote:
1) Have you enabled point labels (series.setShowLabel(Boolean.TRUE)) ?
Sure!
Code:
ChartPoint point = new ChartPoint(coordX, value);
point.setShowLabel(true);
pointsCollection.add(point);
p.s. I understand the difference between label and axisLabel.

Baydalka Volodymyr wrote:
2) With new format declaration, format string should look like series.setLabelFormat("{YVALUE0,#.#####}");

I'd understood that, but current aiCharts documentation contains expired information about label format (see the link).
I've tried this label format pattern, but the labels are still disappeared.

Baydalka Volodymyr wrote:
3) Have you tried using series.getTextPaint().setColor(Color.RED) code to set color for legend items? To set the text color for legend you should use ChartLegend.getTextPaint() method.

I'm trying to set up Color of point's label.
regards
Baydalka Volodymyr
#4 Posted : Thursday, October 07, 2010 3:23:23 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Please check the following sample. The result should look exactly like in following screenshot.

P.S. please use documentation provided with aiCharts package.

Best regards,
File Attachment(s):
PointLabelsSample.zip (14kb) downloaded 9 time(s).
Baydalka Volodymyr attached the following image(s):
result.png (7kb) downloaded 44 time(s).
Volodymyr Baydalka
Andriod development and support team
aazwork
#5 Posted : Friday, October 08, 2010 11:09:34 AM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
Location: Belarus
Baydalka Volodymyr wrote:
P.S. please use documentation provided with aiCharts package.

Great advice, thanks!
regards
aazwork
#6 Posted : Friday, October 08, 2010 1:49:56 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
Location: Belarus
I found out what my problem was.
I tried to mark the last points. CoordX equalled end of range.
When I changed its coordinate to coordX-1 my labels appeared.
See below:
Code:
ChartPoint point = new ChartPoint(coordX - 1, value);
point.setShowLabel(true);
pointsCollection.add(point);
regards
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.