Krizaka UI
Krizaka UI
Components

Generated view catalog

KpiStat and ChartCard as entries of the data-driven UI catalog (A2UI v0.9): a model's answer draws figures and charts from data, never code.

Web · ✓Mobile · ✗ to buildDesktop · ✓BetaCharts
import { chartsGenUiCatalog } from "@krizaka/charts/genui";

Web only — React, from @krizaka/charts/genui. Beta: its API may still change in a minor version.

  • Mobile · ✗ to build. Slice 3 of the data-driven UI epic: the same messages drawn by the native charts. issue #207

Why it is here. Used by Orazaka.

When to use

  • With GenUiStream of @krizaka/ui: merge chartsGenUiCatalog with baseGenUiCatalog so a model's answer can hold figures and charts.
  • When an assistant answers a question about data with a dashboard the reader can then refine.

When not to use

  • A dashboard the app knows in advance: use the charts directly.Use instead: Chart card
  • One figure in a page.Use instead: KPI stat

Installation

Install

npm install @krizaka/charts

Import

import { chartsGenUiCatalog } from "@krizaka/charts/genui";

Examples

A generated dashboard

Two figures and a chart from a model's answer, drawn with both catalogs.

Props

This module has no component props: see the import and the preview above.

Accessibility

  • Each generated chart keeps its title as accessible name, its written summary and its data table, as any chart of the package.

Best practices

  • Tell the model the catalog and that every number must come from the data it was given: the entries check shapes, not truth.
  • Formats are a closed list (number, integer, compact, percent, money with a currency): no free-form format string reaches the chart.

Generated from the code of @krizaka/ui 3.63.1: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page