Skip to main content

Programmatically Creating Dashboards

Creating a Dashboard Using a Template

Programmatically create a dashboard using one of our predefined templates, streamlining the setup process for common use cases
variables

Create an Empty Dashboard

When creating a new custom dashboard, you first need to create an empty state dashboard to add widgets to:
This will return the dashboard id to use in mutations to add widgets.

Add a Distribution Widget

To visualize data variations and overall distribution patterns on your dashboard, use the createBarChartWidget mutation.
variable

Add a Time Series Widget

Use the createLineChartWidget to add a time series widget to your dashboard, which is perfect for visualizing performance over time, data quality, and analyzing trends with options to add multiple lines or split data by specific criteria.
variables

Add a Drift Widget

To effectively monitor data drift, utilize the createLineChartWidget mutation with the widgetType input set to driftLineChartWidget. Below is an example that demonstrates using the PSI. You also have the flexibility to opt for other statistical methods such as Jensen-Shannon distance (JS) or Kullback-Leibler (KL) divergence, depending on your analysis needs.
variables
To get your baselineId you can query your model:

Add a Monitor Widget

Visualize your monitors using a monitor widget.
variables

Add a Statistic Widget

Add a statistics widget that displays key metrics, tailored to focus on either performance indicators or data quality metrics. This widget provides a quick overview and valuable insights at a glance.
variables

Add a Text Widget

Add a text widget to your dashboard to offer explanatory text, headings, or contextual information, enriching the dashboard’s narrative and usability.
variables

Query for Widget IDs

Query Widget Data

Query for the underlying data in a dashboard widget.

Examples