plotly

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT, MIT Imports: 6 Imported by: 2

Documentation

Overview

Package plotly adds barebones support to Plotly (https://plotly.com/javascript/getting-started/) library.

It's a simple wrapper to execute javascript code, assuming the Plotly library is loaded.

It also offers a library around github.com/MetalBlueberry/go-plotly (itself a wrapper around Plotly) to integrate it in GoNB, see `DisplayFig` method.

API is a first stab at it (experimental), and `UpdateHtml` for dynamic plots is not yet supported. Ideas are welcome here.

Index

Constants

This section is empty.

Variables

View Source
var PlotlySrc = "https://cdn.plot.ly/plotly-2.29.1.min.js"

PlotlySrc is the source from where to download Plotly. If you have a local copy or an updated version of the library, change the value here.

Functions

func AppendFig added in v0.10.0

func AppendFig(htmlId string, fig *grob.Fig) error

AppendFig appends the figure to the HTML element with the given id. It uses dom.TransientJavascript so it won't be saved, exported to HTML, or even persistable with dom.Persist. See dom.CreateTransientDiv to create transient div and get its `htmlId`.

func DisplayFig

func DisplayFig(fig *grob.Fig) error

DisplayFig as HTML output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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