new require("populationView")() → {function}
Population informer
- Source:
- See:
Requires:
- module:defaultView
- module:populationModel
- module:text!templates/populationTpl
- module:underscore
- module:utils
- module:populationAvgChartView
- module:populationYearChartView
Returns:
Backbone.View constructor
- Type
- function
- Source:
Extends
Members
-
mode :object
-
Current widget mode
Type:
- object
-
ModelConstructor
-
Population model class
-
name :String
-
Template id
Type:
- String
-
template :String
-
Raw handlebars template
Type:
- String
-
title :String
-
Default widget title
Type:
- String
Methods
-
afterRender()
-
Menu event bindings
-
getRelatedView()
-
Gets related view by widget mode
-
onMenuClick()
-
Primary and secondary menu click handler. Switches widget mode by click
-
renderData()
-
Chart update & widget menu render
-
switchMode(year)
-
Updates model state by selected mode
Parameters:
Name Type Argument Description yearString | Number <optional>
Year in xxxx format