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

Best path to a chart like this?

3 Answers 63 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 13 Sep 2017, 09:40 PM

I need to create a chart like the one I attached. I'm not sure what the best way to do this might be, I may have up to 40 different lines series on the chart at once, so I'm not sure what is the most direct way to get this type of chart, a stacked set of individual charts or some sort of dynamic chart using a category to group the data on the X axis?  Any ideas or examples?

Thanks.

 

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 18 Sep 2017, 10:30 AM
Hi Lee,

The chart supports multiple series, so all you need to do is add them to the Series collection. Here is an example of adding two series to the same chart, the implementation would be identical for LineSeries. To show the point markers, you will need to provide a DataTemplate with an ellipse e.g.

<DataTemplate x:Key="chartPoint">
    <Ellipse Width="8" Height="8" Fill="Black"></Ellipse>
</DataTemplate>

and assign it to series' PointTemplate property.

For so many series, it is likely that you will need to provide distinct colors for each of them. The Custom  Palette feature would come in handy in this case.

An important note here -- you need to make sure all the series have the same values for items' categories -- see the Categorical Series help topic for more details.

In addition, it is possible to generate the series dynamically -- please, see the Dynamic Series chapter in our online help for different scenarios and how they are covered in RadCartesianChart.

Best regards,
Ves
Progress Telerik
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
0
Lee
Top achievements
Rank 1
answered on 26 Oct 2017, 07:51 PM
I was able to get the Ellipse set up with a DataTemplate. Is there a way to get the fill of the ellipse to match the line that it is associated with?
0
Ves
Telerik team
answered on 30 Oct 2017, 09:26 AM
Hi Lee,

You can obtain the information for the series' fill and stroke from the chart palette. In case you have not set any palette, you can explicitly set the default one:

this.chart.PaletteName = Telerik.UI.Xaml.Controls.Chart.PredefinedPaletteName.DefaultLight;
Then you can access the entries through this.chart.Palette.FillEntries and this.chart.Palette.StrokeEntries collections

Best regards,
Ves
Progress Telerik
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
Lee
Top achievements
Rank 1
Answers by
Ves
Telerik team
Lee
Top achievements
Rank 1
Share this question
or