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

Colors of the Bars (Columns) Options · View
aazwork
#1 Posted : Wednesday, February 16, 2011 3:55:11 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
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).
regards
Baydalka Volodymyr
#2 Posted : Wednesday, February 16, 2011 4:25:58 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
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 3:26:37 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
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 3:36:35 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
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 5:15:40 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
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 (4)
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.