chartgen

package
v1.0.69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright 2026 Alibaba Group Licensed under the Apache License, Version 2.0.

Copyright 2026 Alibaba Group Licensed under the Apache License, Version 2.0.

Copyright 2026 Alibaba Group Licensed under the Apache License, Version 2.0.

Copyright 2026 Alibaba Group Licensed under the Apache License, Version 2.0.

Package chartgen builds A2UI chart cards from validated business facts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	SurfaceID   string `json:"surfaceId"`
	ComponentID string `json:"componentId"`
	Type        string `json:"type"`
}

type Artifact

type Artifact struct {
	SpecVersion       string           `json:"specVersion"`
	PresetID          string           `json:"presetId"`
	PresetAlias       string           `json:"presetAlias"`
	SurfaceID         string           `json:"surfaceId"`
	Summary           string           `json:"summary"`
	CreateMessages    []map[string]any `json:"createMessages"`
	FinishMessages    []map[string]any `json:"finishMessages"`
	FinishAnnotations []Annotation     `json:"finishAnnotations"`
	CreateContent     string           `json:"createContent"`
	FinishContent     string           `json:"finishContent"`
}

func Build

func Build(raw []byte, surfaceID string) (Artifact, error)

Build validates an internal ChartSpec and returns complete create and finish artifacts. It does not resolve recipients or send a card. surfaceID is an internal deterministic test/retry override; pass an empty string for a new ID.

type Input

type Input struct {
	SpecVersion string          `json:"specVersion"`
	PresetID    string          `json:"presetId"`
	Title       string          `json:"title"`
	Data        json.RawMessage `json:"data"`
}

type Preset

type Preset struct {
	ID              string           `json:"id"`
	Alias           string           `json:"alias"`
	Family          string           `json:"family"`
	SourceSHA256    string           `json:"sourceSha256"`
	SeriesTypes     []string         `json:"seriesTypes"`
	SeriesStyles    []map[string]any `json:"seriesStyles"`
	CategoryAxis    string           `json:"categoryAxis"`
	Legend          bool             `json:"legend"`
	RadarStyle      map[string]any   `json:"radarStyle,omitempty"`
	RadarGroupCount int              `json:"radarGroupCount,omitempty"`
	VisualMapStyle  map[string]any   `json:"visualMapStyle,omitempty"`
}

func List

func List() ([]Preset, error)

List returns a detached copy of the 43 source-traceable visual presets.

func Lookup

func Lookup(name string) (Preset, error)

Lookup accepts a stable G ID or a semantic alias.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL