commands

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Overview

This package holds all plugin subcommands along with common data types and functions used by all subcommands.

Index

Constants

View Source
const DefaultSeries = "Items"

Default name of a series if no other name is given.

View Source
const XAxisSeries = "__x_axis__"

Internal name of the series representing the x axis.

Variables

View Source
var Themes = []string{
	"chalk", "essos", "infographic", "macarons", "purple-passion", "roma",
	"romantic", "shine", "vintage", "walden", "westeros", "wonderland",
}

List of all availlable themes

Functions

func Nuplot

func Nuplot() *nu.Command

This function initializes the nuplot main command. This command prints the help message of the nuplot plugin to stderr.

func NuplotBar

func NuplotBar() *nu.Command

This function initializes the nuplot bar command.

func NuplotBoxPlot

func NuplotBoxPlot() *nu.Command

This function initializes the nuplot boxplot command.

func NuplotKline

func NuplotKline() *nu.Command

This function initializes the nuplot kline command.

func NuplotLine

func NuplotLine() *nu.Command

This function initializes the nuplot line command.

func NuplotPie

func NuplotPie() *nu.Command

This function initializes the nuplot pie command.

func ValueToFloat64

func ValueToFloat64(value nu.Value) (float64, error)

Convert an int or float nushell value to float64.

Types

type BarDataList

type BarDataList = []opts.BarData

A list of bar chart data points

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

type BoxPlotSeriesHelper = map[string][][]float64

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 Float64Series

type Float64Series = map[string][]float64

Float64 data series mapping

type KlineDataList

type KlineDataList = []opts.KlineData

A list of kline chart data points

type KlineDataSeries

type KlineDataSeries = map[string]KlineDataList

Kline data series mapping

type LineDataList

type LineDataList = []opts.LineData

A List of line chart data points

type LineDataSeries

type LineDataSeries = map[string]LineDataList

Line data series mapping

type PieDataList

type PieDataList = []opts.PieData

A list of pie chart data points

type PieDataSeries

type PieDataSeries = map[string]PieDataList

Pie chart data series mapping

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.

Directories

Path Synopsis
This package holds the flags used in all subcommands.
This package holds the flags used in all subcommands.

Jump to

Keyboard shortcuts

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