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

Step 1: Define a custom chart

Go to Development > Add > Custom chart. You can start in three ways:

  • Chat with AI: Describe the chart you want in plain language and let AI generate the definition
  • Start from template: Pick from the built-in chart library and customize the result
  • Start from scratch: Write the AML from an empty template

The result is a CustomChartDef block in a .chart.aml file in Development> Library > Custom charts folder:

CustomChartDef my_bar_chart {
label: 'My Bar Chart'
description: '...' // optional

fields { ... }
options { ... }

template: @vgl { ... };; // use @vg instead for Vega syntax
}

To learn how to write a custom chart definition:

Step 2: Preview the chart

The chart editor shows your AML code and a live chart preview side by side. Populate the preview with a real dataset to see how the chart renders with actual data.

Previewing a custom chart side-by-side with its AML code

Step 3: Build a visualization from the definition

Once defined, the chart definition is available in the chart picker alongside built-in charts. When you add a custom chart to a visualization block, the generated code looks like this:

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

Supported Holistics features

Custom charts support the following Holistics features:

  • Interactive features (Explore, Date-drill, Cross-filter, Drill-through, 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 :)