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

Message ListMessage List     Post MessagePost Message

  In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Subodh Joshi on Nov-12-2010 16:45
Hello Mr.Peter,
Can in the Image we can show a Link ,like in my case i m Showing the Company name but i will want to Show link inside the Image can it is Possible.Something like
m.addPlotAreaTitle(Chart.TopLeft,  "<a href=\\"http://www.askkuber.com\\" title=\\"Indian Stock market\\">");

Thanks

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Peter Kwan on Nov-13-2010 02:44
Hi Subodh,

You may refer to the sample code "Custom Clickable Objects" on how to make a custom text (such as your company name) clickable.

Hope this can help.

Regards
Peter Kwan

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Subodh Joshi on Nov-15-2010 15:07
Attachments:
Hello Mr.peter i tested ur suggestion "Custom Clickable Objects" and i was able to add Java Script link on candle Stick but i m not able to add link on the company name like Satyam Computer Services be a Link and User will go anyother page rather than a static name.I m not able to show company Name as a Link can u plz Guide me how can i modify this
m.addPlotAreaTitle(Chart.TopLeft, Suggest);
*Suggest is the company Name

THanks for ur time
companyLinkIsse.jpg

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Peter Kwan on Nov-16-2010 01:27
Hi Subodh,

Please change your code to:

ChartDirector.TextBox copyRight = m.addPlotAreaTitle(Chart.TopLeft, Suggest);

Then following the code example in "Custom Clickable Objects" to produce the image map, that is, after you have created the chart image, please add the line:

String copyRightCoor = copyRight.getImageCoor();

The please add the followings as part of the image map:

<area <%=copyRightCoor%> href='javascript:popMsg("the copyright message");'
    title='The copyright text is clickable!' />

I realize you may be using a different framework (JSF?) and your code may be different. If the above still cannot solve the problem, would you mind to inform me your exact code that you use to generate the image map?

Hope this can help.

Regards
Peter Kwan

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Subodh Joshi on Nov-18-2010 17:03
Hello Mr.Peter u r right i m using JSF Framework ,As U Suggested i made changes in My bean Now i m not able to make Changes in JSF page for this code
<area <%=copyRightCoor%> href='javascript:popMsg("the copyright message");'
    title='The copyright text is clickable!' />

How I will Integrate this Code in my Jsf Page ?,Right Now i m Using this Code to Draw Chart

<h:graphicImage url='#{techChartManager._url}' usemap="#map1" style="border:0"  >
   </h:graphicImage>
         <h:outputText escape="false" value="#{techChartManager._imageMap}" />

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Subodh Joshi on Nov-18-2010 20:58
Hello Mr.Peter I added this Code in My Jsf Page
  <area   coords="#{techChartManager._fetchCopyRightCoor}" href='javascript:popMsg("the copyright message");'/>

But Company Name looking Like a static Field

and Bean Changes r look like this

_fetchCopyRightCoor= chartbean.getCopyRightCoor();

TextBox copyRight;
if (Suggest != null && Suggest.length() > 0){
copyRight = m.addPlotAreaTitle(Chart.TopLeft, Suggest);
    copyRightCoor = copyRight.getImageCoor();
}

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Peter Kwan on Nov-19-2010 00:46
Hi Subodh,

In JSP, the HTML code:

XXX
YYY

means appending YYY to XXX in the output. In Java, to append "YYY" to "XXX", the code is "XXX" + "YYY". So for the area tag, the code in Java is:

imageMap += "<area " + copyRightCoor + "href='javascript:popMsg(\\"the copyright message\\");' title='The copyright text is clickable!' />";

In the above, I assume imageMap is the varaible that you are using to store your existing image map, without the ending </map> tag (so you can add image map to it). (I assume you are already using image map in your code.)

Note that like all image map code, the getImageCoor must be called after the chart is drawn. In your message, you seem to call it immediately after addPlotAreaTitle. This may not work.

Also, as shown in the sample code, there is no need to have "coords" in the area tag.

If the above still cannot solve the problem, you can look at your HTML. You should find the image map, and check if the syntax is correct.

Hope this can help.

Regards
Peter Kwan

  Re: In technical Chart image can we Show a Link rather THan Showing Company Name
Posted by Subodh Joshi on Nov-19-2010 16:54
Thanks Mr.Peter I achieved which i want to display in chart.
thanks for ur valuable time and suggestions.