new Choropleth( [options])
Class for creating a set of controls for gerating rules for choropleth maps
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
options |
module:nyc/Choropleth~Choropleth.Rules |
<optional> |
The rules to set on the controls |
- Source:
Fires:
Extends
Members
-
<static, constant> COLORS :Object
-
Color choices for choropleth maps
Type:
- Object
- Source:
Methods
-
append(elements)
-
A method to append elements to the container
Parameters:
Name Type Description elementsjQuery | Element | Array.<Element> | string The element to append
- Inherited From:
- Overrides:
- Source:
Returns:
The container
- Type
- jQuery
-
find(selector)
-
A method to return elements in the container
Parameters:
Name Type Description selectorstring jQuery selector
- Inherited From:
- Overrides:
- Source:
Returns:
The element
- Type
- jQuery
-
getContainer()
-
A method to return a control container HTML element wrapped in a JQuery
- Inherited From:
- Overrides:
- Source:
Returns:
The the control container HTML element wrapped in a JQuery
- Type
- jQuery
-
legend(title, classifications, colors, places)
-
Generates an HTML legend for a choropleth map
Parameters:
Name Type Description titlestring The title of the legend
classificationsArray.<number> The numeric classification buckets for the legend
colorsArray.<string> The colors for the classifications
placesnumber The nuber of places for rounding of the classifications
- Source:
Returns:
The legend
- Type
- JQuery
-
off(eventName, evtHdlr [, hdlrScope])
-
Remove a previously connected event handler
Parameters:
Name Type Argument Description eventNamestring The name of the event to which the handler will be connected
evtHdlrfunction The event handler function
hdlrScopeObject <optional>
The scope in which to invoke the event handler
- Inherited From:
- Overrides:
- Source:
-
on(eventName, evtHdlr [, hdlrScope])
-
Connect a function to an event
Parameters:
Name Type Argument Description eventNamestring The name of the event to which the handler will be connected
evtHdlrfunction The event handler function
hdlrScopeObject <optional>
The scope in which to invoke the event handler
- Inherited From:
- Overrides:
- Source:
-
one(eventName, evtHdlr [, hdlrScope])
-
Connect a function to an event for a single invocation
Parameters:
Name Type Argument Description eventNamestring The name of the event to which the handler will be connected
evtHdlrfunction The event handler function
hdlrScopeObject <optional>
The scope in which to invoke the event handler
- Inherited From:
- Overrides:
- Source:
-
prepend(elements)
-
A method to prepend elements to the container
Parameters:
Name Type Description elementsjQuery | Element | Array.<Element> | string The element to append
- Inherited From:
- Overrides:
- Source:
Returns:
The container
- Type
- jQuery
-
trigger(eventName [, data])
-
Trigger a named event with event data
Parameters:
Name Type Argument Description eventNamestring The name of the event to trigger
dataObject <optional>
The event data
- Inherited From:
- Overrides:
- Source:
-
val( [options])
-
Get or set the choropleth rules
Parameters:
Name Type Argument Description optionsChorpleth.Rules <optional>
The rules to set on the controls
- Source:
Returns:
The rules that are set on the controls
- Type
- Chorpleth.Rules
Type Definitions
-
Rules
-
Rules options for module:nyc/Choropleth~Choropleth#val
Type:
- Object
- Source:
Properties:
Name Type Description countnumber The number of classifications
methodstring The classification method
colorSchemestring The name of the color scheme ('divergent' or 'sequential')
colorsArray.<string> An array of hex colors
Events
-
change
-
The change event
Type: module:nyc/Choropleth~Choropleth
- Source: