Jump to content
Software FX Community

Image Map Name not getting set


Recommended Posts

Hi , i have 4 charts to be displayed in One page , and am achieving this using an ajax call which generates the charts using the same page...To distinguush between the charts i am trying to set the ID as shown in the code that follows. However , the Image Map name for Each of the 4 charts is still "Chart1" . All charts have URLs on the points being plotted , but when rendered , the Map being used has the name "Chart1" and so all the 4 charts display hrefs at the position of the point on the first chart.

Am i issing something here?? Do i need to have different object identifiers for the 4 different charts?



ChartServer chart1 = new ChartServer(application,request,response); if(chartNumber==0){ chart1.setID("chart1"); }else if(chartNumber==1){  chart1.setID("chart2"); }else if(chartNumber==2){  chart1.setID("chart3"); }else if(chartNumber==3){  chart1.setID("chart4"); }

chart1.getXValue().setItem(0, i,((MyObject) MyObjectListget(i)).getXValue( )  ); chart1.getValue().setItem(0, i,((MyObject) MyObjectListget(i)).getYValue( ));

 chart1.getPoint().getItem(0, i).setURL("javascript:sh...");


<%=chart1.getHtmlTag("367","241","Jpeg") %> 

Link to comment
Share on other sites

Thanks for the prompt reply GabrielA,

There is only one Chart object as the page itself id loaded 4 times, and is displayed in 4 divs populated on AJAX calls,

I have used setID based on the chartNo , please note this in the code, also as mentioned  in a reply posted by me , on printing the values of the ID before and after the <%=chart1.getHtmlTag("367","241","Jpeg") %> , there is a difference in the IDs, after the call , the ID seems to be getting RESET to "Chart1".

Link to comment
Share on other sites


I guess i was on the right track and so the obvious was to try this...ie...use a different getHtmlTag which takes the chart ID .... But the behaviour of the intially used method seems to have a hard-coded set call to change the name .i smell a BUG!


<% if(chartNumber==0){ %> <%=chart1.getHtmlTag("367","241","Jpeg","chart1") %><% }else if(chartNumber==1){ %> <%=chart1.getHtmlTag("367","241","Jpeg","chart2") %><% }else if(chartNumber==2){ %> <%=chart1.getHtmlTag("367","241","Jpeg","chart3") %>  <% }else if(chartNumber==3){ %> <%=chart1.getHtmlTag("367","241","Jpeg","chart4") %>  <% }%>  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...