org.pentaho.chart.core
Class ChartSeriesDataLinkInfoFactory
java.lang.Object
org.pentaho.chart.core.ChartSeriesDataLinkInfoFactory
public class ChartSeriesDataLinkInfoFactory
- extends Object
This factory class generates the ChartSeriesDataLinkInfo class object.
- Author:
- Ravi Hasija
Assumptions:
1. We are iterating at level 1 and not doing depth traversal on each element.
2. We do not parse the ChartDocument when we do not really have any data.
3. When comparing the column names we ignore case.
4. The column numbers are zero based.
5. The order of matching the series to a column is based on the following priority list.
a. If we find a column number specified in a series tag and it is correct then we
use that column number for the given series element.
b. If we find a column number and it is incorrect AND we have a correct column name
specified, then we use the column name to find the column position for the given
series element.
c. The series element position in the XML doc is used if we do not have a column position
or column name specified for the given series element.
generateSeriesDataLinkInfo
public static ChartSeriesDataLinkInfo generateSeriesDataLinkInfo(ChartDocument chartDoc,
ChartTableModel data)
throws IllegalArgumentException
- Creates the chart series data link info object, updates it and returns the updated object.
- Parameters:
chartDoc
- ChartDocument that contains the XML elements.data
-
- Returns:
- The chart series data link info that has the data.
- Throws:
IllegalArgumentException