Chart Component

Estimated Reading Time:  8 minutes

Overview

Charts are a great way to display data sets on your application. Using the Chart component, you can add and configure different types of charts on your dashboard. With the right chart, your end-user can visualize your data in a meaningful way. You can find the Chart component under the Charts & Graphs group on the left of the Module Editor.

You'll use a Chart component when you want to display data on your application in a chart or graph.

Here are some common examples of when to use the Chart component.

  • To display a scatter plot to track the number of sales for each sales agent in your department.
  • To display a pie chart to show the percentages of end-user submissions.
  • To display a bar graph that shows product consumption by demographic.

What You'll Learn

In this article, you'll learn how to:

About the Configuration Window

General

Setting

Description

Chart tab

Selected by default and on opening of the modal. This tab gives you access to display settings for naming, Series, Theme, and Format.

Formatting tab

Select this tab to access configuration for your chart's axis. You can also add a legend to your chart in this tab. To add a legend, select the Show Legend checkbox.

Permissions tab

Select this tab to see the RBAC RBAC (Role-Based Access Control) is a method to control system access for authorized users. The role in RBAC refers to the levels of access employees have to a network. (role-based access control) settings of the component.

Cancel Button

Click this button to undo any unsaved configuration changes and return to the canvas.

Save Button

Click this button to save all settings as configured and return to the canvas.

Chart Tab Settings

Setting

Description

Label

A Label indicates the purpose of the corresponding field or component. For input components, the Label tells the end-user how to interact with the field. For non-input components, the Label is not end-user facing, and only appears in the Module Editor. User-friendly Labels make your module more accessible. Keep Labels short and descriptive (a word or two) using title case. For longer entries, use sentence case.

Property Name

A Property Name is the unique field ID used by Unqork to track and link components in your module.

The Property Name is how the software identifies your component. Using Property Names lets you link components, creating logic-based configurations and API (application programming interface) calls.

Property Names must use camel case (stylized as camelCase) without spaces or punctuation.

Chart Title

The title that shows above your chart.

Chart Subtitle

The subtitle that shows under your chart title in a smaller font.

Chart height

Adjusts the height (in pixels) of the box that contains your chart. As you adjust the height of your chart box, the size of the chart resizes accordingly.

Stack Series

Overlays multiple data sets in your graph. This setting prevents multiple data inputs from overlapping in your application.

NOTE  If you only have a single data input, this setting has no effect.

Inputs

Use this section to input and organize the data that your chart must display.

ID

In this field, enter the Property ID or Name of your input data.

NOTE  All data you reference in your input must come from the same array as the data id. When you input additional data, it creates a separate chart.

Label

In this field, enter the value for what you're counting. For example, if your graph displays a count of numbers, enter Number. If you're displaying a percentage of businesses involved in an industry, enter Businesses.

Chart Type

This field sets the type of chart you'll use to display your data. These include the following chart options:

  • Column: Effective for comparison of at least 1 data point. Column charts show data as a rectangle with the height of the rectangle proportional to the values being plotted. Typically, a column chart plots the variable value vertically, and the fixed dimension horizontally.

  • Bar: Effective for comparison of at least 1 data point. Bar charts show data as a bar with the height of the bar proportional to the values being plotted. Typically, a bar chart plots the variable value horizontally, and the fixed dimension vertically.

  • Pie: A pie chart is a circular-type chart, divided into slices to show numeric proportion. In a pie chart, the arc length of each slice relates to the quantity the slice represents. When used in conjunction with the Inner Size setting, you can make your pie chart into a doughnut chart.

  • Line: A line chart displays information as a series of data points connected by straight line segments. These charts are typically used to show information that changes over time.

  • Spline: A spline chart is a line chart that uses curves instead of straight lines. These charts are typically used to emphasize data trends as they play out gradually and over time.

  • Scatter: A scatter chart uses dots to represent values for 2 different variables. The position of each dot in the horizontal and vertical axis shows values for the data point. You'll typically use these charts to show relationships between variables.

  • Funnel: These charts typically show stages in a sales process and the amount of potential revenue for each stage.

  • Bubble: Bubble charts are used to show if at least 3 numerical values are related or share some pattern. The charts can also show trends over time or compare categorical variables.

  • Heatmap: These are specialized charts using colors to represent data values in a table. These are most helpful when used with large and complex data sets.

