chartjs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package chartjs provides a godom plugin for Chart.js integration. Chart.js is embedded and injected automatically — no CDN or manual <script> tag required. Users configure charts using plain Go maps that pass straight through to Chart.js.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(app *godom.App)

Register adds the Chart.js plugin to a godom App.

Types

type Chart

type Chart struct {
	Type     string                   `json:"type"`
	Labels   []string                 `json:"labels,omitempty"`
	Datasets []map[string]interface{} `json:"datasets"`
	Options  map[string]interface{}   `json:"options,omitempty"`
}

Chart holds the configuration and data for a Chart.js chart. Options and Datasets use maps so any Chart.js property can be passed through without needing Go type definitions.

Jump to

Keyboard shortcuts

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