D3 Dashboard Data Providers
Data providers are responsible for obtaining data from the source and then displaying the data in the dashboard page.
Each widget control in a D3 visualization dashboard must have a data provider specified because the data provider feeds the data to the controls in the configuration files. Dynamic updates allow a widget’s current state or data to be updated without the dashboard page re-loading. All widgets, with the exception of the line chart, support dynamic updates. Each widget expects data in a particular format, for example, single bar chart requires data in a two dimension array. The data point always obtains the data for the widget.
A data provider can refer to a base URL. The base URL for your configuration file must be manually updated to your customer project sites.
Dynamic Updates and the Web Server Interface
Data providers are responsible for dynamic updates, and can either use a polling based approach or an automatic updates using Signal-R TM.
Polling Interval
In this approach, at a given interval a request is sent to the data provider to collect the latest data from the data source and then supply the information to the widget. The interval is specified in the JSON file under the privateConfig section of a widget. Polling interval values are specified in seconds, and the default value is 30 seconds. Below is an example of a polling interval configuration for a widget:
"privateConfig":
{
"counterType" : "TotalCount",
"pollingInterval" : 10
}
In the above example, the polling interval is set to 10 seconds. If no value is specified for the polling interval, then the default polling interval is set to the 30 second default value.
Signal-RTM
In this approach, the data provider subscribes to a value the widget is looking for. When the value is changed at the source, the data provider automatically receives notification that the value has changed and then receives the updated value. The data provider is then able to pass the updated value to the widget, which then redraws itself with the updated value.