Draw simple line chart.
- Source:
Methods
(static) init(idopt, optionsopt) → {array}
Initialize the component
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | external:jQuery | string | <optional> | Selector or jQuery element | ||||||||||||||||||||||||||||||||||||||||
options | object | <optional> | Options can be passed to init or read from the data-options attribute on the element Properties
|
- Source:
Returns:
Returns array of all targeted elements
- Type
- array
(private, static) line(options, s) → {object}
Calculates path and points for a line
Parameters:
Name | Type | Description |
---|---|---|
options | object | |
s | number | Index of line to calculate |
- Source:
Returns:
- Type
- object
(private, static) render(idopt) → {external:jQuery}
Render the chart
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id | external:jQuery | string | <optional> | Selector or jQuery element |
- Source:
Fires:
- event:rendered
Returns:
jQuery element
- Type
- external:jQuery
(static) series(idopt, data) → {external:jQuery}
Updates data for the chart
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id | external:jQuery | string | <optional> | Selector or jQuery element |
data | array | Series data. Accepts array or string that can be parsed to array using JSON.parse |
- Source:
Returns:
jQuery element
- Type
- external:jQuery
(static) stream(id, data, duration) → {external:jQuery}
Animates chart to values to in series.
Parameters:
Name | Type | Description |
---|---|---|
id | external:jQuery | string | Selector or jQuery element |
data | array | Series data to add |
duration | string | Duration for animation |
- Source:
Returns:
jQuery element
- Type
- external:jQuery
(static) update(id) → {external:jQuery}
Animates chart to values to in series.
Parameters:
Name | Type | Description |
---|---|---|
id | external:jQuery | string | Selector or jQuery element |
- Source:
Returns:
jQuery element
- Type
- external:jQuery