Modify color of PointSeries in code?

3 posts, 0 answers
  1. Kyle
    Kyle avatar
    10 posts
    Member since:
    Dec 2013

    Posted 03 Feb 2015 Link to this post

    I am charting multiple PointSeries.  I am creating each PointSeries in code.  How do you control the color of each PointSeries?

    var chartViewModel = Grid.DataContext as ChartViewModel;
    var pointSeries = new PointSeries
        ItemsSource = chartViewModel.DataPoints,
        CategoryBinding = new PropertyNameDataPointBinding("DateTime"),
        ValueBinding = new PropertyNameDataPointBinding("Point"),
        PointSize = new Size(3, 3)

    <telerik:RadCartesianChart x:Name="Chart">
            <telerik:LinearAxis LineThickness="1"
            <telerik:DateTimeCategoricalAxis DateTimeComponent="Minute"
                                             LabelFormat="M/d H:mm"
            <telerik:CartesianChartGrid MajorLinesVisibility="XY" />

    Thanks in advance!
  2. Kyle
    Kyle avatar
    10 posts
    Member since:
    Dec 2013

    Posted 04 Feb 2015 in reply to Kyle Link to this post

    Better yet, is there a way to just randomly assign colors to multiple series?
  3. DevCraft R3 2016 release webinar banner
  4. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 06 Feb 2015 Link to this post

    Hi Kyle,

    You can check our documentation to see how the color of the series can be changed. I hope this information will get you started.

    Please do not hesitate to ask if you need any further assistance.

    Pavel R. Pavlov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top