Population Growth of China

A simple line chart of the population of China since 1960 using World Bank API

Created by Admin User on Tue Jan 19 2016 16:40:33 GMT+0000 (UTC)
Last updated: Sat Feb 13 2016 03:24:08 GMT+0000 (UTC)

You can embed the project by including the followng script into your HTML page:

<div id='mainpart'></div>

<script src='https://quips.anbdata.com/project/prod/c29cc4a466032831660aac9bedd9347b56c62be3/script.js'></script>

You can view the deployed project on this test page

You can embed that page as a iframe directly as well by including the followng code into your HTML page:

<iframe src='https://quips.anbdata.com/project/prod/c29cc4a466032831660aac9bedd9347b56c62be3/page.html' onload="this.style.height=this.contentDocument.body.scrollHeight +'px';"/>

Read more about integrations

Packages

Libraries and Stylesheets (CSS) which are loaded at start-up

Content

Jade, Javascript, Data and CSS files used in this app

Jade

Link to file

#container(style="width:600px;height:300px")

Javascript

Link to file
Main function name

var options={ chart:{ animation:false }, title: { text: "Population of "+population[1][0].country.value }, subtitle: { text: 'Source: World Bank' }, xAxis: { categories: [] }, yAxis: { title: { text: 'Population' } }, series: [{ name: population[1][0].country.value, data: [] }] } $(document).ready(function(){ $(population[1].reverse()).each(function(i,row){ if (row.value!=null) { options.xAxis.categories.push(row.date) options.series[0].data.push(Number(row.value)) } }) $('#container').highcharts(options); })

Data on Population Total

Variable name population

Send to Javascript

Data file URL :


HTML Preview

Open in new window