Set background image for Chart

1 Answer 424 Views
Chart ChartView
Fredrik
Top achievements
Rank 1
Veteran
Iron
Fredrik asked on 04 May 2021, 02:41 PM

Is it possible to set an background image for a RadCartesianChart.

Or change the stroke fill color depending on the value at the point?



<telerik:LineSeries.StrokeShapeStyle>
   <Style TargetType="Path">
        <Setter Property="Fill" Value="Red"></Setter>
   </Style>
</telerik:LineSeries.StrokeShapeStyle>

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 05 May 2021, 01:24 PM

Hello Fredrik,

You can use the PlotAreaStyle property to set the Background of the Border element that represents the plot area of the chart. The background can be assigned to an ImageBrush object.

About the different colors in the line's stroke of a single series, this is not supported. Instead, you can consider using plot band or similar annotation to mark the different sections of the data. Or you can display the default visual elements (ellipses) and color them based on the data point's value.

Regards,
Martin Ivanov
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
Chart ChartView
Asked by
Fredrik
Top achievements
Rank 1
Veteran
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or