Documentation
¶
Overview ¶
This package holds all plugin subcommands along with common data types and functions used by all subcommands.
Index ¶
- Constants
- Variables
- func Nuplot() *nu.Command
- func NuplotBar() *nu.Command
- func NuplotBoxPlot() *nu.Command
- func NuplotKline() *nu.Command
- func NuplotLine() *nu.Command
- func NuplotPie() *nu.Command
- func ValueToFloat64(value nu.Value) (float64, error)
- type BarDataList
- type BarDataSeries
- type BoxPlotDataList
- type BoxPlotDataSeries
- type BoxPlotSeriesHelper
- type ChartData
- type Float64Series
- type KlineDataList
- type KlineDataSeries
- type LineDataList
- type LineDataSeries
- type PieDataList
- type PieDataSeries
- type PlotHandlerFunc
Constants ¶
const DefaultSeries = "Items"
Default name of a series if no other name is given.
const XAxisSeries = "__x_axis__"
Internal name of the series representing the x axis.
Variables ¶
var Themes = []string{
"chalk", "essos", "infographic", "macarons", "purple-passion", "roma",
"romantic", "shine", "vintage", "walden", "westeros", "wonderland",
}
List of all availlable themes
Functions ¶
func Nuplot ¶
This function initializes the nuplot main command. This command prints the help message of the nuplot plugin to stderr.
func NuplotBoxPlot ¶
This function initializes the nuplot boxplot command.
func NuplotKline ¶
This function initializes the nuplot kline command.
Types ¶
type BarDataSeries ¶
type BarDataSeries = map[string]BarDataList
This type maps series names to their values
type BoxPlotDataList ¶
type BoxPlotDataList = []opts.BoxPlotData
A list of boxplot chart data points
type BoxPlotDataSeries ¶
type BoxPlotDataSeries = map[string]BoxPlotDataList
Boxplot data series mapping
type BoxPlotSeriesHelper ¶
Helper-datatype used in the plotting functions
type ChartData ¶
type ChartData interface {
float64 | []float64 | opts.LineData | opts.BarData | opts.PieData | opts.BoxPlotData | opts.KlineData
}
Abstract data type so that [getSeries] can be called for all plot types.
type PlotHandlerFunc ¶
type PlotHandlerFunc = func(any, *nu.ExecCommand) error
Handler function that implements the output of a specific plot. This type is used in the [handleCommandInput] function.