score:1
Accepted answer
how about something like that i am using your data. you change it as you pleased. its high chart example with data provided above in the question.
highcharts.chart('container', {
chart: {
type: 'bubble',
plotborderwidth: 1,
zoomtype: 'xy'
},
legend: {
enabled: false
},
title: {
text: 'sugar and fat intake per country'
},
subtitle: {
text: 'source: <a href="http://www.euromonitor.com/">euromonitor</a> and <a href="https://data.oecd.org/">oecd</a>'
},
xaxis: {
gridlinewidth: 1,
title: {
text: 'daily fat intake'
},
labels: {
format: '{value} gr'
},
plotlines: [{
color: 'black',
dashstyle: 'dot',
width: 2,
value: 65,
label: {
rotation: 0,
y: 15,
style: {
fontstyle: 'italic'
},
text: 'safe fat intake 65g/day'
},
zindex: 3
}]
},
yaxis: {
startontick: false,
endontick: false,
title: {
text: 'daily sugar intake'
},
labels: {
format: '{value} gr'
},
maxpadding: 0.2,
plotlines: [{
color: 'black',
dashstyle: 'dot',
width: 2,
value: 50,
label: {
align: 'right',
style: {
fontstyle: 'italic'
},
text: 'safe sugar intake 50g/day',
x: -10
},
zindex: 3
}]
},
tooltip: {
usehtml: true,
headerformat: '<table>',
pointformat: '<tr><th colspan="2"><h3>{point.country}</h3></th></tr>' +
'<tr><th>fat intake:</th><td>{point.x}g</td></tr>' +
'<tr><th>sugar intake:</th><td>{point.y}g</td></tr>' +
'<tr><th>obesity (adults):</th><td>{point.z}%</td></tr>',
footerformat: '</table>',
followpointer: true
},
plotoptions: {
series: {
datalabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
data: [{
"id": "3",
"name": "australia",
"x": 24.1,
"y": 19.9,
"z": 3.5
}, {
"id": "1",
"name": "england (sta)",
"x": 23.8,
"y": 20.5,
"z": 2.6
}, {
"id": "5",
"name": "germany",
"x": 22.8,
"y": 20.9,
"z": 2.3
}, {
"id": "2",
"name": "spain",
"x": 17.8,
"y": 22.2,
"z": 1.4
}]
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>
hope that helps.
Source: stackoverflow.com
Related Query
- HighCharts Bubble graph JSON as data source
- Rails collecting and rendering JSON data in to a Highcharts graph
- Highcharts using JSON - graph not displaying mysql data
- Highcharts Graph Blank Using JSON Data
- make highcharts graph with data in json format, with 4-element array
- Highcharts displays series names but missing data points from json source
- Reload chart data via JSON with Highcharts
- Highcharts - Dyanmic graph with no initial data
- How to pass json data to highcharts series?
- Send JSON data to highcharts pie from asp.net MVC controller in C#
- Highcharts with JSON data and multiple series
- How to pass custom data into Highcharts graph click event
- Formatting JSON data monthwise for HighCharts using MySQL
- Creating a line graph with highcharts and data in an external csv
- Highcharts Beta 3: Best Practice loading JSON data
- Highcharts - Global configuration with common code and unique data & Headings
- Highcharts C# To JSON - Structuring Series Data
- Highcharts not displaying series data for graph with multiple Y-axes
- Formatting JSON Data with ColdFusion for HighCharts
- Highcharts Bubble Chart - How to move an individual point's data label (dataLabel) to the front/top
- Highcharts and Json data
- Highcharts with ajax and json data what am i doing wrong?
- Highcharts bargraph from json data in angularJS
- Parsing JSON data for Highcharts
- How to format my json data for stack column chart in HighCharts
- Formatting JSON from a Pandas data frame for Highcharts within a Django template
- How to make Highcharts fetch data from external JSON file?
- Loading JSON data in Ruby on rails to use HIGHCHARTS
- dynamic highcharts with json data
- HighCharts & MVC: How to load whole graph definition and data with JSON?
More Query from same tag
- Highcharts angular.js custom tooltip
- Highcharts JS- add third variable to tooltip for two series
- Solid Gauge Highcharts data assignment
- Exporting multiple Highcharts that are generated by looping to a single pdf
- How to plot incomplete series with highchart
- How to zoom to specific point in Highmaps
- How to Increase minimum point value and the color of series in advanced accessible charts in Highcharts by making it traverse
- bar not displayed in Highcharts for Higher values
- Highcharts change plotBackgroundColor dynamically
- highcharts stacked area
- Series Data for column high chart
- How to call a plugin in CakePHP 2.x Shell?
- Tooltip Options not working for Highcharts Treemap
- How to create dashed bar graph in highcharts
- How to set the x axis of HighCharts to intake DateRange
- High charts Change the color of horizontal bar
- Scrape data from a highchart using selenium
- Toggle between two values
- How to slide highcharts?
- Highcharts grouped categories data csv
- Highcharts series gap auto zipping
- Resize highchart based on container changing NOT window resize
- Stacked Bar Chart: Week vs Week
- fail to make xAxis on Highstock chart to go before
- Highlighting Highcharts column
- how to aggregate data from mongodb collection to highstock series data format
- How to use image on label depending on data?
- how to load data from server with highchart inAngular 2?
- highcharts, downloadPNG remove chart data
- Shrink browser content to browser window size