line chart(any chart) needs to display tool tip only when we hover - tooltip

How to show tool tip only when we hover over any marker in line chart(any chart) and hide it when no data exist on graph?

For this purpose, you should adjust the hoverMode of the chart. Just the following lines to your chart configuration code:
// adjust chart interactivity
var interactivity = chart.interactivity();
// Set hover mode by X.
interactivity.hoverMode('single');
For details, check the sample in the comment below.

Related

Google Sheets Pie Chart - Display Actual Value Below Label, not in pie chart?

I know I can get the actual value to show up in the pie chart, i.e. on the slice. However I want the percentage in the pie chart (which I can get to show up) since it is more likely to fit in a slice and the actual value underneath the label. However no matter what I do I can't get anything besides the respective percentage to show up underneath each slice's label. Help!
I understand that you want to change your pie graph hiding the percentage shown inside the pie slice. If that is your goal, then you only have to update one chart setting. Follow these steps:
Double left click on the chart. The chart editor sidebar will open.
Click on the Customise tab.
Open the Pie chart submenu.
Update the Slice label property from Percentage to None.

Legend at least one should be active when user clicks in highchart

I am trying to use line chart, where I am using data with line series.
For that purpose I am using the legend. When clicked the legend, the following value will be hidden, and when I click the last one it also gets hidden, in my scenario last value should not get hidden so that at least one should be active.
I have done this in pie chart series but I can't implement this in line chart why?
- [Js Fiddle Pie Chart Demo][1]
- [Js Fiddle Line Chart][2]
var points = this.chart.series
JSFiddle

How to display the range selection buttons in middle of the chart in highstock js?

I am using highstock js for stock chart. I want to display the range selection buttons in the center of the chart. Please find the snapshots below.
Currently the buttons are in left side of the chart.
Expected :
please help me how to do this in highstock js.
Thanks in Advance.
Please take look at the uservoice topic http://highcharts.uservoice.com/forums/55896-general/suggestions/2436599-add-ability-to-change-rangeselector-position
Check the example from Jugal given in Sebastians link.
You can override the render prototype and manually adjust the position.
For example like this: (forked Jugals fiddle)
http://jsfiddle.net/SPhYd/
var leftPosition = this.chart.plotLeft+150,
topPosition = this.chart.plotTop-10

highcharts legend overlapping

highcharts legend overlapping with the name section of the series.
I have got an url : Issue example.
I want to place the legend text bellow the chart.
Please help.
You need to disable floating parameter or use y parameter (http://api.highcharts.com/highcharts#legend.y) to modify position.

Turn series and plot bands on/off using API

I have a chart that has a custom legend i.e. it isn't part of Highcharts at all, it's completely my own code, the Highcharts legend is disabled for this chart.
Is it possible to turn series data AND plot bands on/off in a Highcharts chart using the API?
I found an example that triggered the click event of a legend item to do this, but this obviously relies on a legend being present, so this is no use to me: http://birdchan.com/home/2013/01/23/trigger-a-click-event-on-a-legend-item-in-highchart/
I also tried to set the series data .visible property to false and then redraw the chart and although it sets the visible property just fine, it doesn't redraw the chart so nothing changes:
var chart = new Highcharts.Chart(myoptions);
$("#custom_legend_link").click(function (e) {
chart.series[0].visible = !chart.series[0].visible;
chart.redraw();
}
Here is a jsFiddle using the basic line demo showing my problem:
http://jsfiddle.net/gfyans/zsaV4/
Thanks,
Greg.
To toggle the series, use Series.setVisible(). When called without parameters, it toggles.
Plot bands are a bit different, since they don't have methods like hide(), show() or setVisible. To toggle a plot band, you need to remove it by Axis.removePlotBand() and add a new one with the same options by Axis.addPlotBand().

Resources