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

Message ListMessage List     Post MessagePost Message

  JSChartViewer not working as desired!
Posted by Jaideep on Apr-05-2011 05:31
Hi,
I looked at the zooming and scrolling demo(for web) that is included in the download package.
I had previously used the demo code to set it up in a windows 2003 environment using IE7, and it worked fine.
Now, when i set up the same demo on a windows 7 machine with IE8, using the same files as indicated - i am unable to click and select an area to zoom into, instead the whole plotarea gets selected and moves with the mouse.
Is this a known issue? is there any other file i might need for this to work (besides the ones mentioned in the demo)? There might be a need to update the cdjcv.js file.

Please let me know.

thanks,
Jaideep.

  Re: JSChartViewer not working as desired!
Posted by Peter Kwan on Apr-06-2011 01:17
Hi Jaideep,

ChartDirector is extensively tested with IE8.

IE8 has been around for a long time, and we have not received any report for incompatibilities with ChartDirector. Also, even in the forum, you can find post from our customers that said they are using IE8 and the zoom/scroll works normally.

Are you using the original and unmodified sample code that comes with ChartDirector, or is the code written or modified by yourself?

You mentioned that "the whole plotarea gets selected and moves with the mouse". Does it mean that it is dragging to scroll the chart (as if the mouse is in "Pointer" mode in the sample code), or do you mean it is dragging the entire chart image (like dragging an image to the desktop)?

I will send you a link by email that you can use to check if the "Zooming and Scrolling" is working in your Windows 7 IE8 browser.

Regards
Peter Kwan

  Re: JSChartViewer not working as desired!
Posted by Jaideep on Apr-06-2011 02:56
Thanks for the reply Peter.

I am indeed using the unmodified code from the sample.
As regards to the plotarea moving - it is the first option that means it is dragging to scroll the chart (as if the mouse is in "Pointer" mode in the sample code).
Does that give you any hint into what might be wrong.

I will wait for your email to test the drag and scroll issue and get back to you.

thanks,
Jaideep.

  Re: JSChartViewer not working as desired!
Posted by Peter Kwan on Apr-07-2011 00:31
Hi Jaideep,

I have already sent the link to you. Please let me know if it works in your browser.

For the plotarea moving, I assume you have selected the "Zoom In" using the buttons on the left, but the mouse drag is still working as if it is in "Pointer" mode. Does it mean the mouse cursor is still the pointer shape, or does it change to the zoom shape (a magnifying glass shape)?

I am thinking, may be the "Zoom In" button in the sample code and does not really set the mouse usage in ChartDirector to "Zoom In" mode and it is still in "Pointer" mode.

Regards
Peter Kwan

  Re: JSChartViewer not working as desired!
Posted by Jaideep on Apr-07-2011 05:34
Peter,
thanks for the reply.

I guess the mouse was still working in pointer mode, hence the confusion - it works ok now.

I was trying to figure out a way to select a small rectangle on the created image and then zoom-in to the area covered by that rectangle. Your demo does just that, but it uses the webchartviewer form control.

In our application we generate the chart as an Image using the <IMG> tag and not <Chart:WebChartviewer>, is there a way to select an area on the image and zoom in, filert etc, without using the webchartviewer? Please let me know.

thanks,
Jaideep.

  Re: JSChartViewer not working as desired!
Posted by Peter Kwan on Apr-07-2011 14:42
Hi Jaideep,

Apart from the image, ChartDirector would need some more information, such as where is the plot area within the image, the current zoom in ratio, the maximum zoom in ratio, etc.. The WebChartViewer generates the <IMG> tag as well as these information.

There may not be any conflict in usig the <IMG> tag and using the WebChartViewer, because the WebChartViewer itself also generates the <IMG> tag. In fact, the WebChartViewer is a subclass of ASP.NET Image control (the control that represents the
<IMG> tag in ASP.NET).

The key issue would be how to generate the other information (eg. position of plot area) required by zooming/scrolling. The WebChartViewer will encode these information and output them in a hidden tag. The Zooming/Scrolling works only if it can find both the <IMG> tag and the hidden tag.

So for your case, there are two methods:

(a) If you are drawing an XYChart, please consider to use the WebChartViewer for output.

(b) If you are drawing an XYChart, but need to save it to the hard disk so that it can be used later, please save the WebImage (the output of makeWebImage). This object is serializable so you can use the standard .NET method to save it. It contains both the image and the other necessarily information to support Zooming/Scrolling. When you need to display it, please use the WebChartViewer.

(c) If you are not using using an XYChart at all, but just want to use the ChartDirector Javascript library to select a region in a custom image, you would need to create an XYChart and use your custom image as the background image of the chart. You may set the plot area to cover the entire chart and set the edge of the plot area to transparent. Then output the resulting XYChart.

Hope this can help.

Regards
Peter Kwan