Important version information!

You are browsing a class reference for deprecated Version 2 of the JavaScript Charts.

Documentation for other versions: amCharts 4 (current) or amCharts 3.

DataSetSelector

DataSetSelector is a tool for selecting data set's as main and for comparing with main data set.

Properties

PropertyTypeDefaultDescription
comboBoxSelectTextStringSelect...Text displayed in the "compare to" combobox (when position is "top" or "bottom").
compareTextStringCompare to:Text displayed near "compare to" list.
listHeightNumber150The maximum height of the Compare to field in pixels.
positionStringleftPossible values: "right", "left", "top", "bottom". "top" and "bottom" positions has a limitation - only one data set can be selected for comparing.
selectTextStringSelect:Text displayed near "Select" dropDown.
widthNumber180Width of a Data set selector, when position is "left" or "right".

Methods

NameParametersReturnsDescription
addListener(type, handler)type - string like 'dataSetSelected' (listed in 'events' section of this class). handler - function which is called when event happensAdds event listener to the object.
removeListener(obj, type, handler) Removes event listener from the object.

Events

NameEvent objectDescription
dataSetCompared{type:"dataSetCompared", dataSet:dataSet}Dispatched when the data set is selected for comparing.
dataSetSelected{type:"dataSetSelected", dataSet:dataSet}Dispatched when the main data set is changed.
dataSetUncompared{type:"dataSetUncompared", dataSet:dataSet}Dispatched when the data set which was selected for comparing is unselected.