Page 1 of 1

HTML Image Maps using CalXPos and CalcYPos

Posted: Wed Jun 30, 2004 7:28 am
by 6919501
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

Eureka I've figured it out!

Posted: Thu Jul 01, 2004 4:33 am
by 6919501
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

Posted: Thu Jul 01, 2004 7:34 pm
by Pep
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.