Documentation ¶
Overview ¶
Code generated by go-bindata. DO NOT EDIT. sources: assets/chart.min.js
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Attributes
- type BarAttributes
- type BarChart
- func (l *BarChart) AddDataSet(s string) *BarChart
- func (l *BarChart) DSBackgroundColor(backgroundColor Color) *BarChart
- func (l *BarChart) DSBorderCapStyle(borderCapStyle string) *BarChart
- func (l *BarChart) DSBorderColor(borderColor Color) *BarChart
- func (l *BarChart) DSBorderSkipped(skip string) *BarChart
- func (l *BarChart) DSBorderWidth(borderWidth float64) *BarChart
- func (l *BarChart) DSData(data []float64) *BarChart
- func (l *BarChart) DSHoverBackgroundColor(hoverBackgroundColor Color) *BarChart
- func (l *BarChart) DSHoverBorderColor(hoverBorderColor Color) *BarChart
- func (l *BarChart) DSHoverBorderWidth(hoverBorderWidth float64) *BarChart
- func (l *BarChart) DSLabel(s string) *BarChart
- func (l *BarChart) DSOrder(order float64) *BarChart
- func (l *BarChart) DSType(t string) *BarChart
- func (l *BarChart) DSXAxisID(xAxisID string) *BarChart
- func (l *BarChart) DSYAxisID(yAxisID string) *BarChart
- func (l *BarChart) GetContent() template.HTML
- func (l *BarChart) SetHeight(s int) *BarChart
- func (l *BarChart) SetID(s string) *BarChart
- func (l *BarChart) SetLabels(s []string) *BarChart
- func (l *BarChart) SetTitle(s template.HTML) *BarChart
- type BarDataSet
- func (l *BarDataSet) SetBackgroundColor(backgroundColor Color) *BarDataSet
- func (l *BarDataSet) SetBorderCapStyle(borderCapStyle string) *BarDataSet
- func (l *BarDataSet) SetBorderColor(borderColor Color) *BarDataSet
- func (l *BarDataSet) SetBorderSkipped(skip string) *BarDataSet
- func (l *BarDataSet) SetBorderWidth(borderWidth float64) *BarDataSet
- func (l *BarDataSet) SetData(data []float64) *BarDataSet
- func (l *BarDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *BarDataSet
- func (l *BarDataSet) SetHoverBorderColor(hoverBorderColor Color) *BarDataSet
- func (l *BarDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *BarDataSet
- func (l *BarDataSet) SetLabel(label string) *BarDataSet
- func (l *BarDataSet) SetOrder(order float64) *BarDataSet
- func (l *BarDataSet) SetType(t string) *BarDataSet
- func (l *BarDataSet) SetXAxisID(xAxisID string) *BarDataSet
- func (l *BarDataSet) SetYAxisID(yAxisID string) *BarDataSet
- type BarDataSets
- type BarJsContent
- type Chart
- func (c *Chart) GetAsset(name string) ([]byte, error)
- func (c *Chart) GetAssetList() []string
- func (c *Chart) GetContent() template.HTML
- func (c *Chart) SetHeight(height int) *Chart
- func (c *Chart) SetID(id string) *Chart
- func (c *Chart) SetOptionAnimationDuration(duration int)
- func (c *Chart) SetOptionAnimationEasing(easing string)
- func (c *Chart) SetOptionElementArc(arc *OptionElementArc)
- func (c *Chart) SetOptionElementLine(line *OptionElementLine)
- func (c *Chart) SetOptionElementPoint(point *OptionElementPoint)
- func (c *Chart) SetOptionElementRectangle(rectangle *OptionElementRectangle)
- func (c *Chart) SetOptionLayoutPaddingBottom(bottom int)
- func (c *Chart) SetOptionLayoutPaddingLeft(left int)
- func (c *Chart) SetOptionLayoutPaddingRight(right int)
- func (c *Chart) SetOptionLayoutPaddingTop(top int)
- func (c *Chart) SetOptionLegendAlign(align string)
- func (c *Chart) SetOptionLegendDisplay(display bool)
- func (c *Chart) SetOptionLegendFullWidt(fullWidth bool)
- func (c *Chart) SetOptionLegendLabels(labels *OptionLegendLabel)
- func (c *Chart) SetOptionLegendPosition(position string)
- func (c *Chart) SetOptionLegendRevers(reverse bool)
- func (c *Chart) SetOptionLegendRt(rtl bool)
- func (c *Chart) SetOptionLegendTextDirection(textDirection string)
- func (c *Chart) SetOptionTitleDisplay(display bool)
- func (c *Chart) SetOptionTitleFontColor(fontColor Color)
- func (c *Chart) SetOptionTitleFontFamily(fontFamily string)
- func (c *Chart) SetOptionTitleFontSize(fontSize int)
- func (c *Chart) SetOptionTitleFontStyle(fontStyle string)
- func (c *Chart) SetOptionTitleLineHeight(lineHeight int)
- func (c *Chart) SetOptionTitlePadding(padding int)
- func (c *Chart) SetOptionTitlePosition(position string)
- func (c *Chart) SetOptionTitleText(text string)
- func (c *Chart) SetOptionTooltipsBackgroundColor(backgroundColor Color)
- func (c *Chart) SetOptionTooltipsBodyAlign(bodyAlign string)
- func (c *Chart) SetOptionTooltipsBodyFontColor(bodyFontColor Color)
- func (c *Chart) SetOptionTooltipsBodyFontFamily(bodyFontFamily string)
- func (c *Chart) SetOptionTooltipsBodyFontSize(bodyFontSize int)
- func (c *Chart) SetOptionTooltipsBodyFontStyle(bodyFontStyle string)
- func (c *Chart) SetOptionTooltipsBodySpacing(bodySpacing int)
- func (c *Chart) SetOptionTooltipsBorderColor(borderColor Color)
- func (c *Chart) SetOptionTooltipsBorderWidth(borderWidth int)
- func (c *Chart) SetOptionTooltipsCaretPadding(caretPadding int)
- func (c *Chart) SetOptionTooltipsCaretSize(caretSize int)
- func (c *Chart) SetOptionTooltipsCornerRadius(cornerRadius int)
- func (c *Chart) SetOptionTooltipsDisplayColors(displayColors bool)
- func (c *Chart) SetOptionTooltipsEnabled(enabled bool)
- func (c *Chart) SetOptionTooltipsFooterAlign(footerAlign string)
- func (c *Chart) SetOptionTooltipsFooterFontColor(footerFontColor Color)
- func (c *Chart) SetOptionTooltipsFooterFontFamily(footerFontFamily string)
- func (c *Chart) SetOptionTooltipsFooterFontSize(footerFontSize int)
- func (c *Chart) SetOptionTooltipsFooterFontStyle(footerFontStyle string)
- func (c *Chart) SetOptionTooltipsFooterMarginTop(footerMarginTop int)
- func (c *Chart) SetOptionTooltipsFooterSpacing(footerSpacing int)
- func (c *Chart) SetOptionTooltipsIntersect(intersect bool)
- func (c *Chart) SetOptionTooltipsMode(mode string)
- func (c *Chart) SetOptionTooltipsMultiKeyBackground(multiKeyBackground Color)
- func (c *Chart) SetOptionTooltipsPosition(position string)
- func (c *Chart) SetOptionTooltipsRtl(rtl bool)
- func (c *Chart) SetOptionTooltipsTextDirection(textDirection string)
- func (c *Chart) SetOptionTooltipsTitleAlign(titleAlign string)
- func (c *Chart) SetOptionTooltipsTitleFontColor(titleFontColor Color)
- func (c *Chart) SetOptionTooltipsTitleFontFamily(titleFontFamily string)
- func (c *Chart) SetOptionTooltipsTitleFontSize(titleFontSize int)
- func (c *Chart) SetOptionTooltipsTitleFontStyle(titleFontStyle string)
- func (c *Chart) SetOptionTooltipsTitleMarginBottom(titleMarginBottom int)
- func (c *Chart) SetOptionTooltipsTitleSpacing(titleSpacing int)
- func (c *Chart) SetOptionTooltipsXPadding(xPadding int)
- func (c *Chart) SetOptionTooltipsYPadding(yPadding int)
- func (c *Chart) SetTitle(title template.HTML) *Chart
- type Color
- type DataSet
- type DataSets
- type JsContent
- type LineAttributes
- type LineChart
- func (l *LineChart) AddDataSet(s string) *LineChart
- func (l *LineChart) DSBackgroundColor(backgroundColor Color) *LineChart
- func (l *LineChart) DSBorderCapStyle(borderCapStyle string) *LineChart
- func (l *LineChart) DSBorderColor(borderColor Color) *LineChart
- func (l *LineChart) DSBorderDash(borderDash []int) *LineChart
- func (l *LineChart) DSBorderDashOffset(borderDashOffset float64) *LineChart
- func (l *LineChart) DSBorderJoinStyle(borderJoinStyle string) *LineChart
- func (l *LineChart) DSBorderWidth(borderWidth float64) *LineChart
- func (l *LineChart) DSCubicInterpolationMode(cubicInterpolationMode string) *LineChart
- func (l *LineChart) DSData(data []float64) *LineChart
- func (l *LineChart) DSFill(fill bool) *LineChart
- func (l *LineChart) DSHoverBackgroundColor(hoverBackgroundColor Color) *LineChart
- func (l *LineChart) DSHoverBorderCapStyle(hoverBorderCapStyle string) *LineChart
- func (l *LineChart) DSHoverBorderColor(hoverBorderColor Color) *LineChart
- func (l *LineChart) DSHoverBorderDash(hoverBorderDash float64) *LineChart
- func (l *LineChart) DSHoverBorderDashOffset(hoverBorderDashOffset float64) *LineChart
- func (l *LineChart) DSHoverBorderJoinStyle(hoverBorderJoinStyle string) *LineChart
- func (l *LineChart) DSHoverBorderWidth(hoverBorderWidth float64) *LineChart
- func (l *LineChart) DSLabel(s string) *LineChart
- func (l *LineChart) DSLineTension(lineTension float64) *LineChart
- func (l *LineChart) DSOrder(order float64) *LineChart
- func (l *LineChart) DSPointBackgroundColor(pointBackgroundColor Color) *LineChart
- func (l *LineChart) DSPointBorderColor(pointBorderColor Color) *LineChart
- func (l *LineChart) DSPointBorderWidth(pointBorderWidth float64) *LineChart
- func (l *LineChart) DSPointHitRadius(pointHitRadius float64) *LineChart
- func (l *LineChart) DSPointHoverBackgroundColor(pointHoverBackgroundColor Color) *LineChart
- func (l *LineChart) DSPointHoverBorderColor(pointHoverBorderColor Color) *LineChart
- func (l *LineChart) DSPointHoverBorderWidth(pointHoverBorderWidth float64) *LineChart
- func (l *LineChart) DSPointHoverRadius(pointHoverRadius float64) *LineChart
- func (l *LineChart) DSPointRadius(pointRadius float64) *LineChart
- func (l *LineChart) DSPointRotation(pointRotation float64) *LineChart
- func (l *LineChart) DSPointStyle(pointStyle string) *LineChart
- func (l *LineChart) DSShowLine(showLine bool) *LineChart
- func (l *LineChart) DSSpanGaps(spanGaps bool) *LineChart
- func (l *LineChart) DSSteppedLine(steppedLine bool) *LineChart
- func (l *LineChart) DSType(t string) *LineChart
- func (l *LineChart) DSXAxisID(xAxisID string) *LineChart
- func (l *LineChart) DSYAxisID(yAxisID string) *LineChart
- func (l *LineChart) GetContent() template.HTML
- func (l *LineChart) SetHeight(s int) *LineChart
- func (l *LineChart) SetID(s string) *LineChart
- func (l *LineChart) SetLabels(s []string) *LineChart
- func (l *LineChart) SetTitle(s template.HTML) *LineChart
- type LineDataSet
- func (l *LineDataSet) SetBackgroundColor(backgroundColor Color) *LineDataSet
- func (l *LineDataSet) SetBorderCapStyle(borderCapStyle string) *LineDataSet
- func (l *LineDataSet) SetBorderColor(borderColor Color) *LineDataSet
- func (l *LineDataSet) SetBorderDash(borderDash []int) *LineDataSet
- func (l *LineDataSet) SetBorderDashOffset(borderDashOffset float64) *LineDataSet
- func (l *LineDataSet) SetBorderJoinStyle(borderJoinStyle string) *LineDataSet
- func (l *LineDataSet) SetBorderWidth(borderWidth float64) *LineDataSet
- func (l *LineDataSet) SetCubicInterpolationMode(cubicInterpolationMode string) *LineDataSet
- func (l *LineDataSet) SetData(data []float64) *LineDataSet
- func (l *LineDataSet) SetFill(fill bool) *LineDataSet
- func (l *LineDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *LineDataSet
- func (l *LineDataSet) SetHoverBorderCapStyle(hoverBorderCapStyle string) *LineDataSet
- func (l *LineDataSet) SetHoverBorderColor(hoverBorderColor Color) *LineDataSet
- func (l *LineDataSet) SetHoverBorderDash(hoverBorderDash float64) *LineDataSet
- func (l *LineDataSet) SetHoverBorderDashOffset(hoverBorderDashOffset float64) *LineDataSet
- func (l *LineDataSet) SetHoverBorderJoinStyle(hoverBorderJoinStyle string) *LineDataSet
- func (l *LineDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *LineDataSet
- func (l *LineDataSet) SetLabel(label string) *LineDataSet
- func (l *LineDataSet) SetLineTension(lineTension float64) *LineDataSet
- func (l *LineDataSet) SetOrder(order float64) *LineDataSet
- func (l *LineDataSet) SetPointBackgroundColor(pointBackgroundColor Color) *LineDataSet
- func (l *LineDataSet) SetPointBorderColor(pointBorderColor Color) *LineDataSet
- func (l *LineDataSet) SetPointBorderWidth(pointBorderWidth float64) *LineDataSet
- func (l *LineDataSet) SetPointHitRadius(pointHitRadius float64) *LineDataSet
- func (l *LineDataSet) SetPointHoverBackgroundColor(pointHoverBackgroundColor Color) *LineDataSet
- func (l *LineDataSet) SetPointHoverBorderColor(pointHoverBorderColor Color) *LineDataSet
- func (l *LineDataSet) SetPointHoverBorderWidth(pointHoverBorderWidth float64) *LineDataSet
- func (l *LineDataSet) SetPointHoverRadius(pointHoverRadius float64) *LineDataSet
- func (l *LineDataSet) SetPointRadius(pointRadius float64) *LineDataSet
- func (l *LineDataSet) SetPointRotation(pointRotation float64) *LineDataSet
- func (l *LineDataSet) SetPointStyle(pointStyle string) *LineDataSet
- func (l *LineDataSet) SetShowLine(showLine bool) *LineDataSet
- func (l *LineDataSet) SetSpanGaps(spanGaps bool) *LineDataSet
- func (l *LineDataSet) SetSteppedLine(steppedLine bool) *LineDataSet
- func (l *LineDataSet) SetType(t string) *LineDataSet
- func (l *LineDataSet) SetXAxisID(xAxisID string) *LineDataSet
- func (l *LineDataSet) SetYAxisID(yAxisID string) *LineDataSet
- type LineDataSets
- type LineJsContent
- type OptionAnimation
- type OptionElement
- type OptionElementArc
- type OptionElementLine
- type OptionElementPoint
- type OptionElementRectangle
- type OptionLayout
- type OptionLegend
- type OptionLegendLabel
- type OptionTitle
- type OptionTooltips
- type Options
- type PieAttributes
- type PieChart
- func (l *PieChart) AddDataSet(s string) *PieChart
- func (l *PieChart) DSBackgroundColor(backgroundColor []Color) *PieChart
- func (l *PieChart) DSBorderColor(borderColor Color) *PieChart
- func (l *PieChart) DSBorderWidth(borderWidth float64) *PieChart
- func (l *PieChart) DSData(data []float64) *PieChart
- func (l *PieChart) DSHoverBackgroundColor(hoverBackgroundColor Color) *PieChart
- func (l *PieChart) DSHoverBorderColor(hoverBorderColor Color) *PieChart
- func (l *PieChart) DSHoverBorderWidth(hoverBorderWidth float64) *PieChart
- func (l *PieChart) DSLabel(s string) *PieChart
- func (l *PieChart) DSType(t string) *PieChart
- func (l *PieChart) DSWeight(weight int) *PieChart
- func (l *PieChart) GetContent() template.HTML
- func (l *PieChart) SetHeight(s int) *PieChart
- func (l *PieChart) SetID(s string) *PieChart
- func (l *PieChart) SetLabels(s []string) *PieChart
- func (l *PieChart) SetTitle(s template.HTML) *PieChart
- type PieDataSet
- func (l *PieDataSet) SetBackgroundColor(backgroundColor []Color) *PieDataSet
- func (l *PieDataSet) SetBorderAlign(align string) *PieDataSet
- func (l *PieDataSet) SetBorderColor(borderColor Color) *PieDataSet
- func (l *PieDataSet) SetBorderWidth(borderWidth float64) *PieDataSet
- func (l *PieDataSet) SetData(data []float64) *PieDataSet
- func (l *PieDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *PieDataSet
- func (l *PieDataSet) SetHoverBorderColor(hoverBorderColor Color) *PieDataSet
- func (l *PieDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *PieDataSet
- func (l *PieDataSet) SetLabel(label string) *PieDataSet
- func (l *PieDataSet) SetType(t string) *PieDataSet
- func (l *PieDataSet) SetWeight(weight int) *PieDataSet
- type PieDataSets
- type PieJsContent
Constants ¶
This section is empty.
Variables ¶
var AssetsList = []string{
"/chart.min.js",
}
var List = map[string]string{
"chartjs": `{{define "chartjs"}}
{{if ne .Title ""}}
<p class="text-center">
<strong>{{langHtml .Title}}</strong>
</p>
{{end}}
<div class="chart">
<canvas id="{{.ID}}" style="height: {{.Height}}px;"></canvas>
</div>
<script>
new Chart(document.getElementById('{{.ID}}'), {{.Js}});
</script>
{{end}}`,
}
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Attributes ¶
type Attributes struct {
Labels []string `json:"labels,omitempty"`
}
type BarAttributes ¶
type BarAttributes struct { Attributes DataSets BarDataSets `json:"datasets"` }
type BarChart ¶
type BarChart struct { *Chart JsContent BarJsContent }
func (*BarChart) AddDataSet ¶
func (*BarChart) DSBackgroundColor ¶
func (*BarChart) DSBorderCapStyle ¶
func (*BarChart) DSBorderColor ¶
func (*BarChart) DSBorderSkipped ¶
func (*BarChart) DSBorderWidth ¶
func (*BarChart) DSHoverBackgroundColor ¶
func (*BarChart) DSHoverBorderColor ¶
func (*BarChart) DSHoverBorderWidth ¶
func (*BarChart) GetContent ¶
type BarDataSet ¶
type BarDataSet struct { Label string `json:"label"` Data []float64 `json:"data"` Type string `json:"type,omitempty"` BackgroundColor Color `json:"backgroundColor,omitempty"` BorderCapStyle string `json:"borderCapStyle,omitempty"` BorderColor Color `json:"borderColor,omitempty"` BorderSkipped string `json:"borderSkipped,omitempty"` BorderWidth float64 `json:"borderWidth,omitempty"` HoverBackgroundColor Color `json:"hoverBackgroundColor,omitempty"` HoverBorderColor Color `json:"hoverBorderColor,omitempty"` HoverBorderWidth float64 `json:"hoverBorderWidth,omitempty"` Order float64 `json:"order,omitempty"` XAxisID string `json:"xAxisID,omitempty"` YAxisID string `json:"yAxisID,omitempty"` }
func (*BarDataSet) SetBackgroundColor ¶
func (l *BarDataSet) SetBackgroundColor(backgroundColor Color) *BarDataSet
func (*BarDataSet) SetBorderCapStyle ¶
func (l *BarDataSet) SetBorderCapStyle(borderCapStyle string) *BarDataSet
func (*BarDataSet) SetBorderColor ¶
func (l *BarDataSet) SetBorderColor(borderColor Color) *BarDataSet
func (*BarDataSet) SetBorderSkipped ¶
func (l *BarDataSet) SetBorderSkipped(skip string) *BarDataSet
func (*BarDataSet) SetBorderWidth ¶
func (l *BarDataSet) SetBorderWidth(borderWidth float64) *BarDataSet
func (*BarDataSet) SetData ¶
func (l *BarDataSet) SetData(data []float64) *BarDataSet
func (*BarDataSet) SetHoverBackgroundColor ¶
func (l *BarDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *BarDataSet
func (*BarDataSet) SetHoverBorderColor ¶
func (l *BarDataSet) SetHoverBorderColor(hoverBorderColor Color) *BarDataSet
func (*BarDataSet) SetHoverBorderWidth ¶
func (l *BarDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *BarDataSet
func (*BarDataSet) SetLabel ¶
func (l *BarDataSet) SetLabel(label string) *BarDataSet
func (*BarDataSet) SetOrder ¶
func (l *BarDataSet) SetOrder(order float64) *BarDataSet
func (*BarDataSet) SetType ¶
func (l *BarDataSet) SetType(t string) *BarDataSet
func (*BarDataSet) SetXAxisID ¶
func (l *BarDataSet) SetXAxisID(xAxisID string) *BarDataSet
func (*BarDataSet) SetYAxisID ¶
func (l *BarDataSet) SetYAxisID(yAxisID string) *BarDataSet
type BarDataSets ¶
type BarDataSets []*BarDataSet
func (BarDataSets) Add ¶
func (l BarDataSets) Add(ds *BarDataSet) BarDataSets
type BarJsContent ¶
type BarJsContent struct { JsContent Data BarAttributes `json:"data"` }
type Chart ¶
type Chart struct { *template2.BaseComponent ID string Title template.HTML Js template.JS Height int JsContentOptions *Options // contains filtered or unexported fields }
func (*Chart) GetAssetList ¶
func (*Chart) GetContent ¶
func (*Chart) SetOptionAnimationDuration ¶
func (*Chart) SetOptionAnimationEasing ¶
func (*Chart) SetOptionElementArc ¶
func (c *Chart) SetOptionElementArc(arc *OptionElementArc)
func (*Chart) SetOptionElementLine ¶
func (c *Chart) SetOptionElementLine(line *OptionElementLine)
func (*Chart) SetOptionElementPoint ¶
func (c *Chart) SetOptionElementPoint(point *OptionElementPoint)
func (*Chart) SetOptionElementRectangle ¶
func (c *Chart) SetOptionElementRectangle(rectangle *OptionElementRectangle)
func (*Chart) SetOptionLayoutPaddingBottom ¶
func (*Chart) SetOptionLayoutPaddingLeft ¶
func (*Chart) SetOptionLayoutPaddingRight ¶
func (*Chart) SetOptionLayoutPaddingTop ¶
func (*Chart) SetOptionLegendAlign ¶
func (*Chart) SetOptionLegendDisplay ¶
func (*Chart) SetOptionLegendFullWidt ¶
func (*Chart) SetOptionLegendLabels ¶
func (c *Chart) SetOptionLegendLabels(labels *OptionLegendLabel)
func (*Chart) SetOptionLegendPosition ¶
func (*Chart) SetOptionLegendRevers ¶
func (*Chart) SetOptionLegendRt ¶
func (*Chart) SetOptionLegendTextDirection ¶
func (*Chart) SetOptionTitleDisplay ¶
func (*Chart) SetOptionTitleFontColor ¶
func (*Chart) SetOptionTitleFontFamily ¶
func (*Chart) SetOptionTitleFontSize ¶
func (*Chart) SetOptionTitleFontStyle ¶
func (*Chart) SetOptionTitleLineHeight ¶
func (*Chart) SetOptionTitlePadding ¶
func (*Chart) SetOptionTitlePosition ¶
func (*Chart) SetOptionTitleText ¶
func (*Chart) SetOptionTooltipsBackgroundColor ¶
func (*Chart) SetOptionTooltipsBodyAlign ¶
func (*Chart) SetOptionTooltipsBodyFontColor ¶
func (*Chart) SetOptionTooltipsBodyFontFamily ¶
func (*Chart) SetOptionTooltipsBodyFontSize ¶
func (*Chart) SetOptionTooltipsBodyFontStyle ¶
func (*Chart) SetOptionTooltipsBodySpacing ¶
func (*Chart) SetOptionTooltipsBorderColor ¶
func (*Chart) SetOptionTooltipsBorderWidth ¶
func (*Chart) SetOptionTooltipsCaretPadding ¶
func (*Chart) SetOptionTooltipsCaretSize ¶
func (*Chart) SetOptionTooltipsCornerRadius ¶
func (*Chart) SetOptionTooltipsDisplayColors ¶
func (*Chart) SetOptionTooltipsEnabled ¶
func (*Chart) SetOptionTooltipsFooterAlign ¶
func (*Chart) SetOptionTooltipsFooterFontColor ¶
func (*Chart) SetOptionTooltipsFooterFontFamily ¶
func (*Chart) SetOptionTooltipsFooterFontSize ¶
func (*Chart) SetOptionTooltipsFooterFontStyle ¶
func (*Chart) SetOptionTooltipsFooterMarginTop ¶
func (*Chart) SetOptionTooltipsFooterSpacing ¶
func (*Chart) SetOptionTooltipsIntersect ¶
func (*Chart) SetOptionTooltipsMode ¶
func (*Chart) SetOptionTooltipsMultiKeyBackground ¶
func (*Chart) SetOptionTooltipsPosition ¶
func (*Chart) SetOptionTooltipsRtl ¶
func (*Chart) SetOptionTooltipsTextDirection ¶
func (*Chart) SetOptionTooltipsTitleAlign ¶
func (*Chart) SetOptionTooltipsTitleFontColor ¶
func (*Chart) SetOptionTooltipsTitleFontFamily ¶
func (*Chart) SetOptionTooltipsTitleFontSize ¶
func (*Chart) SetOptionTooltipsTitleFontStyle ¶
func (*Chart) SetOptionTooltipsTitleMarginBottom ¶
func (*Chart) SetOptionTooltipsTitleSpacing ¶
func (*Chart) SetOptionTooltipsXPadding ¶
func (*Chart) SetOptionTooltipsYPadding ¶
type LineAttributes ¶
type LineAttributes struct { Attributes DataSets LineDataSets `json:"datasets"` }
type LineChart ¶
type LineChart struct { *Chart JsContent LineJsContent }
func (*LineChart) AddDataSet ¶
func (*LineChart) DSBackgroundColor ¶
func (*LineChart) DSBorderCapStyle ¶
func (*LineChart) DSBorderColor ¶
func (*LineChart) DSBorderDash ¶
func (*LineChart) DSBorderDashOffset ¶
func (*LineChart) DSBorderJoinStyle ¶
func (*LineChart) DSBorderWidth ¶
func (*LineChart) DSCubicInterpolationMode ¶
func (*LineChart) DSHoverBackgroundColor ¶
func (*LineChart) DSHoverBorderCapStyle ¶
func (*LineChart) DSHoverBorderColor ¶
func (*LineChart) DSHoverBorderDash ¶
func (*LineChart) DSHoverBorderDashOffset ¶
func (*LineChart) DSHoverBorderJoinStyle ¶
func (*LineChart) DSHoverBorderWidth ¶
func (*LineChart) DSLineTension ¶
func (*LineChart) DSPointBackgroundColor ¶
func (*LineChart) DSPointBorderColor ¶
func (*LineChart) DSPointBorderWidth ¶
func (*LineChart) DSPointHitRadius ¶
func (*LineChart) DSPointHoverBackgroundColor ¶
func (*LineChart) DSPointHoverBorderColor ¶
func (*LineChart) DSPointHoverBorderWidth ¶
func (*LineChart) DSPointHoverRadius ¶
func (*LineChart) DSPointRadius ¶
func (*LineChart) DSPointRotation ¶
func (*LineChart) DSPointStyle ¶
func (*LineChart) DSShowLine ¶
func (*LineChart) DSSpanGaps ¶
func (*LineChart) DSSteppedLine ¶
func (*LineChart) GetContent ¶
type LineDataSet ¶
type LineDataSet struct { Label string `json:"label"` Data []float64 `json:"data"` Type string `json:"type,omitempty"` BackgroundColor Color `json:"backgroundColor,omitempty"` BorderCapStyle string `json:"borderCapStyle,omitempty"` BorderColor Color `json:"borderColor,omitempty"` BorderDash []int `json:"borderDash,omitempty"` BorderDashOffset float64 `json:"borderDashOffset,omitempty"` BorderJoinStyle string `json:"borderJoinStyle,omitempty"` BorderWidth float64 `json:"borderWidth,omitempty"` CubicInterpolationMode string `json:"cubicInterpolationMode,omitempty"` Fill bool `json:"fill"` HoverBackgroundColor Color `json:"hoverBackgroundColor,omitempty"` HoverBorderCapStyle string `json:"hoverBorderCapStyle,omitempty"` HoverBorderColor Color `json:"hoverBorderColor,omitempty"` HoverBorderDash float64 `json:"hoverBorderDash,omitempty"` HoverBorderDashOffset float64 `json:"hoverBorderDashOffset,omitempty"` HoverBorderJoinStyle string `json:"hoverBorderJoinStyle,omitempty"` HoverBorderWidth float64 `json:"hoverBorderWidth,omitempty"` LineTension float64 `json:"lineTension,omitempty"` Order float64 `json:"order,omitempty"` PointBackgroundColor Color `json:"pointBackgroundColor,omitempty"` PointBorderColor Color `json:"pointBorderColor,omitempty"` PointBorderWidth float64 `json:"pointBorderWidth,omitempty"` PointHitRadius float64 `json:"pointHitRadius,omitempty"` PointHoverBackgroundColor Color `json:"pointHoverBackgroundColor,omitempty"` PointHoverBorderColor Color `json:"pointHoverBorderColor,omitempty"` PointHoverBorderWidth float64 `json:"pointHoverBorderWidth,omitempty"` PointHoverRadius float64 `json:"pointHoverRadius,omitempty"` PointRadius float64 `json:"pointRadius,omitempty"` PointRotation float64 `json:"pointRotation,omitempty"` PointStyle string `json:"pointStyle,omitempty"` ShowLine bool `json:"showLine,omitempty"` SpanGaps bool `json:"spanGaps,omitempty"` SteppedLine bool `json:"steppedLine,omitempty"` XAxisID string `json:"xAxisID,omitempty"` YAxisID string `json:"yAxisID,omitempty"` }
func (*LineDataSet) SetBackgroundColor ¶
func (l *LineDataSet) SetBackgroundColor(backgroundColor Color) *LineDataSet
func (*LineDataSet) SetBorderCapStyle ¶
func (l *LineDataSet) SetBorderCapStyle(borderCapStyle string) *LineDataSet
func (*LineDataSet) SetBorderColor ¶
func (l *LineDataSet) SetBorderColor(borderColor Color) *LineDataSet
func (*LineDataSet) SetBorderDash ¶
func (l *LineDataSet) SetBorderDash(borderDash []int) *LineDataSet
func (*LineDataSet) SetBorderDashOffset ¶
func (l *LineDataSet) SetBorderDashOffset(borderDashOffset float64) *LineDataSet
func (*LineDataSet) SetBorderJoinStyle ¶
func (l *LineDataSet) SetBorderJoinStyle(borderJoinStyle string) *LineDataSet
func (*LineDataSet) SetBorderWidth ¶
func (l *LineDataSet) SetBorderWidth(borderWidth float64) *LineDataSet
func (*LineDataSet) SetCubicInterpolationMode ¶
func (l *LineDataSet) SetCubicInterpolationMode(cubicInterpolationMode string) *LineDataSet
func (*LineDataSet) SetData ¶
func (l *LineDataSet) SetData(data []float64) *LineDataSet
func (*LineDataSet) SetFill ¶
func (l *LineDataSet) SetFill(fill bool) *LineDataSet
func (*LineDataSet) SetHoverBackgroundColor ¶
func (l *LineDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *LineDataSet
func (*LineDataSet) SetHoverBorderCapStyle ¶
func (l *LineDataSet) SetHoverBorderCapStyle(hoverBorderCapStyle string) *LineDataSet
func (*LineDataSet) SetHoverBorderColor ¶
func (l *LineDataSet) SetHoverBorderColor(hoverBorderColor Color) *LineDataSet
func (*LineDataSet) SetHoverBorderDash ¶
func (l *LineDataSet) SetHoverBorderDash(hoverBorderDash float64) *LineDataSet
func (*LineDataSet) SetHoverBorderDashOffset ¶
func (l *LineDataSet) SetHoverBorderDashOffset(hoverBorderDashOffset float64) *LineDataSet
func (*LineDataSet) SetHoverBorderJoinStyle ¶
func (l *LineDataSet) SetHoverBorderJoinStyle(hoverBorderJoinStyle string) *LineDataSet
func (*LineDataSet) SetHoverBorderWidth ¶
func (l *LineDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *LineDataSet
func (*LineDataSet) SetLabel ¶
func (l *LineDataSet) SetLabel(label string) *LineDataSet
func (*LineDataSet) SetLineTension ¶
func (l *LineDataSet) SetLineTension(lineTension float64) *LineDataSet
func (*LineDataSet) SetOrder ¶
func (l *LineDataSet) SetOrder(order float64) *LineDataSet
func (*LineDataSet) SetPointBackgroundColor ¶
func (l *LineDataSet) SetPointBackgroundColor(pointBackgroundColor Color) *LineDataSet
func (*LineDataSet) SetPointBorderColor ¶
func (l *LineDataSet) SetPointBorderColor(pointBorderColor Color) *LineDataSet
func (*LineDataSet) SetPointBorderWidth ¶
func (l *LineDataSet) SetPointBorderWidth(pointBorderWidth float64) *LineDataSet
func (*LineDataSet) SetPointHitRadius ¶
func (l *LineDataSet) SetPointHitRadius(pointHitRadius float64) *LineDataSet
func (*LineDataSet) SetPointHoverBackgroundColor ¶
func (l *LineDataSet) SetPointHoverBackgroundColor(pointHoverBackgroundColor Color) *LineDataSet
func (*LineDataSet) SetPointHoverBorderColor ¶
func (l *LineDataSet) SetPointHoverBorderColor(pointHoverBorderColor Color) *LineDataSet
func (*LineDataSet) SetPointHoverBorderWidth ¶
func (l *LineDataSet) SetPointHoverBorderWidth(pointHoverBorderWidth float64) *LineDataSet
func (*LineDataSet) SetPointHoverRadius ¶
func (l *LineDataSet) SetPointHoverRadius(pointHoverRadius float64) *LineDataSet
func (*LineDataSet) SetPointRadius ¶
func (l *LineDataSet) SetPointRadius(pointRadius float64) *LineDataSet
func (*LineDataSet) SetPointRotation ¶
func (l *LineDataSet) SetPointRotation(pointRotation float64) *LineDataSet
func (*LineDataSet) SetPointStyle ¶
func (l *LineDataSet) SetPointStyle(pointStyle string) *LineDataSet
func (*LineDataSet) SetShowLine ¶
func (l *LineDataSet) SetShowLine(showLine bool) *LineDataSet
func (*LineDataSet) SetSpanGaps ¶
func (l *LineDataSet) SetSpanGaps(spanGaps bool) *LineDataSet
func (*LineDataSet) SetSteppedLine ¶
func (l *LineDataSet) SetSteppedLine(steppedLine bool) *LineDataSet
func (*LineDataSet) SetType ¶
func (l *LineDataSet) SetType(t string) *LineDataSet
func (*LineDataSet) SetXAxisID ¶
func (l *LineDataSet) SetXAxisID(xAxisID string) *LineDataSet
func (*LineDataSet) SetYAxisID ¶
func (l *LineDataSet) SetYAxisID(yAxisID string) *LineDataSet
type LineDataSets ¶
type LineDataSets []*LineDataSet
func (LineDataSets) Add ¶
func (l LineDataSets) Add(ds *LineDataSet) LineDataSets
type LineJsContent ¶
type LineJsContent struct { JsContent Data LineAttributes `json:"data"` }
type OptionAnimation ¶
type OptionElement ¶
type OptionElement struct { Point *OptionElementPoint `json:"point,omitempty"` Line *OptionElementLine `json:"line,omitempty"` Rectangle *OptionElementRectangle `json:"rectangle,omitempty"` Arc *OptionElementArc `json:"arc,omitempty"` }
type OptionElementArc ¶
type OptionElementLine ¶
type OptionElementLine struct { Tension int `json:"tension,omitempty"` BackgroundColor Color `json:"background_color,omitempty"` BorderWidth int `json:"border_width,omitempty"` BorderColor Color `json:"border_color,omitempty"` BorderCapStyle string `json:"border_cap_style,omitempty"` BorderDash int `json:"border_dash,omitempty"` BorderDashOffset int `json:"border_dash_offset,omitempty"` BorderJoinStyle string `json:"border_join_style,omitempty"` CapBezierPoints bool `json:"cap_bezier_points,omitempty"` CubicInterpolationMode string `json:"cubic_interpolation_mode,omitempty"` Fill bool `json:"fill,omitempty"` Stepped bool `json:"stepped,omitempty"` }
type OptionElementPoint ¶
type OptionElementPoint struct { Radius int `json:"radius,omitempty"` PointStyle string `json:"pointStyle,omitempty"` Rotation int `json:"rotation,omitempty"` BackgroundColor Color `json:"backgroundColor,omitempty"` BorderWidth int `json:"borderWidth,omitempty"` BorderColor Color `json:"borderColor,omitempty"` HitRadius int `json:"hitRadius,omitempty"` HoverRadius int `json:"hoverRadius,omitempty"` HoverBorderWidth int `json:"hoverBorderWidth,omitempty"` }
type OptionElementRectangle ¶
type OptionLayout ¶
type OptionLegend ¶
type OptionLegend struct { Display bool `json:"display,omitempty"` Position string `json:"position,omitempty"` Align string `json:"align,omitempty"` FullWidth bool `json:"full_width,omitempty"` Reverse bool `json:"reverse,omitempty"` Rtl bool `json:"rtl,omitempty"` TextDirection string `json:"text_direction,omitempty"` Labels *OptionLegendLabel `json:"labels,omitempty"` }
type OptionLegendLabel ¶
type OptionLegendLabel struct { BoxWidth int `json:"box_width,omitempty"` FontSize int `json:"fontSize,omitempty"` FontStyle string `json:"fontStyle,omitempty"` FontColor Color `json:"fontColor,omitempty"` FontFamily string `json:"fontFamily,omitempty"` Padding int `json:"padding,omitempty"` UsePointStyle bool `json:"usePointStyle,omitempty"` }
type OptionTitle ¶
type OptionTitle struct { Display bool `json:"display,omitempty"` Position string `json:"position,omitempty"` FontSize int `json:"fontSize,omitempty"` FontFamily string `json:"fontFamily,omitempty"` FontColor Color `json:"fontColor,omitempty"` FontStyle string `json:"fontStyle,omitempty"` Padding int `json:"padding,omitempty"` LineHeight int `json:"lineHeight,omitempty"` Text string `json:"text,omitempty"` }
type OptionTooltips ¶
type OptionTooltips struct { Enabled bool `json:"enabled,omitempty"` Mode string `json:"mode,omitempty"` Intersect bool `json:"intersect,omitempty"` Position string `json:"position,omitempty"` BackgroundColor Color `json:"backgroundColor,omitempty"` TitleFontFamily string `json:"titleFontFamily,omitempty"` TitleFontSize int `json:"titleFontSize,omitempty"` TitleFontStyle string `json:"titleFontStyle,omitempty"` TitleFontColor Color `json:"titleFontColor,omitempty"` TitleAlign string `json:"titleAlign,omitempty"` TitleSpacing int `json:"titleSpacing,omitempty"` TitleMarginBottom int `json:"titleMarginBottom,omitempty"` BodyFontFamily string `json:"bodyFontFamily,omitempty"` BodyFontSize int `json:"bodyFontSize,omitempty"` BodyFontStyle string `json:"bodyFontStyle,omitempty"` BodyFontColor Color `json:"bodyFontColor,omitempty"` BodyAlign string `json:"bodyAlign,omitempty"` BodySpacing int `json:"bodySpacing,omitempty"` XPadding int `json:"xPadding,omitempty"` YPadding int `json:"yPadding,omitempty"` CaretPadding int `json:"caretPadding,omitempty"` CaretSize int `json:"caretSize,omitempty"` CornerRadius int `json:"cornerRadius,omitempty"` MultiKeyBackground Color `json:"multiKeyBackground,omitempty"` DisplayColors bool `json:"displayColors,omitempty"` BorderColor Color `json:"borderColor,omitempty"` BorderWidth int `json:"borderWidth,omitempty"` Rtl bool `json:"rtl,omitempty"` TextDirection string `json:"textDirection,omitempty"` }
type Options ¶
type Options struct { Animation *OptionAnimation `json:"animation,omitempty"` Layout *OptionLayout `json:"layout,omitempty"` Legend *OptionLegend `json:"legend,omitempty"` Title *OptionTitle `json:"title,omitempty"` Tooltips *OptionTooltips `json:"tooltips,omitempty"` Elements *OptionElement `json:"elements,omitempty"` }
type PieAttributes ¶
type PieAttributes struct { Attributes DataSets PieDataSets `json:"datasets"` }
type PieChart ¶
type PieChart struct { *Chart JsContent PieJsContent }
func (*PieChart) AddDataSet ¶
func (*PieChart) DSBackgroundColor ¶
func (*PieChart) DSBorderColor ¶
func (*PieChart) DSBorderWidth ¶
func (*PieChart) DSHoverBackgroundColor ¶
func (*PieChart) DSHoverBorderColor ¶
func (*PieChart) DSHoverBorderWidth ¶
func (*PieChart) GetContent ¶
type PieDataSet ¶
type PieDataSet struct { Label string `json:"label"` Data []float64 `json:"data"` Type string `json:"type,omitempty"` BackgroundColor []Color `json:"backgroundColor,omitempty"` BorderColor Color `json:"borderColor,omitempty"` BorderWidth float64 `json:"borderWidth,omitempty"` BorderAlign string `json:"borderAlign,omitempty"` HoverBackgroundColor Color `json:"hoverBackgroundColor,omitempty"` HoverBorderColor Color `json:"hoverBorderColor,omitempty"` HoverBorderWidth float64 `json:"hoverBorderWidth,omitempty"` Weight int `json:"weight,omitempty"` }
func (*PieDataSet) SetBackgroundColor ¶
func (l *PieDataSet) SetBackgroundColor(backgroundColor []Color) *PieDataSet
func (*PieDataSet) SetBorderAlign ¶
func (l *PieDataSet) SetBorderAlign(align string) *PieDataSet
func (*PieDataSet) SetBorderColor ¶
func (l *PieDataSet) SetBorderColor(borderColor Color) *PieDataSet
func (*PieDataSet) SetBorderWidth ¶
func (l *PieDataSet) SetBorderWidth(borderWidth float64) *PieDataSet
func (*PieDataSet) SetData ¶
func (l *PieDataSet) SetData(data []float64) *PieDataSet
func (*PieDataSet) SetHoverBackgroundColor ¶
func (l *PieDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *PieDataSet
func (*PieDataSet) SetHoverBorderColor ¶
func (l *PieDataSet) SetHoverBorderColor(hoverBorderColor Color) *PieDataSet
func (*PieDataSet) SetHoverBorderWidth ¶
func (l *PieDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *PieDataSet
func (*PieDataSet) SetLabel ¶
func (l *PieDataSet) SetLabel(label string) *PieDataSet
func (*PieDataSet) SetType ¶
func (l *PieDataSet) SetType(t string) *PieDataSet
func (*PieDataSet) SetWeight ¶
func (l *PieDataSet) SetWeight(weight int) *PieDataSet
type PieDataSets ¶
type PieDataSets []*PieDataSet
func (PieDataSets) Add ¶
func (l PieDataSets) Add(ds *PieDataSet) PieDataSets
type PieJsContent ¶
type PieJsContent struct { JsContent Data PieAttributes `json:"data"` }