Stackedbarchart reference¶
Good to visualise a breakdown by category for a whole entity
Parameters¶
Required¶
You must fill these parameters to produce a Stackedbarchart
parameters | label | type | description (placeholder | tooltip) |
---|---|---|---|
lines | object | | | |
lines/x | X axis | string (Column of dataset expected) | Column name containing x axis values | Same as bars label |
lines/y | Y axis | string (Column of dataset expected) | Column name containing y axis values | |
lines/smoothLine | Smooth line | boolean | | Interpolate between points to ‘smooth’ the line |
metaSerie | | | ||
meta | | | ||
label | string (Column of dataset expected) | Column containing bars label | | |
value | string (Column of dataset expected) | Column containing group value | | |
groups | string (Column of dataset expected) | Column containing bars breakdown | Will be displayed as colors inside the bar | |
dataset | string | | |
Optional¶
You can let these parameters unset if you do not need them
parameters | label | type | description (placeholder | tooltip) |
---|---|---|---|
legend | Display legend | boolean | | |
tutorial | Tutorial | object | | |
tutorial/alwaysShow | Always show this tutorial | boolean | | By default the tutorial is shown once only |
tutorial/content | Message | string | Enter your message | This will be displayed to your users |
tutorial/id | string | Enter an ID | Change the ID to display the tutorial again. All tutorials with the same ID will be displayed only once. | |
recycleColors | Recycle groups colors | boolean | | When chart data changes (filters or requesters) |
displayDirection | Choose display direction | string | | |
showValues | Display all values | boolean | | Horizontal mode onlyIf your data contain negative valuestotal won’t be displayed on top of the bar |
lines/commonScale | Use same scale for bars and lines | boolean | | |
lines/dataset | Lines dataset | string | Dataset for lines values | Use the same as the bars or create a new dataset |
lines/showValues | Show all values on line | boolean | | |
packsOrder | Packs order | | Use it to order packs | |
hideEmptyGroups | Hide empty groups | boolean | | |
style | Custom CSS class | string | amazing-class | Set a customm CSS class to target this specific chart with CSS |
groupsOrder | Groups order | | Use it to order groups | |
packNames | Display packs names | boolean | | |
mobileSize | Mobile Size | number | Enter a proportion of the total mobile screen | Use on multiple charts onlyEnter a number from 0 to 1 |
defaultSelected | Default selected bar | string | First, last or the label you want to select by default | By default on first |
visualSelection | Highlight selected bar | boolean | | Display rectangle around selected bar |
hideTotal | Hide bar total | boolean | | |
size | Size | number | Enter a proportion of the total screen | Use on multiple charts onlyEnter a number from 0 to 1 |
packs | string (Column of dataset expected) | Column containing grouping of bars | For horizontal display only | |
sort | Sort bars | string | | Sort by value |
labelsOrder | Labels order | | Use it to order labelsOverwrite the sort bars option | |
tickFormat | Custom date format (for date labels) | string | Type D3 time format. i.e. ‘%Y’ for years | Customize the date display for the labelsUse d3 time format |
urlLabels | URL link | string (Column of dataset expected) | Column containing url link | Add url link to bars label.Works only on horizontal display |
variation | string (Column of dataset expected) | Column containing variation | Add a colored dot on the groups |
Others¶
This parameters are either common to all charts, or hidden from studio. You can use them in code mode, but it’s not recommended !
parameters | label | type | description (placeholder | tooltip) |
---|---|---|---|
comment | string | | | |
sentiment | object | | | |
crossfilter | object | | Use it for crossfilter configurationShould be configured on the primary chart | |
crossfilter/datasets | Select the filtered datasets | array | | Datasets that will be filtered on the ‘on’ column |
crossfilter/on | on column | string (Column of dataset expected) | Column existing in primary and filtered datasets | |
persistentGroupColors | Recycle groups colors | boolean | | when chart data changes (filters or requesters) |
source | string | | | |
displayType | Choose display type | string | | |