This is a migrated thread and some comments may be shown as answers.

set bar chart bar colour based on value

1 Answer 29 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
paul
Top achievements
Rank 1
paul asked on 02 Aug 2016, 11:50 AM

I am using a custom bar renderer to set the bar colour based on the value

protected override void RenderPointCore(Canvas canvas, DataPoint point)

However there doesnt seem to be a "Value" attribute ie point.Value.

I have created a bodge woraround comparing bar height with canvas height

Am i missing something?

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 02 Aug 2016, 02:37 PM
Hi Paul,

Thanks for writing.
You are on the right track. All you have to do is cast DataPoint to CategoricalDataPoint. DataPoint is the base class for our data points. CategoricalDataPoint has getValue() and getCategory() methods.
Please write again if you need further assistance.

Regards,
Victor
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
paul
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or