Pie Chart Node

Shows numerical proportions as slices of a pie. Ideal for displaying the parts of a whole, illustrating how different sections contribute to the total.



What is a Pie Chart?

The pie chart is a widely used graphical tool for visually representing the distribution of data as proportions or percentages at a specific moment in time. Its primary purpose is to convey the relative contributions of different categories within a dataset in a clear and intuitive manner. Each segment of the pie chart corresponds to a specific category, with its size proportional to the percentage it represents. By presenting data in this format, users can quickly grasp the relative significance of each category and identify patterns or trends within the dataset. Whether used for analyzing survey responses, budget allocations, or market shares, the pie chart offers a simple yet effective way to visualize and communicate percentages of data at a glance. 

Inputs

The pie chart has a mandatory input. This is:

Input

Requirement

Comments

Data Field Name

Mandatory

This is the field name within the incoming JSON payload that contains the data to be displayed on the widget.

Functionality

The node will take values from the Data Field Name and display it on the pie chart. The values will be assigned to different slices based on the Pie Type configuration. 

How to Use

Implementation

In the Rayven Workflow Builder:

  • Select Visualizations.
  • Drag the pie chart node to the canvas.
  • Provide an input to the pie chart node by connecting it to another node.
  • Double click on the pie chart node to open the configuration window.

Configuration

Section: General

This section contains basic configuration elements required for any pie chart implementation

Field

Requirement

Comments

Widget Name

Mandatory

Enter a name for this node.


This provides a handle to which you and others can refer, so it should be simple but meaningful and explain the node’s purpose.

Widget Subtitle

Optional

Additional text that can be used to explain the data presented by the node.


This will appear directly under the Widget Name, in a smaller text size.

Device/Device Label Name

Optional

Select this checkbox to display the device or label name on the widget.

Pie Type

Mandatory

A drop down list of options to select as the pie chart type:

    • Slice per value (count only) - Each slice will be determined by the values in the data field name, and will add +1 to the count each time the node receives that value.
    • Slice per child field - Adds a slice based on a child field in the data field name, the value it will display for that slice will be the value of that child field.
    • Slice per device - Each device (or device filter) will have its own slice.
Slice per device label - Each device label will have its own slice.

Data Field Name

Mandatory

This is the field name within the incoming JSON payload that contains the data value to be displayed on the widget.


Expected data format changes depending on the pie type option selected:

    • Slice per value (count only)
      Expected data format:
      {
      “field_name”:1
      }
      The pie chart will count the number of times the value of 1 is received
    • Slice per child field
      Expected data format:
      {
          “field_name”:{
      “A”:1,
      “B”:2
          }
      }
      The pie chart will aggregate the values of the child fields A and B based on the function selected.
    • Slice per device
      Expected data format:
      {
      “field_name”:1
      }
      The pie chart will aggregate the value received and create legend based on the device that the payload is tied to.
Slice per device label
Expected data format:
{
“field_name”:1
}
The pie chart will aggregate the value received and create legend based on the device label value that the payload is tied to. The label is based on the Label configuration in the Group by Device Label section.

Function

Mandatory
(Only available if Pie Type is slice per child field, device or device label)

A drop down list of functions to perform over the calculation interval:

  • Last value received
  • Minimum
  • Maximum
  • Sum
  • Average
  • Last Value from Each Device with Common Tag (only available for slice per child field)

Sub Function 

(Only available when “Last Value from Each Device with Common Tag” is selected in Function)

Mandatory

A drop down list of functions to perform over the calculation interval:

  • Sum
  • Average
  • Maximum
  • Minimum

Calculation Interval

Mandatory

The interval that the calculation will take place over.

Units of Measurements

Mandatory

A drop down list to display the units of measurement for the calculation intervals.

  • Minutes
  • Hours
  • Days
  • Weeks (Starts on Monday)
  • Weeks (Starts on Sunday)
  • Months
  • Years

Widget refresh interval (sec)

Mandatory

Configure how often the chart widget will refresh. The default is every 60 seconds.

Decimal Precision

Optional

Specifies the decimal precision for values in the column.

Dashboard to link to

(Only available when Slice per device or device label is selected as the pie type)

Optional

Drop down list to select a configured dashboard to link to from this column.

Visual Options

Mandatory

A drop down list of different visual options for the pie chart:

  • Donut
  • Full
  • Semi Donut

Sort Slices by

Mandatory

A drop down list of how the pie chart should be sorted:

  • Receiving Order
  • Color Picker Order
  • Size Ascending
  • Size Descending
  • Alphabet Ascending
  • Alphabet Descending


Section: Tooltip Info

Field

Requirement

Comments

Show Tooltip

Optional

When checked, it allows users to display their tooltip text on the widget.

Tooltip Text

Optional

This section only exists when “Show Tooltip” is checked.

Users are able to write any tooltip message they desire which will be display on the widget.



Section: Color Picker

This section allows configuration for the color segments in the chart.

Field

Requirement

Comments

Value

Optional

This is the value for the data field that will have the chosen color applied to its slice.

Hex Color

Optional

Hex code entry to select a color for the slice.



Section: Group by Device Label

Field

Requirement

Comments

Device label name

Optional

There are no labels available in this box until you have saved at least one in the Device Labels section of the Workspace. 


Select a Label to use to filter devices.

Grouped

Optional

Select a method for grouping the widget on the dashboard from the dropdown:


No Grouping (widget per device): one widget will appear for each device


Group by device label value (Widget per label value): One widget will appear for each value of a label. For example, if the Label is ‘Color’ and there are the values ‘Green’ and ‘Gold’, then two widgets will be displayed, one with devices with Color Label equal to “Green” and one with devices with Color Label equal to “Gold”


Group by device label name (One widget): Only one widget will be displayed and this will contain data from all devices.