Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
book-of-vaadin.pdf
Скачиваний:
88
Добавлен:
24.03.2015
Размер:
13.43 Mб
Скачать

Vaadin Charts

19.5. Chart Configuration

All the chart content configuration of charts is defined in a chart model in a Configuration object. You can access the model with the getConfiguration() method.

The configuration properties in the Configuration class are summarized in the following:

credits: Credits (text, position, href, enabled)

labels: HTMLLabels (html, style)

lang: Lang (decimalPoint, thousandsSep, loading)

legend: Legend (see Section 19.5.3, “Legend”)

pane: Pane

plotoptions: PlotOptions (see Section 19.5.1, “Plot Options”

series: Series

subTitle: SubTitle

title: Title

tooltip: Tooltip

xAxis: XAxis (see Section 19.5.2, “Axes”

yAxis: YAxis (see Section 19.5.2, “Axes”

For data configuration, see Section 19.6, “Chart Data”.

19.5.1. Plot Options

The plot options can be set in the configuration of the entire chart or for each data series separately. Some of the plot options are chart type specific, defined in type-specific options classes, which all extend AbstractPlotOptions.

You need to create the plot options object and set them either for the entire chart or for a data series with setPlotOptions().

For example, the following enables stacking in column charts:

PlotOptionsColumn plotOptions = new PlotOptionsColumn(); plotOptions.setStacking(Stacking.NORMAL); conf.setPlotOptions(plotOptions);

See the API documentation of each chart type and its plot options class for more information about the chart-specific options, and the AbstractPlotOptions for the shared plot options.

19.5.2. Axes

Many chart types have two axes, X and Y, which are represented by XAxis and YAxis classes. The X axis is usually horizontal, representing the iteration over the data series, and Y vertical, representing the values in the data series. Some chart types invert the axes and they can be

Chart Configuration

427

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]