Documentation
¶
Index ¶
- func ApplyYAxis[T any](chart Chart[T], name string, labels *[]string, min *float64, max *float64, ...) (bool, map[string]int, func(insyra.IDataList) []opts.LineData, ...)
- func SetBaseChartGlobalOptions[T any](chart Chart[T], config BaseChartConfig)
- func SetShowLabels[T any](chart Chart[T], showLabels bool, labelPos string, defaultLabelPos string)
- type BaseChartConfig
- type Chart
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyYAxis ¶
func ApplyYAxis[T any](chart Chart[T], name string, labels *[]string, min *float64, max *float64, splitNumber *int, formatter string, data ...insyra.IDataList) (bool, map[string]int, func(insyra.IDataList) []opts.LineData, func(insyra.IDataList) []float64)
ApplyYAxis builds Y-axis options, applies them to the provided chart, and returns isCategory and mapping (if any). It will also set caller's labels if a pointer is provided so callers get derived labels automatically.
func SetBaseChartGlobalOptions ¶
func SetBaseChartGlobalOptions[T any](chart Chart[T], config BaseChartConfig)
Types ¶
type BaseChartConfig ¶
type BaseChartConfig struct {
Width string // Width of the chart (default "900px").
Height string // Height of the chart (default "500px").
BackgroundColor string // Background color of the chart (default "white").
Theme string // Theme of the chart.
Title string // Title of the chart.
Subtitle string // Subtitle of the chart.
TitlePos string // Title position: "top" or "bottom".
HideLegend bool // Whether to hide the legend.
LegendPos string // Legend position: "top" or "bottom".
}
Click to show internal directories.
Click to hide internal directories.