Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rararamorio/7f9dcf20fa9a22a70ddc7bb4e649546d to your computer and use it in GitHub Desktop.
Save rararamorio/7f9dcf20fa9a22a70ddc7bb4e649546d to your computer and use it in GitHub Desktop.
highcharts your-first-chart
<html>
<head>
<script src="https://code.highcharts.com/highcharts.src.js"></script>
<script
src="https://code.jquery.com/jquery-1.12.4.js"
integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU="
crossorigin="anonymous"></script>
<style>
#container {
min-width: 310px;
max-width: 1024px;
height: 400px;
margin: 0 auto
}
</style>
<script>
$(function () {
var myChart = Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Fruit Consumption'
},
xAxis: {
categories: ['Apples', 'Bananas', 'Oranges']
},
yAxis: {
title: {
text: 'Fruit eaten'
}
},
series: [{
name: 'Jane',
data: [1, 0, 4]
}, {
name: 'John',
data: [5, 7, 3]
}]
});
});
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment