Skip to content

Using the P5.js library for the Processing language, this lets you simply alter the data file to create the chart.

Notifications You must be signed in to change notification settings

alvinschang/p5-stacked-area-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

p5-stacked-area-chart

Using the P5.js library for the Processing language, this lets you simply alter the data file to create the chart. Here's an example of a chart created with this code. It will make a chart that looks like this:

Image of this stacked chart

How to use this

Simply alter the data.js file. There is an object variable in there, which is structured thusly:

var data = {
  "Name of first chart to display": {
    "Name of first category": {
      "Size of the left side": 10,
      "Size of the right side": 20
    },
    "Name of second category": {
      "Size of the left side": 10,
      "Size of the right side": 20
    },
  },
  // here's the second chart you can display, changeable with the pulldown menu
  "Name of first chart to display": {
    "Name of first category": {
      "Size of the left side": 10,
      "Size of the right side": 20
    },
    "Name of second category": {
      "Size of the left side": 10,
      "Size of the right side": 20
    },
  }
}

About

Using the P5.js library for the Processing language, this lets you simply alter the data file to create the chart.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published