score:59
you need to set the tooltip
attribute to false
, like so:
tooltip: { enabled: false },
here's the full code for your case:
var chart = new highcharts.chart({
colors: ['#0072bc', '#bfdaff', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#fff263', '#6af9c4'],
credits: { enabled: false },
tooltip: { enabled: false },
chart: {
renderto: 'container',
backgroundcolor: 'rgba(255, 255, 255, 0.1)',
type: 'pie',
margin: [0, 0, 0, 0],
spacingtop: 0,
spacingbottom: 0,
spacingleft: 0,
spacingright: 0
},
title: { text: null },
plotoptions: {
pie: {
allowpointselect: false,
size: '100%',
datalabels: { enabled: false }
}
},
series: [{
showinlegend: false,
type: 'pie',
name: 'pie chart',
data: [
['mobile', 65], // first half of pie
['other', 35] // second half of pie
]
}]
});
score:0
i usually just disable the style in css so i can still access the hover event in js if needed...
.highcharts-tooltip {
display: none;
}
score:0
as specified in the accepted answer, you need to set
tooltip: { enabled: false }
note - you must specify this as a property of your highcharts.options
object (i.e. your chart options object, not a property of your series). so, either specify it in the json that you pass into your highcharts.chart
object, or specify it as a property of a highcharts.options
object that you explicitly create, before you pass it to you highcharts.chart
score:2
you can simply disable it by setting the option
tooltip:{
enabled: false
}
score:2
in order to completely turn off tooltip and hover effects on a chart, it is needed to turn off the tooltip, disable hover state and set inactive data opacity to 100%.
this answer is based on previous answers and shows a complete solution to the problem.
this is the configuration which turns off the hover and tooltip effects:
series: {
states: {
hover: {
enabled: false
},
inactive: {
opacity: 1,
}
}
},
tooltip: {
enabled: false
}
score:4
plotoptions: {
series: {
states: {
inactive: {
opacity: 1,
},
},
}
}
i did this to display multiple line charts on hover.
score:5
you can simply turn them of using the following:
tooltip: {
enabled: false
},
score:12
the title of the question is about disabling hovering, so in case anyone else finds themselves here for that purpose, i'll elaborate on @sergeyb's answer.
there are a few options that affect how mouse hovering changes a series' styling. they each have different effects depending on the series type. i'll talk about line and pie series here, but generally, you can look under plotoptions.<seriestype>.states.hover
for styling applied to the currently hovered series and plotoptions.<seriestype>.states.inactive
for styling applied to the non-hovered series (e.g. plotoptions.pie.states.hover). none of these options affect the tooltip styling.
plotoptions.series.states.inactive
plotoptions.series.states.inactive affects the styling applied to all series that aren't currently being hovered over. to prevent them from fading into the background, set plotoptions.series.states.inactive.opacity
to 1.
var chartoptions = {
// ...
plotoptions: {
series: {
states: {
inactive: {
opacity: 1,
},
},
},
},
}
plotoptions.series.states.hover
plotoptions.series.states.hover affects the styling applied to the series that's being hovered over. for example, for a line series, the default is to thicken the line width and apply a halo to the nearest point.
to disable any styling of a currently hovered line series, set plotoptions.series.states.hover.enabled
to false.
var chartoptions = {
// ...
chart: {
type: "line",
},
plotoptions: {
series: {
states: {
hover: {
enabled: false,
},
},
},
},
}
unfortunately, if we set this on a pie series, this will make the hovered slice fade into the background with the rest of the inactive slices (see this jsfiddle for an example). if we want to remove all hover styling without affecting the inactive styling, we can set plotoptions.series.states.hover.halo.size
to 0 (which removes the halo) and plotoptions.pie.states.hover.brightness
to 0 (which removes the brightening effect). note that since brightness is specific to pie series, it's documented under plotoptions.pie instead of plotoptions.series (though it worked for me even when i added it under plotoptions.series).
var chartoptions = {
// ...
chart: {
type: "pie",
},
plotoptions: {
series: {
states: {
hover: {
halo: {
size: 0,
},
// this worked for me even though it's not
// documented under plotoptions.series:
//brightness: 0,
},
},
},
pie: {
states: {
hover: {
brightness: 0,
},
},
},
},
}
plotoptions.series.stickytracking
if you're using a line or area series, you may have noticed that as soon as you hover over the chart, even if you're not touching a series, the nearest series will receive hover styling and the rest will receive inactive styling. this is because plotoptions.series.stickytracking is true by default for line and area series. if you set plotoptions.series.stickytracking
to false, hover and inactive styling will only be applied while you're hovering over a line.
var chartoptions = {
// ...
chart: {
type: "line",
},
plotoptions: {
series: {
stickytracking: false,
},
},
}
plotoptions.series.enablemousetracking
as @ninedozen noted, you can completely disable all responsive interactions based on mouse movement by setting plotoptions.series.enablemousetracking
to false. note that this will also disable tooltips in addition to hover/inactive styling.
options scope
to apply these options to all series in the entire chart, place them under plotoptions.series
. to apply them only to certain series types (or if the option is specific to a certain series), place them under plotoptions.<seriestype>
. to apply them to a specific series, place them inside that series' options.
var chartoptions = {
series: [
{
name: "series1",
type: "line",
data: [...],
// these options will only apply to series1, not series2 or series3
states: {...},
},
{
name: "series2",
type: "line"
data: [...],
},
{
name: "series3",
type: "pie"
data: [...],
}
],
plotoptions: {
// these options will apply to all series in the chart
series: {states: {...}},
// these options will only apply to series of type line
// i.e. series1 and series2
line: {states: {...}}
}
}
score:29
you might alternatively want to disable all mouse tracking in general, both tooltip and hover effects:
(copy and paste link) http://api.highcharts.com/highcharts#series.enablemousetracking
plotoptions: {
series: {
enablemousetracking: false
}
}
score:83
disabling tooltip just disables the tooltip but the hover effect is still present. to disable the hover effect, add the following to your plotoptions:
plotoptions: {
series: {
states: {
hover: {
enabled: false
}
}
}
},
Source: stackoverflow.com
Related Query
- Disable hover on HighCharts
- highcharts - disable fading series on marker hover
- Highcharts conditionally disable marker on hover
- Disable legend hover in Highcharts
- How can I disable on hover marker animation in Highcharts 6.x?
- Disable Plotpoint legend on hover in Highcharts
- Highcharts disable hover effect and select animation
- Is there any way to disable hover action on particularly some nodes in networkchart of highcharts based on the node color.?
- HighCharts navigator: how to disable the expand width icon on hover
- Highcharts - disable hover for slices on pie chart
- Disable highcharts tooltip on certain lines, leave it enabled on others?
- Disable tooltip on certain points in Highcharts
- Highcharts - manually trigger hover event on a point
- Disable series through configuration in highcharts
- Highcharts datetime axis, how to disable time part (show only dates)?
- Disable PDF and SVG download options in Highcharts
- Disable Print Chart option only from HighCharts
- Disable marker hover in only one marker of highchart
- Highcharts + Plotband tooltip hover + default styling
- Highcharts solidgauge : How can I disable gradient fill?
- Enable or disable data labels shown in pie charts in Highcharts on click of a button
- Stop HighCharts increasing width of line on hover
- Highcharts Change column color on hover
- Highcharts - how to disable color change on mouseover/hover
- Highcharts Donut Chart text in center change on hover
- Highcharts legend item hover event?
- How to enable or disable a Highcharts tooltip when a button is clicked?
- Can I with highcharts column stacking on hover not highlighting the whole serie
- Stop HighCharts change transparency of another series on hover of one series
- Highcharts Areaspline - Highlight a column on hover effect
More Query from same tag
- Stacked grouped histogram HighCharts graphs with dynamic data using ASP.NET MVC3?
- Highcharts map: detect zoom or pan
- Highcharts line and points are shown only on mouse hover
- How to show values in Highcharts tooltip other than x and y when data points are too high?
- I want to add a loading spinner or add some dialog until highcharts get loaded and should close after chart is loaded in react typescript?
- Chart js line with asp.net
- How do I rotate my HighCharts bar chart so its vertical, not horizontal?
- How to add different click events on each pie of a pie chart created by highcharts usin jquery
- Get javascript highcharts to render inside a Bootstrap Popover
- In Vue JS, assign data from mounted()
- In Ember.js Where do I put initialization code for a controller, tried routes setup controller
- individual point settings in a scatter/line plot
- Highcharts original background color always gets exported
- problem Highchart Show/Hide data label on hover legend
- encode CSV to JSON according to certain scheme using PHP
- Highchart showing up empty until button click
- How to fix "Property 'type' is missing in type but required in type 'SeriesXrangeOptions'" in angular highcharts module
- high charts line graph x-axis issue
- Data label not showing in some pie chart handles Highchart
- Highcharts - with datetime axis labels overlap
- Is there a event that is fired when fullscreen transition ends
- build a "double divergent" axis title in HighCharts
- Change onclick event in highchart ,pie chart
- Average values based on date from json to array of arrays
- Unable to change default rangeSelector Highstock
- HighChart / HighStock chart.refresh seems to fail to reload the chart
- Execute function after zoom highcharts
- Highstocks: Disable the Vertical line while hovering on legend or chart
- how to use Highcharts on Ionic?
- multiple Y axis - margin