|
Query |
Response | |
|
Is it possible to have the chart line marker sticky once clicked? ie. have the line stay put after clicking on the chart? |
Yes, your requirement can be achieved as workaround using chartClick event. Kindly find the code snippet below to achieve this requirement.
Screenshot:
Sample for reference can be find from below link.
| |
|
Alternatively, can I draw the line myself if I know where to put it? |
Yes, you can able to draw a line in chart if you know the position as like above workaround. |
|
JS:
$("#container").ejChart({
//…
chartMouseMove:'mouseMove',
}
function mouseMove(sender) {
var ser = [], series = sender.model.series[0];
//Get the closest point location using getNearestPoint method, so that you can draw a line
var nearPoint = getNearestPoint(ser, series, sender.data.location.x, sender.data.location.y);
alert("X location: " + nearPoint.point[0].location.X + "\nY Location: " +
nearPoint.point[0].location.Y);
}
|