plotly

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package plotly provides a godom plugin for Plotly.js integration. Plotly's basic bundle is embedded and injected automatically — no CDN or manual <script> tag required. Users configure charts using plain Go structs that map to Plotly's declarative JSON API.

Index

Constants

This section is empty.

Variables

View Source
var Plugin godom.PluginFunc = func(eng *godom.Engine) {
	eng.RegisterPlugin("plotly", plotlyLibJS, bridgeJS)
}

Plugin registers Plotly with a godom Engine.

Functions

This section is empty.

Types

type Chart

type Chart struct {
	Data   []M `json:"data"`
	Layout M   `json:"layout,omitempty"`
	Config M   `json:"config,omitempty"`
}

Chart holds the configuration for a Plotly chart. Data holds the trace array and Layout controls appearance. Config is optional Plotly config (e.g. responsive, displayModeBar).

type M

type M = map[string]interface{}

M is a shorthand for map[string]interface{}.

Jump to

Keyboard shortcuts

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