D3 Visualization Overview
The D3 Visualization extension module is a web client application that allows you to create visual representations of data and display them in a dashboard or a web page. You can organize, view, and compare dynamic data in a graphical format using Data Driven Documents (D3) charts, such as pie, trend, and bar, or a gauge control. You can have as many charts and controls as you need on a D3 Visualization dashboard, and the data for the multiple controls come from one URL, as configured by the management station Web Rule.
D3 is a JavaScript library that uses HTML, among other tools, to integrate visualization in a dynamic format to a web page, website, or, in the case of the management station, a dashboard.
The D3 Visualization graphical charts are generated by obtaining data from a provider and then drawing the control according to the provided values. The values are obtained dynamically using Signal-R TM, or, depending on the data provider, in poll based time intervals.
The D3 Visualization dashboard web application can be displayed in the following clients:
- System Browser, or
- Independent browsers
Additionally, for each dashboard you can:
- Configure style-related properties for each widget. For example, font, colors, and tooltip, etc.
- Re-size and zoom in/out of a dashboard and maintain the aspect ratio.
- Select polling or dynamic data using Signal-R TM strategies to obtain data from the data source on a widget-by-widget basis.
- Localize textual properties. Any string parameter in the dashboard’s configuration file, such as chart titles and error messages, can be localized for a specific language or environment.
- Substitute parameters for dynamic configurations. Any numeric, string, boolean, or object value in a configuration file can be substituted to either reduce the size of the configuration file or to support multiple controls in a given dashboard.
About Bar Charts
The following are some details regarding bar chart controls:
- Vertical and horizontal charts options available.
- The dashboard GMS Projects > Websites > Website > [dashboard name] > Configs contains the following files related to bar chart controls:
- Example bar configuration files: Horizontal_dashboardconfig.JSON and Vertical_dashboardconfig.JSON
- In the > Styles folder, the VerticalBarChartStyle.JSON and HorizontalBarChartStyle.JSON files contains all the styles related to bar charts.
- Single Y and X-axis supported.
- Legend and Title visibility can be turned on (True) or off (False).
About Gauge Controls
The gauge control supports live, dynamic data updates from the cloud or the Web Service Interface. Some of the parameters for customizing the gauge include start and end values of the gauge range, the major and minor interval values, and the arc (size) of the control.
The following are some details regarding gauge controls:
- If a gauge is composed of five sections, and only three colors are provided, the last two segments use the last color specified.
- A color value must be assigned for each sector.
- The dataProvider values define the placement of the gauge needle.
- The parameter for the privateConfig value must either be a concrete value or substitution key:
- Concrete value: "privateConfig": {"pointName": "Analog_Input_1"}
- Substitution value: "privateConfig": {"pointName": "$pName$"}
- Controls are dynamic using Signal-RTM or poll based depending on the data provider. The polling rate is configurable per gauge.
Time Interval
. - The dashboard GMS Projects > Websites > Website > [dashboard name] > Configs contains the following files related to gauge controls:
- An example gauge configuration file: gauge_dashboard
- In the … > Styles folder, the GaugeStyle.JSON file contains all the styles related to a gauge.
- Positive and negative values are supported.
- The Config parameter is unique to the gauge control. It allows you to set the start and end values of the gauge’s value range, as well as value ranges to associated with colors:
- "startValue": "0", - Enter the starting value of the gauge control. In this example, the start is “0”.
- "endValue": "100", - Enter an ending value of the gauge control. In this example, the end value is “100”.
- "colorlimits": - Specify colors and their value ranges. For each color you want on the gauge, tpye the Color and the value Threshold. See the gauge_dashboardconfig file for an example.
- The following layout values are unique to the gauge control:
- value-visible – Set to True or False.
- value-position - Set to middle.
About Grouped Bar Charts
The following are some details regarding grouped bar chart controls:
- dataProvider values determine the bar chart levels.
- Controls are dynamic, unless the data provider source does not support dynamic updates. If poll based, the polling rate is configurable per bar chart.
- The bar chart is available in two layouts:
- Vertical Bar Chart: Bars are drawn vertically parallel to Y-axis
- Horizontal Bar Chart: Bars are drawn horizontally parallel to X- axis
- Single Y and X-axis are supported.
- Legend and Title visibility can be turned on (True) or off (False).
- Any field in a report can be represented in the bar chart.
- Bars for the bar chart are grouped based on the category.
About Pie Charts
A pie chart allows you to represent data with multiple sections. In order to obtain different colors for each section, a start and end color are defined and the colors between the two ranges are calculated. Each section, therefore, is a gradation of the two defined start and colors.
The following are some details regarding pie chart control:
- The data provider values determine the section sizes.
- Controls are dynamic (Signal-RTM) or poll based depending on the data provider. The polling rate is configurable per pie chart.
- Values that are too large to fit in a section of the pie are displayed outside the pie section.
- The dashboard GMS Projects > Websites > Website > [dashboard name] > Configs contains the following files related to pie chart controls:
- An example gauge configuration file: pie_dashboard
- In the Styles folder, the PieChartStyle.JSON file contains all the styles related to a pie chart.
- The section colors are based on the
Chart-startColor
and thechart-endColor
. - Legend and Title visibility can be turned on (True) or off (False).
About Trend Series Charts
A trend series allows you to use an X and Y-axis to plot data. The following are some details regarding trend series chart controls.
- The dataProvider values determine the trend series lines.
- The parameter for the privateConfig value must either be a concrete value or substitution key:
- Concrete value: “seriesidparam”:”Point_ID_1”,
- Substitution value: "seriesidsparam":"$trendSeriesIds$",
- If there is no range specified in the Rule Editor’s To and From fields during configuration, the data from the project’s History Database (HDB) is used to populate the trend series.
- The interval displayed on the chart, depend on the interval criteria provided. Each interval displays the Min. and Max of the COV for that interval.
- The navigation chart at the bottom of a trend series allows you to zoom in and out of sections.
- The dashboard GMS Projects > Websites > Website > [D3 dashboard name] > Configs contains the following files related to trend series controls:
- An example trend series configuration file: line_dashboard
- In the Styles folder, the TrendSeriesStyle.JSON file contains all the styles related to a trend series.
- Legend and Title visibility can be turned on (True) or off (False).
- Single X axis and single or multiple Y axis are adjusted according to data provider values. If there is a different value range, multiple Y axis are used. If same or similar value range, single or combined Y axis is used.
- Zooming allows for static and dynamic updates:
- Static Zooming: Zoom in/out on data already present in the chart. Click the slider to zoom in/out. No new data is retrieved.
- Dynamic Zooming: Data is refreshed and new data retrieved, if scrolling out. You can also scroll outside the configured To/From timeline ranges. Click anywhere in the chart, and then press CTRL + mouse wheel to refresh and pull in new data as you zoom in/out of the chart.
About Multiple Trend Series Charts
A multi Y-axis trend series allows you to use the Y-axis to plot data for multiple data ranges. The following are some details regarding multiple trend series chart controls:
- The dataProvider values determine the trend series lines.
- The parameter for the privateConfig value must either be a concrete value or substitution key:
- Concrete value: “seriesidparam”:”Point_ID_1, Point_ID_2”,
- Substitution value: "seriesidsparam":"$trendSeriesIds$",
- The navigation chart at the bottom of a trend series allows you to zoom in and out of sections.
- Legend and Title visibility can be turned on (True) or off (False). Legend positions for this chart are limited to Top and Bottom only.
- The number of Y-axis displayed depends on the number of points and the range in the data’s value:
- If you have multiple points each with a different value range, a Y-axis is drawn for each range.
- If two points have the same data range, they are combined into a single axis.
Default D3 Visualization Properties
Properties | Radial -Gauge | Pie Chart | HorizontalBarChart | VerticalBarChart | TrendSeriesChart |
background-color | #F2F2F2 | #F2F2F2 | #F2F2F2 | #F2F2F2 | #F2F2F2 |
|
|
|
|
|
|
tooltip-background | White | White | White | White |
|
tooltip-font-color | Black | Black | Black | Black | Black |
tooltip-font | Sans-serif | Sans-serif | Sans-serif | Sans-serif | Sans-serif |
tooltip-font-size | 10 | 10 | 10 | 10 | 10 |
|
|
|
|
|
|
legend-font-color | #37474F | #37474F | #37474F | #37474F | #37474F |
legend-font | Sans-serif | Sans-serif | Sans-serif | Sans-serif | Sans-serif |
legend-font-size | 10 | 10 | 10 | 10 | 10 |
legend-position | top | top | top | top | top |
legend-visible | TRUE | TRUE | TRUE | TRUE | TRUE |
|
|
|
|
|
|
title-font-color | #efefef | #efefef | #efefef | #efefef | #efefef |
title-font | Sans-serif | Sans-serif | Sans-serif | Sans-serif | Sans-serif |
title-font-size | 14 | 14 | 14 | 14 | 14 |
title-visible | TRUE | TRUE | TRUE | TRUE | TRUE |
title-background-color | #404040 | #404040 | #404040 | #404040 | #404040 |
|
|
|
|
|
|
error-font-color | Red | Red | Red | Red | Red |
error-font | Sans-serif | Sans-serif | Sans-serif | Sans-serif | Sans-serif |
error-font-size | 14 | 14 | 14 | 14 | 14 |
font-color | Black | Black | - | - | - |
font | Sans-serif | Sans-serif | - | - | - |
font-size | 12 | 12 | - | - | - |
|
|
|
|
|
|
margin:{ |
|
|
|
|
|
left | 5 | 5 | 5 | 5 | 20 |
top | 5 | 5 | 5 | 5 | 5 |
right | 5 | 5 | 5 | 5 | 5 |
bottom | 5 | 5 | 5 | 5 | 5 |
} |
|
|
|
|
|
|
|
|
|
|
|
start-color | #01579B | #01579B | #01579B | #01579B | #01579B |
end-color | #90CAF9 | #90CAF9 | #90CAF9 | #90CAF9 | #90CAF9 |
|
|
|
|
|
|
value-unit | default | - | - | - | - |
value-position | Middle |
|
|
|
|
angle | 230 | - | - | - | - |
start-value | 0 | - | - | - | - |
end-value | 200 | - | - | - | - |
major-intervals | 5 | - | - | - | - |
minor-intervals | 10 | - | - | - | - |
interval-color | Gray | - | - | - | - |
majorticks-color | Black | - | - | - | - |
minorticks-color | Gray | - | - | - | - |
active-needle-color | Navy | - | - | - | - |
increment-numbers-font-size | 5 | - | - | - | - |
numbers-font | Sans-serif | - | - | - | - |
numbers-font-color | Black | - | - | - | - |
|
|
|
|
|
|
x-axis-color | - | - | #37474F | #37474F | #37474F |
y-axis-color | - | - | #37474F | #37474F | #37474F |
x-axis-font | - | - | Sans-serif | Sans-serif | Sans-serif |
y-axis-font | - | - | Sans-serif | Sans-serif | Sans-serif |
x-axis-font-size | - | - | 10 | 10 | 10 |
y-axis-font-size | - | - | 10 | 10 | 10 |
x-axis-label | - | - | - | - | x-axis |
y-axis-label | - | - | - | - | y-axis |
x-axis-label-visible | - | - | - | - | true |
y-axis-label-visible | - | - | - | - | true |
x-axis-line-opacity | - | - | - | - | 25 |