In this article, we will guide you through building widgets on Dashboards. If you are not familiar with the concept of filtering and grouping, please do check our article on Core concepts of analyzing product data.

We will focus on configuring individual widgets here, for general information about using dashboards, check out Creating your own dashboard

Contents

1. Introduction

2. Setting up the data

3. Configuring visualization type and layout

4. Adding annotations

1. Introduction

When creating a new widget, you have the option to pick from one of our predefined templates or starting from scratch by choosing Custom. Please note that the full set of options is not available for all widget templates.
In this guide, we will start with the Custom widget template.

Image 1: Choosing a widget template

Clicking Install widget will bring up the view for configuring our widget.

Image 2: The widget editing view

On the left side of the view, we have all the controls for configuring our widget. On the right, we have a live preview of the widget taking form.

The configuration side is divided into two main parts:

  • Data - where you set up the dataset to be analyzed

  • Layout & Format - where you configure the visualization

2. Setting up the data

Let's start configuring our widget by setting up the data in the Data section of the widget editing view.

The section can roughly be divided into four sections:

  1. Date filter

  2. Filters

  3. Values

  4. Rows & columns

Let's dig into the role of each of the sections!

Image 3. The Data section of the widget editing view

1. Date filter

The date filter limits the timeframe of data points included in our dataset. In practice, there must be at least one price history datapoint within the defined timeframe. When analyzing time-series we are setting the date window which we want to view. We'll talk more about time-series later in the article.

You have the option to option to either use the timeframe set in the Dashboard or set one specific to this widget. Uncheck the switch to set a custom timeframe, either relative to the current date or as an absolute timeframe.

2. Filters

With filters, we narrow down our all data in the product catalog to pick entries relevant to our desired subset of products. Setting filters here follows the same logic as advanced filter anywhere else in the app.

You also have the option to apply global filters on top of the filters you define for this individual widget.

3. Cell values

Now that we have narrowed down our dataset with filters, we'll begin by picking what we want to analyze. Let's start by picking a cell value. Clicking the plus icon opens a list of all available product catalog data fields. Let's choose Price in this exercise.

We now have an entry "Average of price" in the Cell values section. Click on the entry to open a menu for configuring the field.

The menu options are:

  • Normalize currency (applicable only when chose value field is Price)

  • Axis setting - Allows you to choose either the primary or secondary axis. Only applicable when the layout is a chart with axes and you have multiple value fields

  • Value function - The function used for joining the groups' values

  • The value field - You can change a previously selected field here

  • Delete - removes the entry

You can also delete an entry using the X button on the right of the item. Reordering the items is done by dragging to the desired position.

Image 4. Setting and editing cell values

Multiple value fields on separate axes

When you choose two or more cell values, you have the option to show the values on either the primary or secondary axis. The scales of the axes are set independently from each other. This is a handy feature if the values of one field are significantly greater than the other, eg. when showing both prices and product counts.

4. Columns & Rows

Columns and rows are the grouping factors used to condense the product catalog data. In order to display results in the widget preview section, we have to choose at least one grouping factor as row or column, in addition to the cell value which was set previously.

Similarly to the value field selector, hitting the plus icon opens a menu where we can choose between all available product catalog columns. There are also some additional options, such as grouping by date, month, or year. We can use these options when creating time-series for eg. price history analysis.

When we have set at least one row or column grouping factor, we will see the data begin taking form:

Image 5: Setting and configuring row and column grouping factors

The right order and placement of row and column items depends greatly on the visualization type and the analytical goals. You can easily move the items around by dragging and flip rows and columns using the Swap button.

Configuring visualization type and layout

The Layout and Format section of the widget editing view is where we configure how we want our data to be displayed.

Image 6: Configuring the layout of the widget

By default, the data is shown in a table. This visualization gives us an accurate overview of the exact row, column, and cell values. Use the Layout type selector to choose between the available layout types:

  • Table - Best suited for viewing exact values

  • Column chart - Works well for comparing absolute values between the groups

  • Bar chart - The same as column chart but with flipped axes

  • Pie chart - Perfect when analyzing a few values proportionally with each other

  • Doughnut chart - Same function as a pie chart but with a slight difference in visual appearance

  • Line chart - Best suited for time-series analytics

  • Area chart - Most commonly used in time series analytics when comparing proportions

Setting custom bounds

By default, the chart is scaled automatically to fit all of your data as compactly as possible. If there is very little variance between the max and min values this will result in visually large differences even though the absolute values are very close. On the contrary, if there are irregularly large of small values compared to the rest of the dataset, subtle differences may not be visible. In these cases, you might want to adjust the lower ad upper limits of the scale manually.

To set the custom bounds check the Custom bounds switch and set the min and max values of the axis.

Image 7: Setting custom bounds

4. Adding annotations

Annotations can be used to mark a certain value, such as a target on a chart. To add an annotation, hit the switch Show annotations. This will open a section to set the color, value, and label of the annotation.

Image 8: Adding an annotation

Please note that annotations are available only on charts with a linear value axis, such as column, bar, and line charts.

Did this answer your question?