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

RadChart - Progamatically datapoint color

1 Answer 29 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Nuno
Top achievements
Rank 1
Nuno asked on 20 Oct 2012, 09:37 PM

Hi,
I'm working with a progrmatically radchart.
The problem i'm facing is how to set the color for each datapoint on the Dataseries?
Is it possible to, programatically, add a different color to each datapoint?



InvokeOperation<Dictionary<string, int>> MonthFamily = dbcontext.GetTestCaseResultsByFamilyByDay(day, month, year);
 
foreach (var monthFamily in MonthFamily.Value)
         {
          testsbyfamily.Add(
new DataPoint(monthFamily.Key.TrimEnd(), monthFamily.Value) { LegendLabel = monthFamily.Key.TrimEnd() });
          }


Thanks,

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 24 Oct 2012, 05:06 PM
Hello Nuno,

In this demo you find an example of binding the data point color to a property of the underlying data item.

Regards,

Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Nuno
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or