Line Series as a Gradient

Sep 26, 2013 at 2:01 PM
hello all!

I need a "gradient line series", i will pass as parameters, two colors and two points, the line will start in the first point with the color number one, and will finish at second point with the other color, but in the middle the color must change slowly, change as a gradient ....

I´m thinking in doing that using a lot of scatter points, and changing colors manually, but i don't think this is the best solution.

There another way to do that?
Coordinator
Oct 1, 2013 at 8:20 PM
Edited Oct 1, 2013 at 8:20 PM
You should create a custom series for this and override the Render method.
If you want to draw this as a line, you must call IRenderContext.DrawLine with many small line segments - each with a different color.
Use OxyColor.Interpolate to calculate the colors.