score:6
unfortunately each point doesn't have a zindex property. but like bubbles mentioned, you can always add the point to the end so that it gets rendered very last and hence shows up on top.
also, instead of looping through all the points and adding styles directly to the element, i would recommend leveraging the states:select
option of highcharts. you can then set a particular style for the selected state and all you need to do is trigger a select()
on the point you want to highlight
marker: {
states: {
select: {
fillcolor: '#00ff00'
}
}
}
here is how you could highlight the point by pushing it to the end and triggering a select()
on it
function highlightpoint(point){
//save the point state to a new point
var newpoint = {
x: point.x,
y: point.y
};
//remove the point
point.remove();
//add the new point at end of series
chart.series[0].addpoint(newpoint);
//select the last point
chart.series[0].points[chart.series[0].points.length - 1].select();
}
score:0
a nuance of the solution above because the above suggestion did not worked for me. i've got a case where the point for the toolip was not clickable in area chart when areas were overlapping although the tooltip was showing.
it worked out by adding in the tooltip formatter the solution above but to the parent group.
tooltip :{
...
formatter () {
this.point.graphic.parentgroup.tofront();
...
}
}
score:3
highcharts are made out of svg elements, which are not directly controlled by things like z-index. however, you still can control what elements are rendered ontop of what - the last element in an svg tree is drawn over the rest, so to promote an element to the front you can just pop it out, and append to the svg element containing the chart.
score:7
update as of 2014
this is an old question, but i thought i would update it for highcharts as of 2014. one can now use the built-in method element.tofront()
which automatically pops and re-appends to the top.
an example to move point at data index i
would then be:
chart.series[0].data[i].graphic.tofront()
and thats all it takes!
Source: stackoverflow.com
Related Query
- How to set the z-index of points on a HighCharts scatter plot?
- how to set the interval of points on Y - Axis highcharts
- Is there a way to plot more than 1000 points in a scatter plot using the Highcharts .NET Wrapper?
- how to set the interval of points on Y - Axis highcharts
- Highcharts - How to set custom colors for the series
- How to convert datetime string to UTC to plot points on Highcharts
- How to convert datetime string to UTC to plot points on Highcharts
- Highcharts Bar Chart - How to set the minimum bar width/length
- Highcharts scatter plot with lots of data points running really slow
- How can I delete all of the points from a highcharts series
- How to add new points to highcharts after plotting the first 'n' points?
- Highcharts (Highstock) how to manually set the navigator selected range
- How do I set the background color of a Highcharts HTML label?
- highcharts pie monochrome: how to set the default color?
- Highcharts - how to set custom content in point tooltip (popup) on 3D scatter chart or how to customize point tooltip information?
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- How to set interval points on the x-axis in HighCharts?
- Highcharts - How to make a scatter plot with multiple series from HTML table
- how to display 2 same highcharts without duplicate the code
- How to get a cubical plot using highcharts 3D scatter chart?
- Highcharts Scatter Plot - How to Fix Overlapping Data Labels?
- Highcharts how to create legends based on the value of points
- How to add an extra label on a scatter plot point in Highcharts Javascript library?
- How do I set the margin to bottom of a chart in HighCharts to zero?
- How to add vertical (and horizontal) line in highcharts scatter plot
- Highcharts - How do I keep both line points in from splitting between the two bar charts
- How do I plot the x axis line using Highcharts when pegged at 0?
- Highcharts how to make legends as data labels on scatter plot
- Adding points to Highcharts 3D scatter chart after the chart has loaded
- How to tell Highcharts to set date on the x axis, and use a range of time (like 1 day)
More Query from same tag
- Highcharts Error 15 if xSeries has number in it
- Generating Highcharts from MySQL data with PHP does not work
- How to format data labels with Jquery Highcharttable column charts
- Highcharts/stock xAxis display only year
- How do i combine a horizontal bar graph with a line chart?
- Reversing Highcharts Y-axis after the chart has been initialized
- Highstock columns overlapping one another even if there is space
- Highchart Line and Range
- Highcharts add single line to column chart
- Highcharts: Dynamically size a solid gauge chart
- Highstock charts - change position of rangeselector From and To inputs
- Highcharts yaxis price line
- HighChart Test React error#13
- Issue with JSON data encoded from the server, not able to plot the chart
- Highcharts display scrollbar when zooming
- Highcharts with Angular
- Region Boundary in Scatter Chart in Highcharts
- Converting JS to CoffeScript, missing operand?
- Angular - Custom DaterangePicker in Highchart
- Highcharts set xAxis values starting 12am and ends in 11pm
- How to cut off the line in highcharts between two pointI
- Highcharts xrange refuses to exhibit drilldown behavior
- Point markers for arearangespline chart in Highcharts
- how to disable highcharts animation on panning but still using on load
- Loading Highcharts with require.js
- Google Charts, HighCharts or ChartJS Dual Axis Gantt Chart and Line Chart Visualization
- How to change the height of a pane in highstock?
- Highcharts : set a maximum number of ticks with a fixed interval
- Can we show the text in bar of timeline chart?
- To pass dynamic json array to Highcharts Pie Chart