Categories

In this field, enter the data categories you show on your chart. Log only the key of your data's key:value pairs that you want to display for each category.

For example, your application has 3 insurance provider options. You want to show the end-user how popular each insurance provider is to help guide their choice. Your insurance provider data all share the data key Provider. So, in the Categories field, you enter the key Provider.

Values

Use this field to show the values for each category on your chart. Enter only the key of your data's key:value pairs that you want to display for each category value.

Colors

Manipulates the color of an input category if the input data array contains colors. Your color data can be in word or hex form.

Size

This setting expands the size of your chart in pixels.

Inner Size

Adds an inner-hole to make your pie chart into a doughnut chart.  This setting only applies to pie charts.

Event Output

Allows the end-user to select a category on your chart's user interface. You can then output the selected category to a Property ID.

ID

The Property ID you use to output your Filter Category. For example, if you want to store the selected Filter Category in a Hidden component named idOutput, enter idOutput.

Filter Category

In this cell, enter the input category value displayed on your chart. For example, if your Input category is provider, enter provider.

Chart Theme

Sets the theme or color scheme of your chart.

Month Format

Use this setting to change the month format of date values on your chart.

Drilldown

Details coming soon.

Aggregation

Details coming soon.

Top

Details coming soon.

Print Chart, Download CSV, XLS, and PDF Label

Customizes the label of the download options in the chart drop-down menu.

Field Tags

Assign components one-word labels to help organize, identify, and group the components in your application.

Consider an example from the API Specification Snippet: Field Tags are applied to Hidden components in the panelRequest and panelResponse Panels. The Field Tags identify the data type of parameters included in the API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. request and response. The API Docs Dashboard tool populates with information about each parameter’s data type, identified by the Field Tag.

Field Tags act as a type of Property ID A Property ID is the unique field ID used by Unqork to track and link components in your module. group and let you group components for configuration purposes. Field Tags let you target two or more components using a simple logic component.

For example, add the Field Tag tagForDecision to multiple components in your module. Open the Inputs table of a Decisions component and reference the tagForDecision Field Tag as the input of the Decisions component. The output of the Decisions component then affects all components with the tagForDecision Field Tag.

Save your Field Tags by pressing Enter (Return) or adding a comma after each entry.

Adding a Chart Component

To expand on the example from earlier, say you want to build an application that shows the popularity of insurance providers to clients. You can use a Chart component to display this data in a pie chart. The Chart component can only display data. The application must first determine the number of membership submissions for each insurance provider for the chart to display correctly.

Let’s add a Chart component.

Configure the Data Table Component

Start by creating the data set that contains some customer insurance enrollment data.

1. Drag and drop a Data Table component onto the canvas.
2. In the Property Name field, enter userSubmissionData.
3. In the Label field, enter User Submission Data.
4. In the data table, enter these values:

submission

provider

1

Aetna

2

Cigna

3

BCBS

4

Kaiser

5

UHC

6

Aetna

7

Cigna

8

BCBS

9

Cigna

10

BCBS

11

Kaiser

12

Aetna

13

UHC

14

Cigna

15

BCBS

16

UHC

17

UHC

18

Aetna

19

Aetna

20

Kaiser

5. Click Save.

Configure the Hidden Component

Your Hidden component stores your provider popularity data. Your Chart component references this data to display to the end-user.

1. Drag and drop a Hidden component onto the canvas below the Data Table component.
2. In the Property ID and Canvas Label Text fields, enter providerCount.
3. Click Save.

