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

Message ListMessage List     Post MessagePost Message

  How to create temperary URL for chart
Posted by Dilip Agarwal on Aug-06-2013 21:16
Hi , In my application I am creating chart with No Legends as I show the legends with javascript in a div. Now I want to export the chartImage as it is in a new window and there I have to show the legends in chart.

For this I try below code

    chartQuery = c.makeSession(Session, viewer.Id)
    viewer.ImageUrl = "getchart.asp?" & chartQuery
    Call c.addLegend(50, 330, False, "", 8).setBackground(cd.Transparent)
    exportViewer ="getchart.asp?" & c.makeSession(Session, "chartExport"&viewer.Id)
    session("exportImageURL")=exportViewer

Now When I call URL from session("exportImageURL") then it shows the image with No Legends. Please tell me how can I do this.

  Re: How to create temperary URL for chart
Posted by Peter Kwan on Aug-07-2013 01:24
Hi Dilip,

If the legend is drawn using Javascript (as in the "Programmable Track Cursor" sample code), then the legend is drawn on the browser side, and the exact legend depends on the mouse position. The server does not know what has been drawn. So you cannot ask the server for the chart image with the legend. Also, in your code, you are creating the URL before the image has been delivered to the browser. So it is impossible for the server to know what would the legend box be (as it depends on user mouse position, which can only occur after the image is delivered to the browser).

For your case, if you would like to include the legend box as chosen by the user (by moving the mouse on the chart), you would need to write Javascript code to ask the browser to move the chart image and the DIV to a new window.

Hope this can help.

Regards
Peter Kwan

  Re: How to create temperary URL for chart
Posted by Dilip Agarwal on Aug-07-2013 13:32
Hi Peter, so is this possible in partial update that update does not reflect to chart on the
browser but just create image

  Re: How to create temperary URL for chart
Posted by Dilip Agarwal on Aug-07-2013 19:52
Thanks Peter, I solve this.