Documentation ¶
Index ¶
- Constants
- func C3BarChartJS(chart C3Chart) string
- func C3ChartHTMLSimple(id string, chart C3Chart) string
- func C3DonutChartPage(data TemplateData) string
- func StreamC3BarChartJS(qw422016 *qt422016.Writer, chart C3Chart)
- func StreamC3ChartHTMLSimple(qw422016 *qt422016.Writer, id string, chart C3Chart)
- func StreamC3DonutChartPage(qw422016 *qt422016.Writer, data TemplateData)
- func StreamTimeseriesHTML(qw422016 *qt422016.Writer, data TimeseriesData)
- func StreamTimeseriesPage(qw422016 *qt422016.Writer, pageData TimeseriesPageData)
- func TimeseriesHTML(data TimeseriesData) string
- func TimeseriesPage(pageData TimeseriesPageData) string
- func WriteC3BarChartJS(qq422016 qtio422016.Writer, chart C3Chart)
- func WriteC3ChartHTMLSimple(qq422016 qtio422016.Writer, id string, chart C3Chart)
- func WriteC3DonutChartPage(qq422016 qtio422016.Writer, data TemplateData)
- func WriteTimeseriesHTML(qq422016 qtio422016.Writer, data TimeseriesData)
- func WriteTimeseriesPage(qq422016 qtio422016.Writer, pageData TimeseriesPageData)
- type C3Axis
- type C3AxisX
- type C3Bar
- type C3Chart
- type C3ChartData
- type C3ColumnInt
- type C3ColumnsInt
- type C3Donut
- type C3Grid
- type C3GridLine
- type C3GridLines
- type TemplateData
- type TimeseriesData
- type TimeseriesDataJSON
- type TimeseriesPageData
Constants ¶
View Source
const (
ChartTypeBar = "bar"
)
Variables ¶
This section is empty.
Functions ¶
func C3BarChartJS ¶
func C3ChartHTMLSimple ¶
func C3DonutChartPage ¶
func C3DonutChartPage(data TemplateData) string
func StreamC3BarChartJS ¶
func StreamC3ChartHTMLSimple ¶
func StreamC3DonutChartPage ¶
func StreamC3DonutChartPage(qw422016 *qt422016.Writer, data TemplateData)
func StreamTimeseriesHTML ¶
func StreamTimeseriesHTML(qw422016 *qt422016.Writer, data TimeseriesData)
func StreamTimeseriesPage ¶
func StreamTimeseriesPage(qw422016 *qt422016.Writer, pageData TimeseriesPageData)
func TimeseriesHTML ¶
func TimeseriesHTML(data TimeseriesData) string
func TimeseriesPage ¶
func TimeseriesPage(pageData TimeseriesPageData) string
func WriteC3BarChartJS ¶
func WriteC3BarChartJS(qq422016 qtio422016.Writer, chart C3Chart)
func WriteC3ChartHTMLSimple ¶
func WriteC3ChartHTMLSimple(qq422016 qtio422016.Writer, id string, chart C3Chart)
func WriteC3DonutChartPage ¶
func WriteC3DonutChartPage(qq422016 qtio422016.Writer, data TemplateData)
func WriteTimeseriesHTML ¶
func WriteTimeseriesHTML(qq422016 qtio422016.Writer, data TimeseriesData)
func WriteTimeseriesPage ¶
func WriteTimeseriesPage(qq422016 qtio422016.Writer, pageData TimeseriesPageData)
Types ¶
type C3Chart ¶
type C3Chart struct { Bindto string `json:"bindto,omitempty"` Data C3ChartData `json:"data,omitempty"` Axis C3Axis `json:"axis,omitempty"` Grid C3Grid `json:"grid,omitempty"` Donut C3Donut `json:"donut,omitempty"` Bar C3Bar `json:"bar,omitempty"` }
func TimeSeriesSetSimpleToC3ChartBar ¶
func TimeSeriesSetSimpleToC3ChartBar(data []timeseries.RowInt64, c3BarInfo C3Bar) C3Chart
type C3ChartData ¶
type C3ChartData struct { X string `json:"x,omitempty"` Columns [][]any `json:"columns,omitempty"` Type string `json:"type,omitempty"` }
func (*C3ChartData) MustJSON ¶
func (data *C3ChartData) MustJSON() []byte
type C3ColumnInt ¶
type C3ColumnsInt ¶
type C3ColumnsInt struct {
Columns []C3ColumnInt
}
func (*C3ColumnsInt) ToC3ChartData ¶
func (cols *C3ColumnsInt) ToC3ChartData(chartType string) C3ChartData
type C3Grid ¶
type C3Grid struct { X C3GridLines `json:"x,omitempty"` Y C3GridLines `json:"y,omitempty"` }
type C3GridLine ¶
type C3GridLines ¶
type C3GridLines struct { Show bool `json:"show,omitempty"` Lines C3GridLine `json:"lines,omitempty"` }
type TemplateData ¶
type TemplateData struct { HeaderHTML string ReportName string ReportLink string IncludeDataTable bool IncludeDataTableTotals bool C3Chart C3Chart }
func (*TemplateData) FormattedDataJSON ¶
func (td *TemplateData) FormattedDataJSON() []byte
type TimeseriesData ¶
type TimeseriesData struct { IncludeTitle bool Title string TitleLevel string DivID string JSDataVar string JSChartVar string TimeSeriesSet *interval.TimeSeriesSet JSONData TimeseriesDataJSON }
func (*TimeseriesData) AddTimeSeriesSet ¶
func (data *TimeseriesData) AddTimeSeriesSet(set *interval.TimeSeriesSet, interval timeutil.Interval, seriesType interval.SeriesType) error
func (*TimeseriesData) DataJSON ¶
func (data *TimeseriesData) DataJSON() []byte
func (*TimeseriesData) FormattedDataJSON ¶
func (data *TimeseriesData) FormattedDataJSON() []byte
type TimeseriesDataJSON ¶
type TimeseriesDataJSON struct { Columns [][]any `json:"columns"` Totals []int64 `json:"totals"` TotalsMap map[string]int64 `json:"totalsMap"` }
func (*TimeseriesDataJSON) JSON ¶
func (tdj *TimeseriesDataJSON) JSON() []byte
type TimeseriesPageData ¶
type TimeseriesPageData struct { Title string URL string Charts []TimeseriesData Xox interval.YoYQoQGrowth XoxPoints []interval.XoxPoint }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
c3sts is a package for creating C3 charts from statictimeseries data.
|
c3sts is a package for creating C3 charts from statictimeseries data. |
examples
|
|
Click to show internal directories.
Click to hide internal directories.