org.odftoolkit.simple.chart
Interface ChartContainer

All Known Implementing Classes:
AbstractChartContainer, PresentationDocument, Slide, SpreadsheetDocument, TextDocument

public interface ChartContainer

ChartContainer is a container which maintains Chart(s) as element(s). Chart(s) can be added, removed and iterated in this container.

Since:
0.6
See Also:
Chart, TextDocument, SpreadsheetDocument, PresentationDocument, Slide

Method Summary
 Chart createChart(String title, DataSet dataset, Rectangle rect)
          Creates a new Chart for this container.
 Chart createChart(String title, SpreadsheetDocument document, CellRangeAddressList cellRangeAddr, boolean firstRowAsLabel, boolean firstColumnAsLabel, boolean rowAsDataSeries, Rectangle rect)
          Creates a new Chart for this container.
 Chart createChart(String title, String[] labels, String[] legends, double[][] data, Rectangle rect)
          Creates a new Chart for this container.
 void deleteChartById(String chartId)
          Deletes chart by chart id.
 void deleteChartByTitle(String title)
          Deletes chart(s) by chart title.
 Chart getChartById(String chartId)
          Gets chart with specified id.
 List<Chart> getChartByTitle(String title)
          Gets chart list with specified title.
 int getChartCount()
          Returns the chart count of this container
 

Method Detail

createChart

Chart createChart(String title,
                  DataSet dataset,
                  Rectangle rect)
Creates a new Chart for this container.

Parameters:
title - chart title.
dataset - chart data set.
rect - chart rectangle.
Returns:
the created chart.
Since:
0.6

createChart

Chart createChart(String title,
                  SpreadsheetDocument document,
                  CellRangeAddressList cellRangeAddr,
                  boolean firstRowAsLabel,
                  boolean firstColumnAsLabel,
                  boolean rowAsDataSeries,
                  Rectangle rect)
Creates a new Chart for this container.

Parameters:
title - chart title.
document - the data source spreadsheet document.
cellRangeAddr - the cell range address list which is used as chart data set.
firstRowAsLabel - whether uses first row as label.
firstColumnAsLabel - whether uses first column as label.
rowAsDataSeries - whether uses data as series.
rect - chart rectangle.
Returns:
the created chart.
Since:
0.6

createChart

Chart createChart(String title,
                  String[] labels,
                  String[] legends,
                  double[][] data,
                  Rectangle rect)
Creates a new Chart for this container.

Parameters:
title - chart rectangle.
labels - label strings
legends - legend strings
data - chart data set.
rect - chart rectangle.
Returns:
the created chart.
Since:
0.6

deleteChartById

void deleteChartById(String chartId)
Deletes chart by chart id.

Parameters:
chartId - the id of specified chart.
Since:
0.6

deleteChartByTitle

void deleteChartByTitle(String title)
Deletes chart(s) by chart title.

Parameters:
title - the title of specified chart(s).
Since:
0.6

getChartById

Chart getChartById(String chartId)
Gets chart with specified id.

Parameters:
chartId - the id of this chart.
Returns:
the chart with specified id.
Since:
0.6

getChartByTitle

List<Chart> getChartByTitle(String title)
Gets chart list with specified title.

Parameters:
title - the title of specified chart(s).
Returns:
the chart(s) with specified title.
Since:
0.6

getChartCount

int getChartCount()
Returns the chart count of this container

Returns:
the chart count of this container
Since:
0.6


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.