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

Linear Series with gradient fill

1 Answer 26 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 26 Nov 2020, 07:31 AM

Hi

I've a question: I would like to create a live chart view (with measurment points, updated every second) combining 2 styles:

- A simple threshold bar

- A gradient mountain style (gradient could be fix from min to max of the y axis)

Is this possible with Telerik chartviews (how), or do I have to use some other chart packages like scichart?

I've attached an example, what I want do create...

best regards

Patrick

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 30 Nov 2020, 08:52 AM

Hello Patrick,

To achieve your requirement, you can use a RadCartesianChart with an area series for the mountain visualization and an annotation for the threshold bar. There is no built-in colorization for the chart, but you can achieve your requirement by using a LinearGradientBrush. You can calculate the gradient stops based on the vertical axis' range. Then you can assign the gradient brush to the Fill property of the area series.  

There is an approach that shows how to create a gradient brush based on axis values in the First Look demo of RadChartView3D. You can check the gradient legend control placed on the right side of the chart.

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ChartView
Asked by
Patrick
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or