Documentation ¶
Index ¶
- Constants
- func PieChartMaterialPage(chart google.Chart) string
- func StreamPieChartMaterialPage(qw422016 *qt422016.Writer, chart google.Chart)
- func WritePieChartMaterialPage(qq422016 qtio422016.Writer, chart google.Chart)
- type Chart
- func (chart *Chart) BuildDataTable() google.DataTable
- func (chart *Chart) ChartDivOrDefault() string
- func (chart *Chart) DataTableJSON() []byte
- func (chart *Chart) LoadDataTableHistogram(h *histogram.Histogram, cols google.Columns)
- func (chart *Chart) OptionsJSON() []byte
- func (chart *Chart) PageHTML() string
- func (chart *Chart) PageTitle() string
- func (chart *Chart) WriteFilePage(filename string, perm os.FileMode) error
- func (chart *Chart) WritePage(w io.Writer)
- type Options
- type TextStyle
Constants ¶
View Source
const (
PieSliceTextLabel = "label"
)
Variables ¶
This section is empty.
Functions ¶
func PieChartMaterialPage ¶
func WritePieChartMaterialPage ¶
func WritePieChartMaterialPage(qq422016 qtio422016.Writer, chart google.Chart)
Types ¶
type Chart ¶ added in v2.20.0
type Chart struct { Title string Subtitle string ChartDiv string AddCountToName bool DefaultCategoryName string DataTable *google.DataTable Columns google.Columns Data piechart.PieChartData GoogleOptions *Options }
Chart provides data for Google Material Pie Charts described here: https://developers.google.com/chart/interactive/docs/gallery/piechart
func NewPieChartMaterialInts ¶
func (*Chart) BuildDataTable ¶ added in v2.20.0
func (*Chart) ChartDivOrDefault ¶ added in v2.20.0
func (*Chart) DataTableJSON ¶ added in v2.20.0
func (*Chart) LoadDataTableHistogram ¶ added in v2.20.0
func (*Chart) OptionsJSON ¶ added in v2.20.0
func (*Chart) WriteFilePage ¶ added in v2.20.0
type Options ¶ added in v2.20.0
type Options struct { Title string `json:"title,omitempty"` Legend string `json:"legend,omitempty"` Height uint `json:"height,omitempty"` Width uint `json:"width,omitempty"` PieHole float64 `json:"pieHole,omitempty"` PieSliceText string `json:"pieSliceText,omitempty"` PieSliceTextStyle TextStyle `json:"pieSliceTextStyle,omitempty"` PieStartAngle float64 `json:"pieStartAngle,omitempty"` }
Options represents the Google Charts JSON options map as defined here: https://developers.google.com/chart/interactive/docs/gallery/piechart .
func (*Options) MustJSON ¶ added in v2.20.0
MustJSON represents the Google Charts JSON options map as defined here: https://developers.google.com/chart/interactive/docs/gallery/piechart . The output is intended to be used directly with the client-side JS library call.
Click to show internal directories.
Click to hide internal directories.