Dashboards your users configure

Let users build their own dashboards: each chart is a small JSON definition that names a dataset and its fields. Store it per user, draw it with <RioChart Definition="..." />, and let people change it in a form, as JSON, or by asking an AI agent. The data and who may see it stay in your app.

A definition holds no data and no code: only names, types and options, checked when it is read, with errors that say what is wrong. That makes it safe to save what users write, and every RioCharts 1.x reads the definitions saved today. The same definition renders in Blazor, to PNG or SVG on the server, and through the AI tools.

Try the editor

Under development. The chart editor is a preview of an editor component planned after 1.0; it is not in the packages yet, and what it looks like and how it works will change. Tell us what works and what does not in an issue on GitHub.

Four tiles from saved definitions. Edit opens the editor: pick what to show and a chart, fill in the data it needs, then fine-tune. Add chart starts a new tile, Use your own data starts one from a file of yours, and What is saved shows what your app would store: one JSON definition per tile, nothing else.

Use your own data

A CSV file with a header row, or a JSON array of objects. It is read here, in your browser, and never sent anywhere; usage statistics stop once you open this (see Privacy). It is gone when you leave the page.

Choose a file or drop it here CSV or JSON, up to 10 MB
Or paste CSV or JSON
The data on this page
Data

Online store traffic per sales channel (Web, App, Marketplace), hourly for one week. Passed in from C# with Datasets="datasets". 504 rows, 6 fields

timestamp timechannel textsessions numberorders numberrevenue numberresponseMs number
2026-11-14 00:00Web778181283175
2026-11-18 04:00Web2987577165
2026-11-15 09:00App892166131
2026-11-19 14:00App3679742154
2026-11-16 19:00Marketplace3528651169

5 of 504 rows, spread over the dataset.

Orders per day
Chart with 3 series. Web: 7 values, lowest 325 at 11/20/2026 12:00 AM, highest 348 at 11/16/2026 12:00 AM, trend stable. App: 7 values, lowest 213 at 11/14/2026 12:00 AM, highest 224 at 11/16/2026 12:00 AM, trend rising. Marketplace: 7 values, lowest 112 at 11/18/2026 12:00 AM, highest 121 at 11/14/2026 12:00 AM, trend falling. 00.5k1kNov 15Nov 17Nov 19WebAppMarketplaceUse Left and Right to move between points, Up and Down to change series. Press Escape to leave.
Revenue per category (k€)
Chart with 1 series. Revenue: 4 values, lowest 125 at Accessories, highest 447 at Shoes. 0200400600ShoesClothingCampingAccessoriesUse Left and Right to move between points. Press Escape to leave.
Revenue per channel
Donut chart with 3 items: Web 183,476, App 118,713, Marketplace 64,854. WebAppMarketplace183,476 €64,854 €118,713 €Use the arrow keys to move between slices. Press Escape to leave.
Response time
Chart with 1 series. Average: 168 values, lowest 131.7 at 11/15/2026 9:00 AM, highest 179 at 11/16/2026 9:00 PM, trend stable. 100150200Nov 15Nov 17Nov 19msGoal: 200GoalUse Left and Right to move between points. Press Escape to leave.
What is saved
JSON
[
{
  "version": 1,
  "title": "Orders per day",
  "series": [
    {
      "type": "bar",
      "x": "timestamp",
      "y": "orders",
      "timeBucket": "day",
      "aggregate": "sum",
      "groupBy": "channel",
      "stack": "channels"
    }
  ],
  "dataset": "shop"
},
{
  "version": 1,
  "title": "Revenue per category (k€)",
  "horizontal": true,
  "series": [
    {
      "type": "bar",
      "x": "category",
      "y": "revenue",
      "aggregate": "sum",
      "sort": "descending"
    }
  ],
  "dataset": "sales"
},
{
  "version": 1,
  "title": "Revenue per channel",
  "series": [
    {
      "type": "pie",
      "x": "channel",
      "y": "revenue",
      "aggregate": "sum",
      "innerRadius": 0.6,
      "format": "#,0 €"
    }
  ],
  "dataset": "shop"
},
{
  "version": 1,
  "title": "Response time",
  "y": {
    "title": "ms"
  },
  "series": [
    {
      "x": "timestamp",
      "y": "responseMs",
      "timeBucket": "hour",
      "aggregate": "average",
      "name": "Average"
    }
  ],
  "annotations": [
    {
      "value": 200,
      "label": "Goal"
    }
  ],
  "dataset": "shop"
}
]

Save and load definitions

ChartDefinitionJson.Serialize writes a definition as a short JSON string with "version": 1; keep it per user and tile, in whatever store you use. ChartDefinitionJson.Parse reads it back. It is tolerant (synonyms such as column or doughnut, comments, trailing commas) and returns errors with the path to the problem instead of throwing, so one broken tile never takes the dashboard down.

