Skip to main content

Custom Charts

Note
  • Custom Chart feature is available to all customers in Standard Plan and above
  • For customers who are eligible for this feature but cannot find it in-app, or customers in Entry Plan and would like to give this feature a spin, please let us know via this form: Holistics's Support Ticket

Introduction

While Holistics's default chart types are often good enough for quick data visualization and analysis, they may not cover many advanced use cases. This is where Custom Chart comes in to help you create complex but reusable chart templates that cater to your specific needs.

Custom Charts is powered by Vega or Vega-lite specifications, with Holistics's specifications on top to allow end-users to configure and interact with the charts in the same way as Holistics's built-in charts.

Getting started

Building a custom chart happens in two phases: Define a custom chart template, then use the template to build your report.

Step 1: Define a template (custom chart definition)

A template controls how the chart looks and behaves, decoupled from any single report.

Holistics offers a few ways to create one:

  • Start from an existing template
  • Generate one with AI
  • Or, write it from scratch

However you start, the result is a CustomChartDef block that combines a Vega or Vega-Lite specification with Holistics's fields and options syntax:

CustomChartDef my_bar_chart {
label: 'My Bar Chart'
fields { ... }
options { ... }
template: @vgl { ... };; // use @vg instead for Vega syntax
}

Step 2: Use the template in a visualization

Reference the template by name in a CustomChart viz block, the same way you'd add any built-in chart.

block my_block: VizBlock {
viz: CustomChart {
custom_chart: my_bar_chart // reference the template by name
dataset: my_dataset
field x_axis: dimension_field
field y_axis: measure_field
}
}

To build your own:

Supported Holistics features

Custom charts support the following Holistics features:

  • Interactive features (Explore, Date-drill, Cross-filter, Drill-through, View underlying data, etc.)
  • Data Alert and Data schedules for reports
  • Export reports to PNG/PDF/Excel/CSV

Syntax reference

For a full parameter reference for CustomChartDef and CustomChart, see the AML Custom Chart Reference.

tip

Hover over CustomChartDef or CustomChart in the code editor to see suggestions for available parameters.

Legacy custom chart

Before as-code support, custom charts were non-as-code defined through Admin Settings > Custom Chart. For tenants 4.0, existing charts are still usable, viewable, editable, and deletable, but new charts must be created as code. To migrate a chart:

  • Go to Admin settings > Custom charts
  • Select the chart and click Copy to Development to create the as code chart from the legacy chart
  • Replace chart references in your dashboards:
    • Canvas dashboard: Go to Development > Code search to find and replace chart references
    • Quick dashboard: Locate and replace the charts manually
  • Once all dashboard references are updated, you can safely delete the legacy chart
Legacy custom charts in Admin Settings

Open Markdown
Let us know what you think about this document :)