Created
July 2, 2017 13:14
-
-
Save rararamorio/7f9dcf20fa9a22a70ddc7bb4e649546d to your computer and use it in GitHub Desktop.
highcharts your-first-chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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