C#
// Save: a short JSON string per tile.
string json = ChartDefinitionJson.Serialize(definition);
await tiles.SaveAsync(userId, tileId, json);

// Load: never throws; each error names the path to the problem (e.g. series[0].type) and what is valid.
var parsed = ChartDefinitionJson.Parse(await tiles.LoadAsync(userId, tileId));
if (!parsed.Success)
{
    ShowProblem(parsed.Errors);
}

Saved definitions keep working: every 1.x release reads version 1 definitions, and fields, chart types and words may be added but are never removed or changed in meaning (see saved definitions keep working). A definition from a newer version is still drawn, with a warning, without the fields this version does not know.

Give each user their data

A definition refers to data only by name: a dataset and its fields. Your app decides what a name means for this user. Implement IChartDataSource: Describe lists the datasets a user may chart (names, fields and descriptions, for field pickers and AI agents), and LoadAsync loads one when a definition asks for it. Return null for a name that does not exist or that this user may not see; the chart then says the dataset was not found.

C#
public sealed class ShopData(IOrderRepository orders, ICurrentUser user) : IChartDataSource
{
    // What this user may chart: names, fields and descriptions; no values needed here.
    public IReadOnlyList<ChartDataset> Describe() => user.CanSeeOrders
        ? [new ChartDataset("orders",
            [
                new DataField("timestamp", FieldType.Time, []),
                new DataField("channel", FieldType.Text, [], "Web, App or Marketplace"),
                new DataField("orders", FieldType.Number, []),
            ],
            "Orders per hour and sales channel")]
        : [];

    public async Task<ChartDataset?> LoadAsync(string name, CancellationToken ct = default) => name switch
    {
        "orders" when user.CanSeeOrders => ChartDataset.FromItems("orders",
            await orders.PerHourAsync(user.StoreId, ct), "Orders per hour and sales channel"),
        _ => null, // unknown, or not for this user
    };
}

Then load what a tile needs and draw it. DefinitionErrors on the chart lists binding problems (a field that is not in the dataset, a text field used as a value), and the chart shows them in place of the plot.

Razor
<RioChart TItem="object" Definition="tile.Definition" Datasets="tile.Datasets" Height="240" />

@code {
    // Load the datasets the definition names (the chart's and each series' own).
    async Task LoadAsync(Tile tile)
    {
        var names = tile.Definition.Series.Select(s => s.Dataset ?? tile.Definition.Dataset)
            .OfType<string>().Distinct(StringComparer.OrdinalIgnoreCase);
        var datasets = new Dictionary<string, ChartDataset>(StringComparer.OrdinalIgnoreCase);
        foreach (var name in names)
        {
            if (await data.LoadAsync(name) is { } dataset)
            {
                datasets[name] = dataset;
            }
        }

        tile.Datasets = datasets;
    }
}

Let users edit

  • A form. ChartDefinitionJson.Schema() is the JSON schema of a definition, with a description of every option, its type and the allowed words. Build your own form from it in your design system; the editor on this page is one (its source is in samples/RioCharts.Docs/Editor; copy it as a start). A ready-made editor component is planned after 1.0.
  • JSON. For power users and admins: the format is small and readable, and the parse errors say what to fix.
  • An AI agent. "Make it a stacked bar per channel": ChartTool gives a model the create_chart tool with your datasets, and the result is the same definition, validated, to save in the tile. See AI agents and MCP.

Safe to store what users write

A definition is data, never code: there are no expressions or scripts, and field names are only looked up in the datasets you load. The parser caps what one definition can ask for (at most 20 series, 50 annotations and 1000 inline rows), and text from a definition is escaped wherever it is drawn. Check sizes as you would for any user input before you store it.

More for dashboards

  • Many charts on a page: Interactive="false" draws plain SVG with no JS (see compact charts), and Compact="true" makes KPI tiles and sparklines.
  • Linked tiles: charts with the same Group share the crosshair and, when zoomable, the zoom, for tiles over the same time range.
  • Reports by email: bind the same definition on the server and export it, with ChartExport.ToPng (see server-side export).
  • Theme and language: tiles follow the app's theme and the user's culture; nothing about either is stored in the definition.
C#
// The same saved tile as a PNG for a weekly email (RioCharts.Skia).
var definition = ChartDefinitionJson.Parse(json).Definition!;
var bound = await ChartDefinitionBinder.BindAsync(definition, new ShopData(orders, user));
byte[] png = ChartExport.ToPng(bound.Definition, bound.Data, new ExportOptions { Width = 640, Height = 320 });
An unhandled error has occurred. Reload 🗙