score:4
Accepted answer
1.first proper data series has to be form
var dataobj=[{id: 1, uuid: "0ff158d7-09a7-41df-81d1-fd3ac752a967",
name: "example 1", percentage: 34},
{id: 2, uuid: "81aa6eb2-b6fe-4d14-a3ea-f5487b67784a", name: "example 2", percentage: 0},
{id: 7, uuid: "b7d7fd90-d9af-4a56-aceb-20bfdeda3af4", name: "example 3", percentage: 12}];
var value=[];
for(var i=0;i<dataobj.length;i++){
value.push({name:dataobj[i].name,y:dataobj[i].percentage,uuid:dataobj[i].uuid,id:dataobj[i].id})
}
console.log(value);
2.plotoptions
will be
plotoptions: {
bar: {
datalabels: {
enabled: false
}
},
series: {
cursor: 'pointer',
point: {
events: {
click: function(event){
console.log(event.point.id);
console.log(event.point.uuid);
}
}
}
}
},
fiddle demo
Source: stackoverflow.com
Related Query
- Passing in Id for each data item in bar chart using highcharts
- Highcharts display label for pie chart using html table as data source
- set individual color for each bar in bar chart using highcharts
- How can I put text within horizontal bar chart data points using Highcharts as well as adding text underneath each data point? Example below:
- Splitted bar chart for paired data with highcharts
- Highcharts Polar Chart - Specify Data Series & Tooltips for each Axis
- HTML table as data source for highstock charts using highcharts
- Highcharts to populate data for pie chart using json object
- Using a flask variable as data source for highcharts
- Unresponsive Script and/or high response time for bar chart using HighCharts
- HighCharts Create gradiance decress color to blur for each value on bar chart
- after using for loop all my column graphs are plotted in single color i need each bar in different color in highcharts
- Creating A MultiSeries Bar Chart With Different Number of Series For Each Item
- Highcharts - Column chart with legend for each data
- In highCharts so much space left for each category when using index with data
- Parsing CSV and then Using the Data to Build Highcharts Bar Chart
- How to set specific color for each data in pie chart using phplot.php
- modifying Highcharts tool tip with for a bar chart dynamic data
- Highcharts (highcharts-ng) with ng-repeat worked, But need to pass the data for each chart from the attributes
- Highcharts percentage of total for simple bar chart
- Highcharts not displaying data labels for Pie chart in arabic
- Using Highcharts and displaying a message over or on the chart when there is no data
- Highcharts stacked bar chart hide data labels not to overlap
- Formatting JSON data monthwise for HighCharts using MySQL
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- creating a bar chart using Highcharts with React - getting an error that rendering div isn't found
- Rails generates chart for .each do |x| using highcharts or any other chart API
- highcharts - precision for stacked column chart data labels
- Importing JSON file into Highcharts for Bar Chart Visualization
More Query from same tag
- How to make dynamic chart with the next view? What libraries allows to customise exactly this like in my design?
- Setting a custom variable in Highcharts
- groupPadding for stacking series in Highcharts
- Wicked-Charts: This website contains interactive content
- HighCharts stack totals on top for percent stacking
- Highcharts plotbands text should not overlap with columns
- How to animate chart legend symbol on hover?
- Exception when converting to image from Base-64 string
- Highcharts - How to add background in bar series? And how to print page without lose quality?
- Get All Points for a particular Tick value
- Highcharts: show multiple days data on same chart making them overlpa each other to comparison
- How to show bar of graph in different colour when it reaches threshold level in high charts in JS?
- Legend height seems to have an impact on pie size
- HighCharts Not Adding Series Data Points
- Highcharts NG stockchart animation effect only on navigator Type: column
- Add a max width to legend in Highcharts
- Customizing highcharts tick interval
- Highcharts label formatter to query mysql?
- How to set the target of highcharts bullet chart using SVG?
- Highchart - How do I change the colour of the baseline of the chart?
- Highcharts - change pie slice color on existing chart
- Highcharts colorAxis - Hide or add dynamically
- Highcharts remove renderer path
- How to display array in array on Highcharts? [JS]
- Toggle column stack
- Highcharts customized chart
- aligning datalabel to top of column highcharts
- Highcharts stacking bar chart border not displaying on right side
- Mongodb + Stacked Highcharts
- Highcharts - CUSTOM DATA LABELS in line series, are disappearing on window resize