Vvidget Code > Common Keys > Data Oriented
This section explains keys that are common to data-oriented facilities.
The following table defines the input string key and value pairs for data values. Use only one of these keys, depending on the chart type and data format.
Data Value Specific | |
Key | Data Value Description |
data_I | A key that represents one graphic worth of data. For example, the Ith curve. The format for the value depends on the data_format_type key. The index I runs from 1 to N inclusive where N is the number of curves. |
data_values | A key that represents a collection of data, for example multiple curves. The format for the value depends on the data_format_type key. |
yM_data_I | This is the same as the key data_I except it associates the data with a particular y-axis. If M is 1 then the y-axis is the left axis, if M is 2 then the y-axis is the right axis. For example, y2_data_3 is the data associated with the third curve on the right hand y-axis. If this key is present then the two-y-axis template is used. |
yM_data_values | This is the same as the key data_values except it associates the data with a particular y-axis. If M is 1 then the y-axis is the left axis, if M is 2 then the y-axis is the right axis. For example, y2_data_values is the data associated with the right hand y-axis. If this key is present then the two-y-axis template is used. |
The following table defines keys and values for data format and type. Any of these keys can appear in the input string.
Data Format Or Source Specific | |
Key | Value Description |
data_format_type | Defines the format for the values of the data keys. If not present, or if this key has value of 0 then the data format is explained in the relevant chart type section. Otherwise the data format is one of those explained below. |
data_reference_type | If 0 then data keys refer to the value of the data. If 1 then the data keys refer to a path on the file system. If 2 then the data keys refer to a URL that returns the data as Content-type: text/plain. The contents of the file at that path, or the text returned by the URL, are read and inserted as if the data key referred directly to that contents. |
data_subdirectory | Refers to the directory where data files reside on the file system. |
All data-oriented chart types have data-key name and data-format-key value pairs. The following section defines that relationship.
Scalar-Data Set
Scalar data is a list of values and is organized as a blank space delimited list of numbers, i.e.:
V1 V2 ... VN
Applies to these chart types:
Data Key | data_format_type Key Value | Chart types that have conforming pairing. |
data_values | 0 | This is the default pairing for Pie, Bar and Column chart types. |
data_I | 0 | The default pairing for Bar and Column chart types where I runs from 1 to the number of labels. The number of values, N, in each group corresponds to the number of bars at that label. The bars are offset and narrowed in proportion to the number in the grouping. |
Point-Data Set
Point data is a list of points, either 2D or 3D, and is organized as a blank space delimited list of x y pairs, i.e.:
X1 Y1 X2 Y2 ... XN YN
Or as x y z triplets for 3D data points:
X1 Y1 Z1 X2 Y2 Z2 ... XN YN ZN
Applies to these chart types:
Data Key | data_format_type Key Value | Chart types that have conforming pairing. |
data_I yM_data_I | 0 | The 2D form is the default pairing for Line, Area and Date chart types where I runs from 1 to the number of curves. |
data_values | 0 | The 3D form is the default pairing for Perspective Scatter chart type. |
Multiple Point-Data Sets
Multiple point data is a list of points, either 2D or 3D, and is organized as tab and return character delimited list of x y pairs, i.e.:
X11 Y11 X12 Y12 ... X1N Y1N
...
XM1 YM1 XM2 YM2 ... XMN YMN
Where N can be different for each curve.
Applies to these chart types:
Data Key | data_format_type Key Value | Chart types that have conforming pairing. |
data_values yM_data_values | 0 | The 2D form is the default pairing for Line, Area and Date chart types |
or for the dimensions embedded into the data stream as scalars that precede the data point as such:
NUMBER_OF_CURVES NUMBER_OF_POINTS X11 Y11 X12 Y12 ... X1N Y1N ... NUMBER_OF_POINTS XM1 YM1 XM2 YM2 ... XMN YMN
Where N varies to correspond to NUMBER_OF_POINTS
.
Applies to these chart types:
Data Key | data_format_type Key Value | Chart types that have conforming pairing. |
data_values yM_data_values | 1 | Format type for Line, Area and Date chart types |
Matrix-Data Set
Matrix data is a list of white space delimited values, i.e.:
A11 A12 ... A1N A21 A22 ... A2N ... AM1 AM2 ... AMN
The dimensions and other attributes of the data are defined in other related keys, such as x_grid_length. (i.e.: any tab or return structure is treated as a simple delimiter).
Applies to these chart types:
Data Key | data_format_type Key Value | Chart types that have conforming pairing. |
data_values | 0 | This is the default pairing for the Point Map and Perspective Surface chart type. |
Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information. |