ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Avoid Renedering Time
Posted by Amal V R on Mar-29-2011 12:10
Hai Peter

I require your help to avoid rendering time.When the data input to the graph control is large  suppose 30000 double values which is the maximum allowed size,during rendering it takes more than 1's to render,which is not agreeable.So only way i got is taking the aggregate,but when doing so the actual wave form is lost,which is also not agreeable.
I think taking aggregate is the only solution to avoid rendering time but I have maintain the graph shape too...How can I do this? What kind of aggregation should i take?

I hope your kind help and support.

Kind Regards

Amal V R

  Re: Avoid Renedering Time
Posted by Peter Kwan on Mar-30-2011 02:03
Attachments:
Hi Amal,

I think plotting 30000 data points should not need 1 second (but of course it depends on the CPU speed and the number of pixels on the chart). Are you using image maps (for tooltips and/or clickable hot spots)? Although plotting 30000 data points can be fast, creating 30000 hot spots may not be fast. (Each hot spot is like a tiny push button on the screen. Imagine putting 30000 push buttons on the screen and the time it takes.) If the time is mainly spent by generating the hot spots, you may consider not to use image maps for the chart.

Also, are you sure the time is all due to chart rendering, and not database access? Depending on the speed of your database, it may take some time to read data from the database as well.

Anyway, if you want to aggregate the data, you may use max/min aggregation if your intention is to preserve the envelope of the data. I have attached 3 charts for your reference.

(1) The first chart is a chart plotting with 50000 data points.

(2) The second chart is plotted with 1000 data points, aggregated using avergaging.

(3) The third chart actually contains 2 lines. The first line contains 1000 data points by aggregating using the maximum values. The second line contains 1000 data points using the minimum values. Then an additional interline layer is used to fill the region in between the two lines. This preserves the envelope of the data.

The aggregation usually is performed by using a suitable SQL aggregate query. It speeds up the database as the database only needs to return 1000 (in case 2) or 2000 values (in case 3). It also speeds up image map generation, and the chart only has 1000 or 2000 hot spots.

Hope this can help.

Regards
Peter Kwan
chart_50000_points.png
chart_resample_avg_1000_points.png
chart_resample_max_min_1000_points.png