DataSource.AttributeName

Syntax

AttributeName: String;

Description

The AttributeName property determines attribute name by its identifier.

Comments

Use the setAttributeName method to set the property value and the getAttributeName method to get the property value. Property value cannot be set from JSON.

The getAttributeName method returns the dimAttrId parameter: that is, attribute identifier, and the setAttributeName method returns the following parameters: dimAttrId - attribute identifier, name - new name of the attribute.

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). Set a new value for attribute and show this value:

// Get data source
var dataSource = bubbleChart.getDataSources().ds0;
// Set a new attribute value
dataSource.setAttributeName("DimX", "GDP, mln rubles");
// Show new value of the attribute
console.log("New attribute value: " + dataSource.getAttributeName("DimX"));

After executing the example a new attribute value is output in the browser console:

New attribute value: GDP, mln rubles

See also:

DataSource