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

Message ListMessage List     Post MessagePost Message

  Adding a mouse tip for graphs created in chartdirector
Posted by olybobo on Jul-07-2010 03:33
Dear all;

I have a graph created with chartdirector, however I would like a situation when then the mouse is over the graph for a particular point, the numbers associated with the point should show in space. so for example, if you point on the graph and the number associated with that pont for the y-axis is 7, then once the mouse is over the point, the 7 should come up. How do you do that in chart director. Thank you.

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by olybobo on Jul-07-2010 10:22
i am already using the following syntax and it is not working. please see my syntax below. thank you

aspx.cs

string showText =
        "onmouseover='showInfo(\\"{xLabel}\\", {value}, {field0}, {field1});' ";

aspx

<script type="text/javascript">

function showInfo(year, info1, info2, info3) {
    var obj;
    if (document.getElementById)
        //IE 5.x or NS 6.x or above
        obj = document.getElementById('detailInfo');
    else
        //IE 4.x
        obj = document.all['detailInfo'];
}

***also keep in mind, i am reteriving my data one at a time and using a for loop and array for that. One the first data is gotten it is plotted. I am running out of ideas right now and i need all the help i can get thank you.

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by Peter Kwan on Jul-07-2010 16:05
Hi olybobo,

Most of the sample code that comes with ChartDirector for .NET have pop up tooltips support. When you move the mouse over a data point, it will show a pop up tooltip.

For example, if the sample code works and shows tooltips normally, but it does not work in your own code, you would need to inform me of your code. It is hard for me to trouble-shoot your code without seeing your code. You may attach your code (both the aspx and aspx.cs) with your message, or you may email them to me at pkwan@advsofteng.net.

(The "showInfo" code you have included in your message does not seem to do anything at all. Would you mind to clarify what is the purpose of the "showInfo" code?)

Regards
Peter Kwan

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by olybobo on Jul-07-2010 20:52
I dont know how to do it. I am just trying things. Can you please show me a sample example. I am not about to find it unfortunately.

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by olybobo on Jul-07-2010 21:56
ok, I finally figured it out. I am using the following syntax


  WebChartViewer1.ImageMap = c1.getHTMLImageMap(" ", " ", "title='{xlabel}: {value}'");

However, I dont want the points or the graph to be clickable though.

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by Peter Kwan on Jul-08-2010 02:50
Hi olybobo,

If you do not want the point to be clickable, please use an empty string as both the URL and the query parameter. (In your case, the URL and the query parameter are both a space character, not an empty string.)

For example:

WebChartViewer1.ImageMap = c1.getHTMLImageMap("", "", "title='{xlabel}: {value}'");

Hope this can help.

Regards
Peter Kwan

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by kranti on Sep-15-2010 18:50
Hi

I have multiline  graph dispalying four double arrays.

Chart.LineLayer Excelline = comboChart.addLineLayer();
        Excelline.addDataSet(F1, 0x000099, "Total");//F1 is double array consists data

Excelline.setHTMLImageMap(" ", " ", "title='Count on {xLabel}: {value} '");

OR
       WebChartViewer1.ImageMap = comboChart.getHTMLImageMap(" ", " ", "title='{xlabel}:{value}'");


I have used both the above lines of code but failed to get a tooltip when i point mouse on lines.


Could any please help where iam missing and what the {xLabel} and{value} means here and how the data fetches to these xLabel and value.

Thanks and Regards,
Kranti

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by kranti on Sep-15-2010 20:10
Hi

I have multiline  graph dispalying four double arrays.

Chart.LineLayer Excelline = comboChart.addLineLayer();
        Excelline.addDataSet(F1, 0x000099, "Total");//F1 is double array consists data

Excelline.setHTMLImageMap(" ", " ", "title='Count on {xLabel}: {value} '");

OR
       WebChartViewer1.ImageMap = comboChart.getHTMLImageMap(" ", " ", "title='{xlabel}:{value}'");


I have used both the above lines of code but failed to get a tooltip when i point mouse on lines.


Could any please help where iam missing and what the {xLabel} and{value} means here and how the data fetches to these xLabel and value.

Thanks and Regards,
Kranti

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by Peter Kwan on Sep-15-2010 23:41
Hi kranti,

You can use either:

Chart.LineLayer Excelline = comboChart.addLineLayer();
        Excelline.addDataSet(F1, 0x000099, "Total");//F1 is double array consists data

Excelline.setHTMLImageMap(" ", " ", "title='Count on {xLabel}: {value} '");
....

WebChartViewer1.ImageMap = comboChart.getHTMLImageMap("")

or


Chart.LineLayer Excelline = comboChart.addLineLayer();
        Excelline.addDataSet(F1, 0x000099, "Total");//F1 is double array consists data

....

WebChartViewer1.ImageMap = comboChart.getHTMLImageMap("", "", "title='Count on {xLabel}: {value} '");


If you think you are not getting tooltips, please provide me with the complete charting part of the code, as well as the output of your ASPX. To obtain the output of your ASPX, please use IE to view your web page, then select "File/Save As" in IE, and save the result as a web archive.

The issue may be due to some other parts of your code or your web page. For example, there issue ma be caused by some other lines in your code, or the ordering of the statements in your code, or there may be a CSS entry or a third party Javascript library that has the effect of disabling the tooltips, etc.. With your charting code and ASPX output, I may try to trouble-shoot which would be the cause of the problem.

Regards
Peter Kwan

  Re: Adding a mouse tip for graphs created in chartdirector
Posted by kranti on Sep-16-2010 14:23
Thank you very much Peter . I have reordered the statement and i have got it .

once again thanks for your quick reply.

bye
kranti