Published
Edited
Sep 22, 2018
5 forks
Insert cell
Insert cell
Insert cell
Insert cell
picasso.chart({
element: document.querySelector('#container'),
data,
settings: {
scales: {
years: {
data: {
extract: { field: 'Year' }
}
},
months: {
data: {
extract: { field: 'Month' }
}
},
s: {
data: {
field: 'Sales'
}
},
col: {
data: { field: 'Sales' },
type: 'color'
}
},
components: [{
key: 'y-axis',
type: 'axis',
scale: 'years',
dock: 'left'
}, {
key: 'x-axis',
type: 'axis',
scale: 'months',
dock: 'bottom'
}, {
key: 'p',
type: 'point',
data: {
extract: {
field: 'Month',
props: {
mm: { field: 'Month' },
size: { field: 'Sales' },
group: { field: 'Year' }
}
}
},
settings: {
x: { scale: 'months' },
y: { scale: 'years', ref: 'group' },
size: { scale: 's' },
fill: { scale: 'col', ref: 'size' }
}
}]
}
})
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more