Types of Charts
Configuring the View
An example of a chart showing the Priority (PRIO) attribute for requirements. It utilizes <ForEachPart>, <ApplyItemTemplates>, and <Choose> elements.
<Charts> <PieChart> <Slices> <Slice name="1" caption="Prio 1" color="blue"/> <Slice name="2" caption="Prio 2" color="red"/> <Slice name="3" caption="Prio 3" color="yellow"/> <Slice name="unknown" caption="Unknown" color="green"/> </Slices> <Counter> <ForEachPart type="XESX"> <DefObj> <ForEachPart type="EXAC"> <DefObj> <ForEachPart type="IBAR"> <DefObj> <ApplyItemTemplates/> </DefObj> </ForEachPart> </DefObj> </ForEachPart> </DefObj> </ForEachPart> </Counter> </PieChart> <ItemTemplate type="RQ"> <Choose> <When test="@PRIO = 1"> <AddToSlice name="1"/> </When> <When test="@PRIO = 2"> <AddToSlice name="2"/> </When> <When test="@PRIO = 3"> <AddToSlice name="3"/> </When> <Otherwise> <AddToSlice name="unknown"/> </Otherwise> </Choose> </ItemTemplate> </Charts>
Note that the Part SID has been added to the structure tree grid for your reference to the above configuration.
As with all configurable features, charts consist of one definition part and one data collection part.
<Charts> defines a chart view. It can include one or more individual charts.
<AreaChart> defines one Area Chart.
<ColumnChart> defines one Column Chart or Bar Chart. It has the following two optional attributes:
- caption sets the label for the column/bar in the chart.
- multiBar defines the behavior of the chart. A "side" value results in multiple bars, side-by-side, in groups. A "stacked" value [default] results in bars stacked on top of each other.
The definition of the columns/bars is based on AddToSlice just like with the other chart types.
<PieChart> defines a Pie Chart.
<Slices> describes the available chart slices.
<Slice> defines a set of objects that can be visualized in a chart, e.g., labels and colors. It has the following attributes:
- name is used to assign items to the <Slice>. It is used within the <AddToSlice> element. Required.
This tag can be omitted, but it is the only way to assign captions and specific colors to the slices.
<Counter> keeps track of the data sets to be displayed in the chart. Pie charts have a single counter, while Area charts have a counter for each separate series of the Area Chart.
<AddToSlice> is used to add data (as defined in to the slices. It has the following attributes:
- name indicates which slice to assign it to.
- color is an alternative to defining the color in the <Slice> tag. This option is useful when the color is defined by a property of the object (item or issue) that is added to the slide, e.g., a status color of an issue.
Tip: Need help finding SIDs? See Finding SystemWeaver Type Identifiers (SIDs).
|Note: Nothing is preventing an item from being included, i.e., counted, in multiple slices. For example, if your chart shows attributes, it's possible that one item may have more than one attribute.|
Interested in SystemWeaver Script Language training? You can also learn about the numerous scripting options in the SystemWeaver Script Language Reference Manual in the Help.