rendering of series is slow in line chart

Hello,

I want to apply different colors for different set of points of a series in a line chart according to there value ranges ie like for

values color
0-10 red
11-20 blue
and so on .for this i am using series.preparestyle().but this process is very slow as I am having more than 5000 points.Is there any faster way to do this .like setting color for the color ranges outside preparestyle() and rendering all these points once.I have attached a file for viewing the type of result required.

A quick help will be highly appreciated

Thanks and regards
Ranju Malhotra



chartpoints_a5e418a8.zip

1 Reply

J. J.Nagarajan Syncfusion Team August 11, 2008 12:46 PM UTC

Hi Ranju ,

Currently we don't have anyother method to change the color of individual line segment of the LineChart. The only way you can use PrepareStyle event of the series. However you can improve the performance by setting the below properties.

(i) ChartSeries.EnableStyles: Point Symbols and Point Text will not be visible if set to false.

(ii) ChartSeries.Style.DisplayShadow: This is set to true by default. Turning it off means, your lines will not have shadows (and hence will be rendered faster).

(iii) ChartControl.ImprovePerformance = true;- Improve the performance of the chart control.

(iv) ChartControl.Indexed : Setting Indexed to false speeds up the Chart. This is not a choice for making the Chart faster. If you don''t need a Indexed/Positional Chart, you must set this property to false.

(v) ChartControl.CalcRegions: This property controls Tooltips and AutoHighliting. If this value is set to false, these features will not work.

(vi) chartControl1.AllowGradientPalette: Turned off gradients.

Here is the working sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F75581/main.htm

Please refer to it and let me know if this helps.

Thanks,
Nagaraj



Loader.
Up arrow icon