score:0
Accepted answer
You can make it using Highcharts.SVGRenderer
which allows you to plot a rectangle and Highcharts.SVGElement.on
method which allows you to add events on SVG elements (for example series group). Check demo and code posted below.
Code:
chart: {
type: 'xrange',
backgroundColor: '0C0D19',
renderTo: 'container',
marginRight: 100,
events: {
load: function() {
var chart = this,
series = chart.series[0],
seriesSvg = series.group,
seriesSvgBBox = seriesSvg.getBBox(),
width = 80,
height = seriesSvgBBox.height,
y = chart.plotTop + seriesSvgBBox.y,
x,
tooltip;
seriesSvg.on('mousemove', function(e) {
if (tooltip) {
tooltip.destroy();
}
x = e.offsetX - width / 2
tooltip = chart.renderer
.rect(x, y, width, height)
.attr({
fill: 'rgba(255, 255, 255, 0.2)'
})
.css({
'pointer-events': 'none'
})
.add()
.toFront();
});
seriesSvg.on('mouseout', function(e) {
tooltip.destroy();
tooltip = null;
});
}
}
}
Demo:
http://jsfiddle.net/BlackLabel/z2h59pLf/2/
API reference:
https://api.highcharts.com/class-reference/Highcharts.SVGRenderer#rect
https://api.highcharts.com/class-reference/Highcharts.SVGElement#on
Source: stackoverflow.com
Related Query
- How to make hover effect for two bar in highcharts at the same time is there any way by using css or any inbuilt method to achieve this?
- Highcharts: make y-axis extremes the same for two data series with different units
- how to display 2 same highcharts without duplicate the code
- How to merge two Highcharts container with the same legend-item
- How to make two charts using highchart show up in the same line side by side using div
- Highcharts how to align two charts yAxis on the same line
- Highcharts - How do I keep both line points in from splitting between the two bar charts
- Display a tooltip for two points with exactly the same time
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- How to position the dataLabel for highcharts on the same side of the x-axis?
- Highcharts : Two marker symbol for the same point
- Is there any way to disable hover action on particularly some nodes in networkchart of highcharts based on the node color.?
- Highcharts with shared and split tooptip, Is there any possible to style the hover xAxis labels?
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- HIGHCHARTS How to to make separate colors for shaded region and the line in Area Graph
- How to update the HighCharts title using drill-up when there are multiple charts on same page?
- How to draw two series in the same chart that has different data time in xAxis
- How to make highcharts default to 0 for missing data
- How can i hide all the Series in highcharts at a time
- Highcharts - How to set custom colors for the series
- Highcharts Bar Chart - How to set the minimum bar width/length
- How can i keep the color the same in highcharts
- How to completely disable the mouse/finger interaction for highcharts
- How to set the x value for High Charts error bar
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- How to customize the crosshair Line for Highcharts
- How to make x-axis tickmarks span the entire bar chart?
- Highcharts basic bar graphs. How to remove strokewith from the bars
- How do I put Icons in the y Axis for a Dynamic Highcharts chart?
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
More Query from same tag
- Highcharts - not able to resize onclick a button in angular 6
- Reset default zooming and navigator in Highcharts (ng-highcharts).
- How to change HighChart xAxis timeline to match local time and not UTC?
- Bar chart creating gap in timeline
- Highcharts + Plotband tooltip hover + default styling
- fix height of column in stacked percentage column highcharts
- Highcharts line charts not displaying all the dates
- Highcharts, highslide and ReportViewer
- How to input plot data into highcharts with rails
- Highcharts: show data labels as relative value (percentage) on hover
- How to get access to previous value on formatter of xAxis label , Highcharts?
- customize Highcharts tooltip on marker points and show default tooltip on the other points
- How to create a legend for bar colors in a Highcharts bar chart
- How to set intervals for multiple y-axis in Highcharts?
- Load values for high Chart Values in jquery
- HighChart Tooltip different suffix values
- how to display chart in jquery?
- Removing zoom in/out from Highmaps
- Memory leak using Highcharts + AngularJS
- How to add an extra label on a scatter plot point in Highcharts Javascript library?
- Highcharts - bubble diagram need smaller bubbles infront of bigger
- How to get month name from ISO date using moment js
- Highchart tooltip issue
- Show Pie Chart Name as Title
- Can't disconnect line chart with [null,null] and irregular intervals in Highcharts
- Highcharts disabling marker not working
- Unable to customize the box to short single line in 'boxplot' type Highcharts
- Highcharts Y Axis overlay while re-rendering with React
- Highcharts - x axis incorrect date labels appearing
- How to remove blank spaces between xAxis labels?