In this article
Category code block segments bar charts into columns. Use cut, cutByMulti, date, or overlappingDate to configure categories.
In a bar chart, the category code block divides the chart into separate columns. In the figure below, the chart is segmented into columns for various sales regions.
Example of a stacked bar chart categorized by sales region
Examples of code to configure how the chart is segmented are presented below:
The code used to create the above chart
Examples of code to configure the chart categories are presented below:
category list {
value,
label,
format,
hierarchy,
table,
skip,
take,
parentKey,
sortOrder,
sortBy,
index,
emptyFirst,
takeTop,
takeBottom,
base ...
}
category cut {
value,
label,
format,
sortOrder,
sortBy,
index,
emptyFirst,
takeTop,
takeBottom,
categories (description see below),
base ...
}
category cutByMulti {
value,
label,
format,
sortOrder,
sortBy,
index,
emptyFirst,
takeTop,
takeBottom,
categories (description see below),
base ...
}
category date {
value,
label,
format,
breakdownBy,
start,
end,
sortOrder,
sortBy,
index,
emptyFirst,
takeTop,
takeBottom,
base ...
}
category overlappingDate {
value,
label,
format,
breakdownBy,
start,
end,
startShift,
endShift,
sortOrder,
sortBy,
index,
emptyFirst,
takeTop,
takeBottom,
base ...
}For details about categories property refer to Masking.
For details of the properties and settings, refer to widget chart in the CDL Reference Guide.