Support for Components in Components
nilzona opened this issue ยท 0 comments
nilzona commented
๐ Feature
Expand the Picasso definition API so that any component can define child components tied to a plugin layout strategy.
Motivation
This will enable features like Trellis charts and in general add another level of control of picasso components should be layed out.
Additional context
Example of how a definition could look like:
var config = {
scales: { ... },
components: [{
type: 'layout',
strategy: 'grid',
rows: 2,
components: [{
type: 'layout',
strategy: 'dock',
components: [{
scale: 'y',
type: 'axis',
dock: 'left'
},{
type: 'box-marker',
dock: 'center',
data: { ... },
settings: { ... }
}]
},{
type: 'layout',
strategy: 'grid',
columns: 3,
components: [{
type: 'point-marker',
data: { ... },
settings: { ... }
},{
type: 'point-marker',
data: { ... },
settings: { ... }
},{
type: 'point-marker',
data: { ... },
settings: { ... }
}
]
}
]
}]
}
picasso.chart({ element: element, data: data, settings: config });
This would render a picasso object with two rows equal in size where the top row has a barchart with a y-axis docked to the left and the bottom row has three equally sized columns with points inside (e.g. scatter chart).