Dashboard > BI Server Documentation - Latest > ... > Chart Reference > The XY Dataset
Added by Gretchen Moran, last edited by patrick hart on Jan 29, 2008  (view change)
Labels: 
(None)


The XY Dataset

An XY Dataset plots pairs of values as points on the chart. The XY charts have two numeric axes.

If the dataset is arranged by column, each row is expected to have three columns. Each row is assumed to represent one data point on the chart, ordered by the series name and domain value. The first column's values contain the name of the series. The second column is numeric, containing the domain value of the data point. The third column is numeric, containing the range value of the data point.

If the dataset is arranged by row, each row is expected to contain all the data points for the series. The first column's values contain the name of the series. It is assumed the other columns in the row consist of a collection of x/y data points (i.e. columns 2, 4, 6 etc. will be domain values, and columns 3, 5, 7 etc will be range values).

A Column-based Dataset Example

Here is a query and dataset from the Pentaho sample data that demonstrates a column-based XY dataset:

Select PRODUCTLINE, MSRP, BUYPRICE FROM PRODUCTS order by PRODUCTLINE

This query results in the following dataset (the data has been truncated to save space):

PRODUCTLINE MSRP BUYPRICE
Classic Cars 101.15 46.53
Classic Cars 80.84 32.33
Classic Cars 118.28 69.78
Classic Cars 140.43 98.3
Classic Cars 107.08 62.11
...    
Motorcycles 81.36 34.17
Motorcycles 102.05 56.13
Motorcycles 40.23 24.14
Motorcycles 99.89 66.92
...    
Planes 49.66 32.77
Planes 74.03 36.27
Planes 80 54.4
Planes 118.65 59.33
Planes 99.72 68.8
...    

Handing this dataset to a chart, the chart will plot the data by column by default. Here is an xy line chart example:

A Row-based Dataset Example

To plot the data by rows, you must add the by-row property to the action sequence component definition. (You can set this property in the Design Studio by checking the Chart Row Dimension checkbox.) Also, your data must be arranged in row format.

<by-row>true</by-row>

Unlike the categorical dataset, arranging the dataset by rows does not change the plotting of the data on the chart. The exact same chart as above would be generated by this dataset:

Classic Cars 101.15 46.53 80.84 32.33 118.28 69.78 140.43 98.3 107.08 62.11
Motorcycles 81.36 34.17 102.05 56.13 40.23 24.14 99.89 66.92    
Planes 49.66 32.77 74.03 36.27 80 54.4 118.65 59.33 99.72 68.8
...                    

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.2 Build:#807 May 20, 2007) - Bug/feature request - Contact Administrators