Documentation ¶
Overview ¶
Package viz contains code for displaying data visualizations.
Index ¶
- func GenerateAndUploadFeatureImage(ctx context.Context, id, title, chartHTML string, data []*DataEntry, ...) (string, error)
- func GenerateBarChartHTML(title string, data []*DataEntry, isCurrency, darkMode bool, ...) (string, error)
- func GenerateBarChartJS(selector, title string, data []*DataEntry, isCurrency bool, ...) (string, error)
- func GenerateLineChartHTML(title string, data []*DataEntry, isCurrency, darkMode bool, ...) (string, error)
- func GenerateLineChartJS(selector, title string, data []*DataEntry, isCurrency bool, ...) (string, error)
- func GeneratePieChartHTML(title string, data []*DataEntry, isCurrency, darkMode bool, ...) (string, error)
- func GeneratePieChartJS(selector, title string, data []*DataEntry, isCurrency bool, ...) (string, error)
- func GenerateStackedBarChartJS(selector, title string, data []*DataEntry, isCurrency bool, ...) (string, error)
- func RenderBody(question, schemaThoughts, analysis, sqlQuery string) string
- func RenderGraphJS(chartJS string) string
- func ScreenshotHTML(ctx context.Context, srcHTML string, options ...ScreenshotOption) ([]byte, error)
- type ChartOption
- type ChartOptions
- type DataEntry
- type ScreenshotOption
- type ScreenshotOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBarChartHTML ¶
func GenerateBarChartHTML(title string, data []*DataEntry, isCurrency, darkMode bool, options ...ChartOption) (string, error)
GenerateBarChartHTML generates an bare HTML file containing only styles, fonts and.
func GenerateBarChartJS ¶
func GenerateLineChartHTML ¶
func GenerateLineChartHTML(title string, data []*DataEntry, isCurrency, darkMode bool, options ...ChartOption) (string, error)
GenerateLineChartHTML generates an bare HTML file containing only styles, fonts and.
func GenerateLineChartJS ¶
func GeneratePieChartHTML ¶
func GeneratePieChartHTML(title string, data []*DataEntry, isCurrency, darkMode bool, options ...ChartOption) (string, error)
GeneratePieChartHTML generates an bare HTML file containing only styles, fonts and.
func GeneratePieChartJS ¶
func RenderBody ¶
func RenderGraphJS ¶
func ScreenshotHTML ¶
Types ¶
type ChartOption ¶
type ChartOption func(*ChartOptions)
func WithBreakpointWidth ¶
func WithBreakpointWidth() ChartOption
func WithFixedHeight ¶
func WithFixedHeight(height int) ChartOption
func WithFixedWidth ¶
func WithFixedWidth(width int) ChartOption
type ChartOptions ¶
type ScreenshotOption ¶
type ScreenshotOption func(*ScreenshotOptions)
func WithHeight ¶
func WithHeight(height float64) ScreenshotOption
func WithScale ¶
func WithScale(scale float64) ScreenshotOption
func WithWaitForSelector ¶
func WithWaitForSelector(selector string) ScreenshotOption
func WithWidth ¶
func WithWidth(width float64) ScreenshotOption
type ScreenshotOptions ¶
Click to show internal directories.
Click to hide internal directories.