DataSource.getAttributeData

Syntax

getAttributeData(dimAttrId: String, index: Number);

Parameters

dimAttrId. Attribute identifier.

index. Value index.

Description

The getAttributeData method returns array of all series values by a single attribute.

Comments

The method returns an array of Number type values.

If an empty value is in the data, it is written once in the beginning of the array.

Example

To execute the example, the HTML page must contain the component named bubbleChart (see Example of Creating the BubbleChart ComponentBubbleChart component named bubbleChart (see Example of Creating the BubbleChart Component). Get an array of all series values by specified attribute and output the first values:

// Get data source
var dataSource = bubbleChart.getDataSources().ds0;
// Get array of all series values by specified attribute
var dimXData = dataSource.getAttributeData("DimX", 1);
// Get the first values of this array
console.log("First three values of the obtained array: " + dimXData[0] + " " + dimXData[1] + " " + dimXData[2]);

After executing the example the browser console displays the three first values in the array that contains data of all the series by specified attribute:

First three values of the obtained array: 2100 -12848 10207

See also:

DataSource