DataSetSelector | JavaScript Stock Charts v. 3 | amCharts

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

### Properties

Property | Type | Default | Description
--- | --- | --- | ---
comboBoxSelectText | String | Select... | Text displayed in the "compare to" combobox (when position is "top" or "bottom").
compareText | String | Compare to: | Text displayed near "compare to" list.
listeners | Array[Object] |  | You can add listeners of events using this property. Example: listeners = [{"event":"dataSetCompared", "method":handleEvent}];
listHeight | Number | 150 | The maximum height of the Compare to field in pixels.
position | String | right, left, top, bottom | Possible values: "right", "left", "top", "bottom". "top" and "bottom" positions has a limitation - only one data set can be selected for comparing.
selectText | String | Select: | Text displayed near "Select" dropDown.
width | Number | 180 | Width of a Data set selector, when position is "left" or "right".

### Methods

Name | Parameters | Returns | Description
--- | --- | --- | ---
addListener(type, handler) | type - string like 'dataSetSelected' (listed in 'events' section of this class). handler - function which is called when event happens | Adds event listener to the object. |
removeListener(obj, type, handler) |  | Removes event listener from the object. |

### Events

Name | Event object | Description
--- | --- | ---
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.