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

Message ListMessage List     Post MessagePost Message

  Runtime error with chartdirector zooming function
Posted by Eva on Dec-25-2018 13:56
I have a gantt chart that shows employee's project information.
I enhanced the zooming function and everything worked fine.
But when I choose many employee it will show an error message.

Automation Errors - run-time '-21474417848 (80010108)' .
"Object has disconnected from its clients"

And it point out the error code was:
viewer.ImageMap = c.getHTMLImageMap("clickable", "", "message need to show")

After I marked this code it will work fine.
But I need this code to show message on the chart.
Is there any way to solve this?

  Re: Runtime error with chartdirector zooming function
Posted by Peter Kwan on Dec-26-2018 18:42
Hi Eva,

By "many employees", would you mind to clarify how many records do you have in your gantt chart, that is, what is the size (the number of elements) in the data arrays?

If there are many bars (eg. over 10000 bars) in the gantt chart, there is a possibility of out of memory or resource issues when using hot spots. A hot spot is like a small push button on the screen. It can response to mouse events (mouse click, pop-up tool tip, etc). Plotting 10000 or 100000 bars are easy for ChartDirector. However, creating 10000 push buttons might take up a lot of memory or resources.  For large data sets, the image map often consumes much more memory than the chart itself.

I remembered I provided a simple example of a zoomable and scrollable gantt chart in VB6 to you around a month ago. In that example, all data are passed to ChartDirector, even if only a small part of the data are visible due to zooming in. This is for simplicity and it should work for a few thousand bars. If you have a large number of bars, it is suggested you only pass the visible data to ChartDirector to reduce memory consumption of the image map. I have attached an example for your reference.

If you must display a large number of bars in one chart, you may consider using an "If" statement to disable the image map when the number of bars exceed a certain limit.

If the above is not the cause of the problem, is it possible to try to break the image map code into two lines and save the image map like:

Dim temp As String
temp = c.getHTMLImageMap("clickable", "", "message need to show")

Debug.Print "Size = " & Len(temp)

... some code to save the contents of "temp" into a file ....

viewer.ImageMap = temp

With the above code, if the c.getHTMLImageMap works normally (that is, the code crashes in the "viewer.ImageMap = temp" line), the debugger should display the size of the image map. Please also try to add some code to save the image map to a file. If the file is a few MB (after zipping), you may email it to me for analysis. My email is If the image map is very large, you may need to find a place to upload the file so I can download it.

Peter Kwan

4.37 Kb

  Re: Runtime error with chartdirector zooming function
Posted by Eva on Dec-27-2018 13:59
Hi Peter,

Turns out it was my code design problem.

I check the ImageMap string and found out that it include many duplicate value.
After doing some adjustment to my code, its length turns 1 million from 15 million.
And it works fine now.

Thank you for your reply, it gives me a way to find the problem.