Add stacked option to bar chart
This commit is contained in:
parent
0ea30587de
commit
ae876c6c09
|
@ -573,6 +573,13 @@ export default {
|
|||
control: Input,
|
||||
defaultValue: "400",
|
||||
},
|
||||
{
|
||||
label: "Stacked",
|
||||
key: "stacked",
|
||||
control: Checkbox,
|
||||
valueKey: "checked",
|
||||
defaultValue: false,
|
||||
},
|
||||
{
|
||||
label: "Horizontal",
|
||||
key: "horizontal",
|
||||
|
|
|
@ -573,10 +573,8 @@
|
|||
},
|
||||
"xAxisLabel": "string",
|
||||
"yAxisLabel": "string",
|
||||
"legend": {
|
||||
"type": "bool",
|
||||
"default": false
|
||||
}
|
||||
"legend": "bool",
|
||||
"stacked": "bool"
|
||||
}
|
||||
},
|
||||
"line": {
|
||||
|
|
|
@ -104,4 +104,8 @@ export class ApexOptionsBuilder {
|
|||
legend(legend) {
|
||||
return this.setOption(["legend", "show"], legend)
|
||||
}
|
||||
|
||||
stacked(stacked) {
|
||||
return this.setOption(["chart", "stacked"], stacked)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue