Created
June 24, 2016 17:22
-
-
Save jjvillavicencio/f97a0064ca9f7726e970235c49bb77a0 to your computer and use it in GitHub Desktop.
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
{%extends "index.html"%} | |
{%block header%} | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<style type="text/css"> | |
${demo.css} | |
</style> | |
<script type="text/javascript"> | |
$(function () { | |
$('#container').highcharts({ | |
chart: { | |
type: 'bar' | |
}, | |
title: { | |
text: 'Historic World Population by Region' | |
}, | |
subtitle: { | |
text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population">Wikipedia.org</a>' | |
}, | |
xAxis: { | |
categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'], | |
title: { | |
text: null | |
} | |
}, | |
yAxis: { | |
min: 0, | |
title: { | |
text: 'Population (millions)', | |
align: 'high' | |
}, | |
labels: { | |
overflow: 'justify' | |
} | |
}, | |
tooltip: { | |
valueSuffix: ' millions' | |
}, | |
plotOptions: { | |
bar: { | |
dataLabels: { | |
enabled: true | |
} | |
} | |
}, | |
legend: { | |
layout: 'vertical', | |
align: 'right', | |
verticalAlign: 'top', | |
x: -40, | |
y: 80, | |
floating: true, | |
borderWidth: 1, | |
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'), | |
shadow: true | |
}, | |
credits: { | |
enabled: false | |
}, | |
series: [{ | |
name: 'Year 1800', | |
data: [107, 31, 635, 203, 2] | |
}, { | |
name: 'Year 1900', | |
data: [133, 156, 947, 408, 6] | |
}, { | |
name: 'Year 2012', | |
data: [1052, 954, 4250, 740, 38] | |
}] | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<script src="https://code.highcharts.com/highcharts.js"></script> | |
<script src="https://code.highcharts.com/modules/exporting.js"></script> | |
{%endblock%} | |
{%block main%} | |
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div> | |
{%endblock%} | |
{%block footer%} | |
<h6>Power by @j2villavicencio</h6> | |
{%endblock%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment