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! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
aazwork  
#1 Posted : Wednesday, October 6, 2010 6:14:24 PM(UTC)
aazwork
Rank: Member

Groups: Registered
Joined: 6/10/2010(UTC)
Posts: 28
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?

Edited by user Wednesday, October 6, 2010 6:18:27 PM(UTC)  | Reason: inset link to documentation

regards
Baydalka Volodymyr  
#2 Posted : Wednesday, October 6, 2010 9:19:49 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

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 6, 2010 11:30:24 PM(UTC)
aazwork
Rank: Member

Groups: Registered
Joined: 6/10/2010(UTC)
Posts: 28
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.

Edited by moderator Thursday, October 7, 2010 4:06:06 PM(UTC)  | Reason: link fixed

regards
Baydalka Volodymyr  
#4 Posted : Thursday, October 7, 2010 5:23:23 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

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).

You cannot view/download attachments. Try to login or register.
Volodymyr Baydalka
Andriod development and support team
aazwork  
#5 Posted : Friday, October 8, 2010 1:09:34 PM(UTC)
aazwork
Rank: Member

Groups: Registered
Joined: 6/10/2010(UTC)
Posts: 28
Location: Belarus

Baydalka Volodymyr wrote:
P.S. please use documentation provided with aiCharts package.

Great advice, thanks!
regards
aazwork  
#6 Posted : Friday, October 8, 2010 3:49:56 PM(UTC)
aazwork
Rank: Member

Groups: Registered
Joined: 6/10/2010(UTC)
Posts: 28
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);

Edited by user Friday, October 8, 2010 4:59:05 PM(UTC)  | Reason: correct my English :)

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-2017 ArtfulBits. All rights reserved.