1
0
Fork 0
mirror of synced 2024-07-02 04:50:44 +12:00

Add stacked option to bar chart

This commit is contained in:
Andrew Kingston 2020-11-03 09:48:35 +00:00
parent 0ea30587de
commit ae876c6c09
4 changed files with 15 additions and 4 deletions

View file

@ -573,6 +573,13 @@ export default {
control: Input,
defaultValue: "400",
},
{
label: "Stacked",
key: "stacked",
control: Checkbox,
valueKey: "checked",
defaultValue: false,
},
{
label: "Horizontal",
key: "horizontal",

View file

@ -573,10 +573,8 @@
},
"xAxisLabel": "string",
"yAxisLabel": "string",
"legend": {
"type": "bool",
"default": false
}
"legend": "bool",
"stacked": "bool"
}
},
"line": {

View file

@ -104,4 +104,8 @@ export class ApexOptionsBuilder {
legend(legend) {
return this.setOption(["legend", "show"], legend)
}
stacked(stacked) {
return this.setOption(["chart", "stacked"], stacked)
}
}

View file

@ -18,6 +18,7 @@
export let dataLabels
export let animate
export let legend
export let stacked
let data
$: options = getChartOptions(data)
@ -43,6 +44,7 @@
.dataLabels(dataLabels)
.animate(animate)
.legend(legend)
.stacked(stacked)
// Add data if valid datasource
if (rows && rows.length) {