var chart = Highcharts.chart('container', {
chart: {
type: 'line'
},
title: {
text: 'US Population Over Time'
},
xAxis: {
categories: ['1790', '1800', '1810', '1820', '1830', '1840', '1850', '1860', '1870', '1880', '1890', '1900', '1910', '1920', '1930', '1940', '1950', '1960', '1970', '1980', '1990', '2000', '2010', '2020']
},
yAxis: {
title: {
text: 'Population (millions)'
}
},
series: [{
name: 'US Population',
data: [3.9, 5.3, 7.2, 9.6, 12.9, 17.1, 23.2, 31.4, 38.6, 50.2, 62.9, 76.0, 92.2, 106.5, 123.2, 131.7, 150.7, 179.3, 203.3, 221.5, 248.7, 281.4, 308.7, 322.8, 351.4]
}],
accessibility: {
point: {
valueDescriptionFormat: '{index}. {x}, {y} millions'
},
description: 'This chart shows the population of the United States over time. The x-axis represents the census year, while the y-axis represents the population in millions. The population data starts in 1790 with a population of 3.9 million and ends in 2020 with a population of 351.4 million.'
}
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.