score:0
as of 5 years later, do this:
legend: {
enabled: true,
labelFormatter: function() {
let legendName = this.series.chart.axes[0].categories[this.x];
return legendName;}}
score:5
You can do this with tooltip.formatter
and legend.labelFormatter
and accessing the highchart options.
For the tooltip text:
tooltip: {
formatter: function() {
var sliceIndex = this.point.index;
var sliceName = this.series.chart.axes[0].categories[sliceIndex];
return 'The value for <b>' + sliceName +
'</b> is <b>' + this.y + '</b>';
}
},
And for the legend:
legend: {
enabled: true,
labelFormatter: function() {
var legendIndex = this.index;
var legendName = this.series.chart.axes[0].categories[legendIndex];
return legendName;
}
},
Live demo.
Source: stackoverflow.com
Related Query
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Highcharts display label for pie chart using html table as data source
- How to get Pie Chart data to display using AppCoda example and iOS Charts?
- How can I get a data label in my Highcharts Pie Chart that is a font-awesome icon?
- HighCharts pie chart X-axies values are not displayed while trying to get data from MySQL database using PHP
- How to get column chart in angular using highcharts using dynamic data
- How to center highcharts pie chart and legend on a page?
- Show tootip and select pie slice on legend click of pie chart in HighCharts
- How to hardcode chart data in my Model then have my Controller pull it from there to display it. Using Highcharts
- Using HIghcharts on Codeigniter to get data name and total
- How can I get a chart only with legends using highcharts
- When using Highcharts, how do you get the point name from a data point series?
- Gson to get Json value for a pie chart using Highcharts
- Highcharts pie chart slice colour intensity using colorValue
- Pie chart slice radius using HighCharts library
- Highcharts how to make a set number of colors for pie chart data and drilldown data
- Highcharts to populate data for pie chart using json object
- How to create a progressive pie chart using Highcharts
- How to show circular progress pie chart using the highcharts
- How to show correctly ticks to time data in a Pie chart label using highcharts?
- How to pass JSON data to update Highcharts Pie chart
- Highcharts - How to combine unique legend for multi-series pie chart which perform same action for both series? (like onclick: show/hide)
- how to make chart real time with 2 line and get data from php with highcharts
- Highcharts, how to get data from array on same js page instead of external JSON
- how to show legend in PIE chart from chart to pie drilldown highcharts
- Highcharts Pie chart how to reduce space between chart and legend caused by plot width
- How to draw scatter chart with highcharts using timeseries data
- Create a HighCharts pie chart using JSON Data
- Highcharts same legend color as of the pie chart slice color
More Query from same tag
- Highcharts: How to set dataGrouping
- highcharts dataLabel overflow: justify issue
- Is there any way to make Highstock columnrange look like Highchart columnrange?
- Making Highcharts look like progress bar with more than one series
- Highcharts line chart strange issue
- Set yAxis background color in Highstock
- Highcharts: Heatmap using CSV
- How to set xAxis minimum and maximum values on Highstock?
- new link in print menu highcharts
- Live multiple series with highchart
- How can I open a high chart in a modal window when the chart is clicked on?
- Highstock showing dates where there's no Data
- codeigniter with Highcharts- data not coming controller to view
- Weird character in front of Highcharts tooltip series names
- Node JS, Highcharts Memory usage keeps climbing
- Same index in column chart Highcharts
- why foreach doesn't work inside my highchart and when i splet the array it works?
- How to tell if series is in upper chart or lower chart in tooltip (using highstock)?
- How do I skip a datapoint in Highcharts without causing an interruption in the line of the chart?
- Highstock: Change color of date input box border if active
- Higcharts population pyramid with csv data
- highcharts. How to determine the coordinates of the point where the CLICK was made?
- exporting highcharts polar chart to PDF with phantomjs
- How to pass an argument into a Highcharts-Function
- Highcharts with Angular
- it is possible to style HIGHCHARTS like this?
- Pulling series data into HighCharts using Javascript
- Highcharts xAxis drilldown dont change correctly
- Passing string data as categories to Highcharts
- highstocks intraday chart with timestamp and non decimal y axis