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

Gradient area plotting

5 Answers 139 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Karl B
Top achievements
Rank 1
Karl B asked on 22 Feb 2019, 06:42 PM

I wish to make a RangdSpline series with a gradient. Similar to what is done in the SurfaceSeries3D

Is this possible in 2D?

5 Answers, 1 is accepted

Sort by
0
Karl B
Top achievements
Rank 1
answered on 22 Feb 2019, 07:06 PM

I've attached an image of the chart I'm trying to replicate

 

 

0
Karl B
Top achievements
Rank 1
answered on 22 Feb 2019, 07:06 PM
I've attached an image of the chart I'm trying to replicate
0
Karl B
Top achievements
Rank 1
answered on 22 Feb 2019, 07:10 PM

Having problems attaching my file. Hopefully the third time works..

0
Martin Ivanov
Telerik team
answered on 27 Feb 2019, 09:45 AM
Hello Karl,

This is not supported by the 2D charts. Maybe you could achieve your requirement by creating a custom gradient brush and applying it to the Fill property of the RangeSplineSeries. However, the success of this approach depends on how exactly you want to color the data. Basically, you can create a LinearGradientBrush and calculate its GradientStop objects based on the data plotted in the series. Then set the brush to the Fill property. Can you try this and let me know if it helps?

Also, we have a feature request for implementing a contour plot visualization - similar to the 3D surface series. 

Also, you can consider using an approach with the 3D surface series. In this case you can try to rotate the camera of the chart (using its Camera property) so that the chart is displayed from a top.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Karl B
Top achievements
Rank 1
answered on 05 Mar 2019, 09:39 PM
[quote]Martin Ivanov said:Hello Karl,

This is not supported by the 2D charts. Maybe you could achieve your requirement by creating a custom gradient brush and applying it to the Fill property of the RangeSplineSeries. However, the success of this approach depends on how exactly you want to color the data. Basically, you can create a LinearGradientBrush and calculate its GradientStop objects based on the data plotted in the series. Then set the brush to the Fill property. Can you try this and let me know if it helps?

Also, we have a feature request for implementing a contour plot visualization - similar to the 3D surface series. 

Also, you can consider using an approach with the 3D surface series. In this case you can try to rotate the camera of the chart (using its Camera property) so that the chart is displayed from a top.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.

[/quote]

The gradient stop approach could work but that will require some calculations to get it correct.

I was unable to get the 3D surface series to work work like I expected. I have started another post in the 3D chart view forum.

 

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