-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crosshair intersect value on series #4686
Comments
Hmm.. something like this: http://jsfiddle.net/r7fdh/90/ ? Taken from old question on the stackoverflow: http://stackoverflow.com/questions/19832091/highcharts-crosshair-with-labels-on-axes Note: Basic demo with crosshairs: http://jsfiddle.net/wn026zaa/ |
@pawelfus The crosshair label is available through the Highstock API: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/xaxis/crosshair-label/. This was not documented until today. |
@triforce What you are looking for I think can be expressed as a |
I wrote a drop-in snippet for interpolation, what do you think? |
Perfect thank you! Is there a quick way to turn it off and on? Will this be available in vanilla Highcharts at some point? |
If not mistake, there was plugin for this ? |
@trlforce: You control it via configuration. Basically, the xAxis has a snap crosshair, and the Y axis interpolate: xAxis: {
crosshair: {
snap: false
}
},
yAxis: {
crosshair: {
interpolate: true,
label: {
enabled: true,
format: '{value:.1f}' // One decimal
}
}
},
Maybe, but it adds some weight so we are a bit restrictive. Perhaps we can combine the interpolation logic with other interpolation code and then save some filesize. @karmir |
That's great thanks for the help. I used Axis.update() to turn the crosshairs on and off and combined with your snippet this has given me enough to solve my initial issue. |
Great, you're welcome! |
Sorry, closed the wrong issue. |
Hi @TorsteinHonsi I know that this issue has been closed already but I have a similar requirement using Highcharts for a multiple line series that will display the x (or y) values of where the crosshair line intersects on a series. I have updated your existing fiddle, to show multiple line series. Based on the screenshot below, is it possible to display the x and y values in a fixed tooltip simultaneously of where the crosshair line intersects on a multiple line series? I'm using Highcharts JS v5.0.10 (2017-03-31), and wondered if there's an easy way to interpolate the x and y values on a multiple series on this version? |
This issue is still open* ;) It's not directly supported, because only one horizontal crosshair is supported (for the closest point to the mouse position). However, we can extend Highcharts methods, for example adding more crosshairs. Simple demo for you: http://jsfiddle.net/jqx7y8nn/ - this demo requires secondary yAxis (which of course can be hidden: http://jsfiddle.net/jqx7y8nn/1/). |
Hi! Thank you for all this fantastic work that you do! Question: is it possible to interpolate even if the point is missing? Here: http://jsfiddle.net/3wftc5rk/2/ when the point is missing, the crosshair interpolation would stop in the middle before the missing point and restart in the middle after. Is it possible to keep interpolation without breaks? |
It looks tricky - when there is no point, label is automatically hidden, so even if we calculate the value we will see blinking label which would look really bad: http://jsfiddle.net/BlackLabel/jjrhkz0k/ |
Hello, I have a problem similar to the one you posted .... I have a chart Highchart with many values (contained in a database), my points are all displayed but the problem is that the values displayed on the graphs have been interpolated (they differ slightly from the values contained in my database, would you have a solution to this problem please? |
Hi @JordyLeremon, |
Hi sebastianbochan, |
Thank you @sebastianbochan , that was really the problem however now he shows me the good data but makes me "spades" weird on my graphs .. would you have a solution to this problem please? |
@JordyLeremon |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
I am using a Highcharts chart with a tooltips.crosshairs on the x value (crosshairs: true) - Is it possible to get the x (or y) value of where the crosshair line intersects on a series?
Similar to this http://jsfiddle.net/6me6j77z/ apart from the x and y values in the tooltip are where the crosshair intersects the line.
If this is not currently possible could it be considered as a future option for crosshairs?
The text was updated successfully, but these errors were encountered: