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

Message ListMessage List     Post MessagePost Message

  Floating data box using JQuery
Posted by icm63 on Jul-26-2012 17:36
Attachments:
Can I replace a Javascript function with a JQuery function to draw a floating Data box over a chart on the X.Y point of cross hairs.

I have cross hairs already via Jquery. just want to know if I can send chartDir data into a jquery function, similar to the Javascript function

Currentlt using this ...

Dim showText As String = "onmouseover='Javascript:ShowChartDataVOL1" & ChartID.ToString & "(""{xLabel|mm/dd/yyyy}"",""{value|2}"",""{high|2}"", ""{low|2}"", ""{open|2}"", ""{close|2}"",""{x}"");'"
myChart.ImageMap = mainXYChart.getHTMLImageMap("", "", showText)


Want to do this ..

Dim showText As String = "onmouseover='$(document).ready(function(){ etc }

If so do you have examples?

If so I can send data into the Jquery and place it the KY of the cursor and then display data from the chart in a floating DIV

My cross hairs function address looks like this:

var verticalColor = '#FF0000';
var horizontalColor = '#FF0000';
var thick = 1;
var index = 0;

$(document).ready(function() {
    options = { h_color: horizontalColor, v_color: verticalColor, thickness: thick };
    $("#<%= divCrossHairs.ClientID %>").crosshair(options);
});
Demo.png

  Re: Floating data box using JQuery
Posted by Peter Kwan on Jul-27-2012 00:12
Hi icm63,

The onmouseover can call anything you like. For example, in your existing code, ShowChartDataVOL1xxx function can call JQuery or any other things you like. ChartDirector does not restrict you on what can be put in your own  ShowChartDataVOL1xxx function. So you are free to put JQuery code in ShowChartDataVOL1xxx to achieve the things you would like to do.

Regards
Peter Kwan