jameshwart lopez
jameshwart lopez

Reputation: 3131

Mpandroichart (Horizontal chart) set each bar a different color

Im trying to change the horizontal bar color if the yValue is negative then the bar should be red and if not it will be the default one.

I have gone to

 bardataset.setColor(Color.RED);    

 set1.setColors(ColorTemplate.VORDIPLOM_COLORS); 

but this is also not the one im looking.

I want to set a bar color based on the yValue , but the above code will set all the data set to color red and

set1.setColor(colorTemplate.VORDIPLOM_COLORS); 

is some what a random color for the bar.how can i do that?

Upvotes: 1

Views: 393

Answers (1)

Philipp Jahoda
Philipp Jahoda

Reputation: 51411

Unfortunately setting colors based on the value is not yet possible.

I am working on including such a feature in the future.

Upvotes: 1

Related Questions