Customize a column chart to show multiple time periods.
Column charts can be customized to show multiple periods at the same time. Time periods can be years (2019), months (2019-03), or days (2019-03-25). There are also convenient mnemonics that can be used to reflect data relative to the most recent update.
- "lastn" represents the most recent n time periods. For example, "last5" represents the last give time periods.
- "latest" and "latest-n" represents the latest period and specific periods relative to the latest period. For example "latest-5" represents five periods earlier than the latest period.
Code snippet
Once you have added the StateBook files to the <head> section of your webpage, this is the only code you need:
<div id="statebook-content"></div>
<script>
Statebook.displayData({
authentication: 'demo',
container: 'statebook-content',
display: 'component',
topic: 'dem-household',
view: 'table:acs-hhd-inc',
periods: 'last5'
});
</script>
Comments
0 comments
Article is closed for comments.