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, February 16, 2011 5:55:11 PM(UTC)
aazwork
Rank: Member

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

There are Column and Bar chart types.
Is it possible to draw the bars with different colors?
I'm meaning something like as picture below.
aazwork attached the following image(s):
ChartColumnType-1.png (4kb) downloaded 41 time(s).

You cannot view/download attachments. Try to login or register.
regards
Baydalka Volodymyr  
#2 Posted : Wednesday, February 16, 2011 6:25:58 PM(UTC)
Baydalka Volodymyr
Rank: Member

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

Hi,

Yes, but you need to set colors manually. Check following code.

Code:

ChartSeries series = new ChartSeries(ChartTypes.Column);

//set data... 

for(int i = 0, l = series.getPoints().size(); i < l; i++)
{
  ChartPoint point = series.getPoints().get(i);
  
  point.setBackColor(point.getY(0) > 0 ? Color.GREEN : Color.RED);
}


Best regards,
Volodymyr Baydalka
Andriod development and support team
aazwork  
#3 Posted : Monday, March 28, 2011 5:26:37 PM(UTC)
aazwork
Rank: Member

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

Hi, there is another question in same sphere.
Is it possible to draw different colors in single ChartArea?
regards
Baydalka Volodymyr  
#4 Posted : Monday, March 28, 2011 5:36:35 PM(UTC)
Baydalka Volodymyr
Rank: Member

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

Hi,

Sorry, I sorry, but I do not clearly understood your question
You can change color of points in single ChartArea, but color of point doesn't affect for ChartAreaType

Best regards,
Volodymyr Baydalka
Andriod development and support team
aazwork  
#5 Posted : Monday, March 28, 2011 7:15:40 PM(UTC)
aazwork
Rank: Member

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

Baydalka Volodymyr wrote:
but color of point doesn't affect for ChartAreaType
It seems, that you have answered my question.
regards
Users browsing this topic
Guest (2)
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.