Class: Nvd3CurveChartView

OSH.UI. Nvd3CurveChartView

new OSH.UI.Nvd3CurveChartView()

Example

// Chart View
var windSpeedChartView = new OSH.UI.Nvd3CurveChartView(chartDialog.popContentDiv.id, [{
styler: new OSH.UI.Styler.Curve({
valuesFunc: {
dataSourceIds: [weatherDataSource.getId()],
handler: function(rec, timeStamp) {
return {
x: timeStamp,
y: parseFloat(rec[2])
};
}
}
})
}], {
name: "WindSpeed chart",
yLabel: 'Wind Speed (m/s)',
xLabel: 'Time',
css: "chart-view",
cssSelected: "video-selected",
maxPoints: 30
});

Extends

Methods

inherited addViewItem(viewItem)

Add viewItem to the view

Name Type Description
viewItem
Name Type Description
divId

inherited beforeAddingItems(options)

Name Type Description
options

inherited getDataSourcesId(){Array}

Returns:
Type Description
Array

inherited getDivId(){string|*}

Returns:
Type Description
string | *
Returns:
Type Description
string | *

selectDataView($super, dataSourceIds)

Name Type Description
$super
dataSourceIds

inherited setData(dataSourceId, data)

Name Type Description
dataSourceId
data

Show the view by removing display:none style if any.

Name Type Description
properties
Name Type Description
properties

updateCurve(styler, timestamp, options)

Name Type Description
styler
timestamp
options