HTML Image Maps using CalXPos and CalcYPos

TeeChart for ActiveX, COM and ASP
Post Reply
Drakeo
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am
Location: Melbourne

HTML Image Maps using CalXPos and CalcYPos

Post by Drakeo » Wed Jun 30, 2004 7:28 am

Hi Steema Group,

I'm currently going through one of your examples for Tchart v5 activeX provided in the "ASP Sever Examples" menu item, i'm trying to replicate the code within the "Create a static Chart image export with hotspots" example. I've imported the chart on the server and i'm trying to generate the hotspots on the serverside as well by calling the 'GenerateChartHotSpot' function included in your example. The problem is that some of the code relies on "CalcXPos" and "CalcYPos" which result in zero values, there are a few other properties like "Aspect.Height3D" and "Aspect.Width3D" which also result in a zero value.

I've concluded that the chart hasn't yet been drawn and have tried using the function 'RefreshData' to try and draw the chart.

I've looked around the newsgroups and found that someone else had a similar problem and was instructed to place the code in the "chart_OnAfterDraw" event (see http://216.101.185.148/scripts/isapi.dl ... le=5191736) but because the code is being run from a single call to the server it doesn't seem to draw the chart or catch any events. Is there anyway to force the chart to draw?

The chart has definately been populated as the seriescount property indicates series exist.

Regards,
Michael Horvath

Drakeo
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am
Location: Melbourne

Eureka I've figured it out!

Post by Drakeo » Thu Jul 01, 2004 4:33 am

Hi Steema Group,

I've found out how to force a chart refresh simply by doing a stream export to a dummy variable. If this isn't the best way to achieve a forced drawing of the chart please let me know. Further to this example do you have any more chart maping examples? The one given only supports Bar, Line and Point charts. Do you have them for Area charts or more importantly Pie charts. With my Pie charts I have split multiple pie's up using the chartRect function. Anymore mappings would be appreciated.


Cheers,
Michael Horvath

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Jul 01, 2004 7:34 pm

Hi Michael,

I've posted one VB project into the steema.public.attachments newsgroup which show you how to calculate the map for the Pie Series.

Post Reply