BarChart

Abstract

This topic describes how to use the BarChart component in SPEAK.

The BarChart control displays a bar chart. A bar chart displays rectangular bars with lengths that are proportional to the values that they represent. The BarChart control plots the bars horizontally. The ColumnChart control is very similar, except that this control plots the bars (“columns”) vertically.

The BarChart control supports multiseries charts. When a BarChart control shows a multiseries chart, you can decide if it shows the series stacked or unstacked.

The BarChart control supports showing a sequence of charts when the data it receives from the data provider contains multiple data sets.

Name

Description

Default

Appearance

DisableSelection

If true, the control does not allow items to be selected.

False

EnableAnimation

If true, the control uses animations.

False

ShowAxis

If true, the control displays axes.

True

ShowLegend

If true, the control displays a legend for the chart.

True

ShowValues

If true, the control displays the values of the data points inside the graph itself.

False

SingleChartHeight

Specify the height in pixels of the chart.

If the chart is part of a sequence of charts, the control gives each individual chart this height.

400

SingleChartWidth

If you specify 100%, the chart takes up the available width. If you specify a number, the control gives the chart this width in pixels.

If the chart is part of a sequence of charts, 100% means each chart has the entire available width, and the chart sequence becomes a vertical sequence.

If the chart is part of a sequence of charts, and you specify an integer, the control gives each chart this width in pixels, and the sequence of charts wraps horizontally.

100%

StackSeries

If true, the control stacks the distinctive series in a multiseries chart.

False

VisibleCategoriesRange

If a multiseries chart and this number is > 0, the control will display this number of categories along the horizontal axis. If the data contains more categories, users have to scroll horizontally.

If this number is 0, the control shows all categories.

0

Data

Data

Bind the control to the data that it uses, for example: {Binding.DataProvider.Data}

DataMapping

CategoryChartField

Point to a ChartField item. The control uses this field as the X (horizontal) axis of the chart.

CategoryFilter

Specify one or more values like this: {value1,value2}. The control uses each of these values to filter the data column that the CategoryChartField property points to.

SeriesChartField

Point to a ChartField item. The control uses this field as the definition of the series that it displays.

SeriesFilter

Specify one or more values like this: {value1,value2}. The control uses each of these values as a facet of the data column the SeriesChartField property points to.

If you do not enter anything, the control will create a facet for each distinct value in the data column.

ValueChartFields

Point to a ChartField item. The control uses this field as the Y (vertical) axis of the chart.

You can create a configuration item for a BarChart control by creating an item based on the BarChart Parameters template.

The configuration item has these inherited fields:

  • ShowAxis

  • ValueChartFields

  • SingleChartWidth

  • CategoryChartField

  • ShowLegend

  • Data

  • ShowValues

  • CategoryFilter

  • SingleChartHeight

  • IsVisible

  • AccessKey

  • Tooltip

  • Behaviors

  • Id

  • VisibleCategoriesRange

  • SeriesChartField

  • SeriesFilter

  • StackSeries