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

Message ListMessage List     Post MessagePost Message

  tooltip for huge data set
Posted by ying on May-12-2011 07:55
Hi, Peter

For example I have a huge data set say about 60,000 data point. I do not want to aggregate the data and but want to draw all the points on the chart. I know I can do it without any problem and it is very fast. But in this case, I can not use getHTMLImageMap to generate the tooltip of the point. Is that possible I have the graph show 60,000 point( of course some point with overlapped), and at the same time, I also can show tooltip when user mouse over for some points(using some strategy and picked from the 60,000 points).

Thanks very much

Ying

  Re: tooltip for huge data set
Posted by Peter Kwan on May-12-2011 17:27
Hi ying,

As you have already known, ChartDirector can render large number of data points very quickly. The bottleneck usually is in the mouse over hot spots. Each hot spot is like a small push button, and it is very time consuming to define 60000 push buttons. If you are writing a web application, the browser may have a hard time to handle the 60000 push buttons on the same web page too.

Yes. It is possible to plot 60000 points, but generate the image map for only a subset of the points. However, before you do that, may be you can consider to simply plot a subset of the points in the first place. For most types of charts, there is simply not enough pixels on the screen for that number of points (a typical computer screen is only 2000 pixels wide, and the chart typically will use around 1000 pixels wide). So if you plot 60000 points, most points will overlap and block other points, and you do not see most of the points anyway. So you just need to plot the points you can actually see. The key is to how to get those points.

The following is a link that shows some examples. The top chart has 50000 points, while the bottom chart has 2000 points. They looks virtually identically, and it is likely a normal user can distinguish which one is which.

http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1301371841#N1301421825

If you can reduce your data to 2000 points and plot it using the method mentioned in the above link, the problem is solved.

However, if you still want to plot all 60000 points, you can use the following method:

(a) Add a line layer to plot 60000 points. Use Layer.setHTMLImageMap to disable the image map for that layer.

(b) Reduce the data to 1000 points. Plot a transparent line layer using the 1000 points. The chart appearance will not be affected because the line is transparent.

When you get the image map, the image map will be obtained from (b) only (because the image map in (a) is disabled). This achieves what you need.

Hope this can help.

Regards
Peter Kwan