Documentation
¶
Index ¶
- func CreateBarChart(config BarChartConfig) *plot.Plot
- func CreateFunctionPlot(config FunctionPlotConfig) *plot.Plot
- func CreateHistogram(config HistogramConfig) *plot.Plot
- func CreateLineChart(config LineChartConfig) *plot.Plot
- func SaveChart(plt *plot.Plot, filename string)
- type BarChartConfig
- type FunctionPlotConfig
- type HistogramConfig
- type LineChartConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBarChart ¶
func CreateBarChart(config BarChartConfig) *plot.Plot
CreateBarChart generates and returns a plot.Plot object based on BarChartConfig.
func CreateFunctionPlot ¶ added in v0.0.12
func CreateFunctionPlot(config FunctionPlotConfig) *plot.Plot
CreateFunctionPlot generates and returns a plot.Plot object based on FunctionPlotConfig.
func CreateHistogram ¶
func CreateHistogram(config HistogramConfig) *plot.Plot
CreateHistogram generates and returns a plot.Plot object based on HistogramConfig.
func CreateLineChart ¶ added in v0.0.11
func CreateLineChart(config LineChartConfig) *plot.Plot
CreateLineChart generates and returns a plot.Plot object based on LineChartConfig.
Types ¶
type BarChartConfig ¶
type BarChartConfig struct { Title string // Title of the chart. XAxis []string // X-axis data (categories). Data any // Accepts []float64 or *insyra.DataList XAxisName string // Optional: X-axis name. YAxisName string // Optional: Y-axis name. BarWidth float64 // Optional: Bar width for each bar in the chart. Default is 20. }
BarChartConfig defines the configuration for a single series bar chart.
type FunctionPlotConfig ¶ added in v0.0.12
type FunctionPlotConfig struct { Title string // Title of the chart. XAxisName string // Label for the X-axis. YAxisName string // Label for the Y-axis. Func func(x float64) float64 // The mathematical function to plot. XMin float64 // Minimum value of X (optional). XMax float64 // Maximum value of X (optional). YMin float64 // Minimum value of Y (optional). YMax float64 // Maximum value of Y (optional). }
FunctionPlotConfig defines the configuration for a function plot.
type HistogramConfig ¶
type HistogramConfig struct { Title string // Title of the chart. Data any // Accepts []float64 or *insyra.DataList or insyra.IDataList. XAxisName string // Optional: X-axis name. YAxisName string // Optional: Y-axis name. Bins int // Number of bins for the histogram. }
HistogramConfig defines the configuration for a single series histogram.
type LineChartConfig ¶ added in v0.0.11
type LineChartConfig struct { Title string // Title of the chart. XAxis []float64 // X-axis data. Data any // Supports map[string][]float64 or []*insyra.DataList. XAxisName string // Optional: X-axis name. YAxisName string // Optional: Y-axis name. }
LineChartConfig defines the configuration for a multi-series line chart.
Click to show internal directories.
Click to hide internal directories.