AG Studio Launch Week 🚀🚀🚀 28 Sep - 2 Oct 2026 🚀🚀🚀 Join now

JavaScript Embedded AnalyticsData Overview

Version 3.0.0

Data is provided to Studio using the data property.

Data is retrieved from data sources. A data source represents one or more tables of data.

When multiple tables are provided, Relationships describe how the tables are linked.

See Loading Data for how to provide data directly or have Studio fetch it on demand, and Sharing & Caching Data to reuse data sources across multiple instances of Studio.

The example above demonstrates Loading Data from a single data source.

const studioProperties = {
    data: {
        sources: [{
            id: 'medals',
            data: [
                {
                    year: 2000,
                    sport: 'Swimming',
                    country: 'United States',
                    // ... other fields
                },
                // ... other rows
            ],
        }],
    },

    // other studio properties ...
}

See Data Modelling for relationships, joining dates, schema design, and fan-out detection.

If your data can't be shipped to the browser at all - it's too large, or you want your own backend executing queries directly - see the separate Server-Side Data section.

Data API Copy Link

Properties available on the AgDataSourcesDefinition<TRegistry extends AgBaseRegistry = AgDefaultRegistry> interface.

sourcesCopy Link
AgDataSource<TRegistry>[]
One or more data sources.
relationshipsCopy Link
AgRelationDefinition[]
When using multiple related tables, this describes the fields that link the tables together.
expressionsCopy Link
AgExpressionFieldDefinition<TRegistry, AgFormat<TRegistry>, any>[]
Expression field definitions for calculated columns.
formatsCopy Link
TRegistry["formats"]
Overrides to existing formats, or additional custom formats.
descriptionCopy Link
string
AI-facing overview of the entire dataset: what it contains, what it's for, domain quirks.
calendarsCopy Link
AgCalendar[]
Named time dimensions (calendars) that supply date fragments and a continuous date spine.
bucketsCopy Link
TRegistry["buckets"]
Additional date-fragment bucket definitions to register alongside the built-in set (year, quarter, month, week, day, monthOfYear, dayOfWeek, …). Use this to add project-specific groupings such as weekend, dayOfMonth, or hour that the built-in registry does not include. Provide via createBuckets so type-level registry inference works correctly.
optionsCopy Link
AgDataSourcesOptions
Engine-wide behavioural options, such as fan-out detection policy.