In this article
Sample code to set up Chart widget as bar chart with stacked bars, including axis and series properties, with breakdown and category cut options.
This is a sample code for setting up a Chart widget as a bar chart. Keep in mind that the appearance and behavior of the chart will be determined by the available data and other settings and selections in your Studio report, so you may need to edit this code.
widget chart {
label: "BarChart"
size: large
legend: bottomLeft
animation: true
chart bar {
stacked: true
axis category {
axisLine: false
tickLine: false
}
axis number {
hide: true
}
}
series {
value: count(survey:responseId)
label: "Percent:"
percent: true
format: percentNumber
breakdownBy cut {
value: survey:Q1
label: "Satisfaction"
}
}
category cut {
value: survey:Industry
format: textFormat
label: "Industry"
}
}