Configure the Data Workflow Component

Chart components can't make advanced calculations on their own. So, you'll a Data Workflow component to aggregate the data you want to display to the end-user.

1. Drag and drop a Data Workflow component onto the canvas between the Data Table and Hidden components.
2. In the Canvas Label Text and Property Name fields, enter dwfProviderCount.

Configure the Input Operator

1. Drag and drop an Input operator onto the Data Workflow canvas.
2. Configure the Input operator's info window with the following:

Setting

Value

Category

Input

Component

userSubmissionData

Required

Yes

Source

Default

Configure the Pick Operator

1. Drag and drop a Pick operator onto the Data Workflow canvas.
2. Configure the Pick operator's info window with the following:

Setting

Value

Category

Input

Label

 

Pick Keys

provider

3. Connect the output port (right) of the Input operator to the input port (left) of the Pick operator.

Configure the Aggregate Operator

1. Drag and drop an Aggregate operator onto the Data Workflow canvas.
2. Configure the Pick operator's info window with the following:

Setting

Value

Category

Aggregate By

Label

 

Aggregation Type

Count By

Join Group Keys?

No

Group Key

provider

Value Key

count

3. Connect the output port (right) of the Pick operator to the input port (left) of the Aggregate operator.

Configure the Output Operator

1. Drag and drop a Output operator onto the Data Workflow canvas.
2. Configure the Output operator's info window with the following:

Setting

Value

Category

Output

Component

providerCount

Action

value

3. Connect the output port (right) of the Aggregate operator to the input port (left) of the Output operator.
4. Save the Data Workflow.

Configure the Chart Component

Using a Chart component, show the aggregated provider data.

1. Drag and drop a Chart component onto the canvas below the Hidden component.
2. In the Property Name and Label fields, enter submissionChart.
3. In the Chart Title field, enter Providers.
4. In the Inputs table, enter the following:

id

Label

Chart Type Categories Values

providerCount

Member Count

Pie

provider

count

5. Click Save.

Configure the Initializer Component

To initiate your application when the browser opens, you'll use an Initializer component.

1. Drag and drop an Initializer component onto the canvas above your Data Table component.
2. In the Canvas Label Text field, enter initDwfProviderCount.
3. Set the Trigger Type to New Submission.
4. In the Outputs table, enter the following: 

Property ID

Type

Value

dwfProviderCount

Trigger

Go

5. Click Save.
6. Save your module.

The Chart component looks like this in Express View:

Structure of a Chart Component's Data

The Chart component uses input Property IDs to display array data.

Editing a Chart Component's Settings

You can revisit and make changes to your saved component's settings.

1. In the Module Editor hover over the Chart component.

A 5-button toolbar displays above the component on hover-over.

2. Using the toolbar, click the (Settings) button.
3. Using the Configuration window, make changes to the component’s settings as needed.
4. Click Save.
5. Save your module.

Moving a Chart Component

You can move your component to a new position on your canvas.

1. Hover over the Chart component.

A 5-button toolbar displays above the component on hover-over.

2. Click and drag the (Move) button, dropping the component when it’s in position.
3. Save your module.

Copying a Chart Component

You can make a copy of your component using the Copy and Paste tools. Copy and Paste creates an exact copy of your component, matching all settings. The only noticeable difference between the two components is the Property Name. The Property Name on the new component automatically updates. Remember, every component must have a unique Property ID or Name. Property IDs and Property Names are the main methods used to track and connect components in Unqork.

1. Hover over the Chart component.

A 5-button toolbar displays above the component on hover-over.

2. Click the (Copy) button.
3. Click the (Paste) button.
4. Update the copied component’s settings, if needed.
5. Click Save.
6. Save your module.

Removing a Chart Component

You can remove your component from the module.

1. Hover over the Chart component.

A 5-button toolbar displays above the component on hover-over.

2. Click the (Remove) button.
3. Save your module.

Resources