go-admin: github.com/GoAdminGroup/go-admin/template/chartjs Index | Files

package chartjs

import "github.com/GoAdminGroup/go-admin/template/chartjs"

Index

Package Files

assets.go assets_list.go bar.go chart.go line.go pie.go radar.go template.go

Variables

var AssetsList = []string{
    "/chart.min.js",
}
var List = map[string]string{
    "chartjs": "" /* 356 byte string literal not displayed */,
}

func Asset Uses

func Asset(name string) ([]byte, error)

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 Uses

func AssetDir(name string) ([]string, error)

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 Uses

func AssetInfo(name string) (os.FileInfo, error)

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 AssetNames Uses

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset Uses

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset Uses

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets Uses

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

type Attributes Uses

type Attributes struct {
    Labels []string `json:"labels,omitempty"`
}

type BarAttributes Uses

type BarAttributes struct {
    Attributes

    DataSets BarDataSets `json:"datasets"`
}

type BarChart Uses

type BarChart struct {
    *Chart

    JsContent BarJsContent
}

func Bar Uses

func Bar() *BarChart

func (*BarChart) AddDataSet Uses

func (l *BarChart) AddDataSet(s string) *BarChart

func (*BarChart) DSBackgroundColor Uses

func (l *BarChart) DSBackgroundColor(backgroundColor Color) *BarChart

func (*BarChart) DSBorderCapStyle Uses

func (l *BarChart) DSBorderCapStyle(borderCapStyle string) *BarChart

func (*BarChart) DSBorderColor Uses

func (l *BarChart) DSBorderColor(borderColor Color) *BarChart

func (*BarChart) DSBorderSkipped Uses

func (l *BarChart) DSBorderSkipped(skip string) *BarChart

func (*BarChart) DSBorderWidth Uses

func (l *BarChart) DSBorderWidth(borderWidth float64) *BarChart

func (*BarChart) DSData Uses

func (l *BarChart) DSData(data []float64) *BarChart

func (*BarChart) DSHoverBackgroundColor Uses

func (l *BarChart) DSHoverBackgroundColor(hoverBackgroundColor Color) *BarChart

func (*BarChart) DSHoverBorderColor Uses

func (l *BarChart) DSHoverBorderColor(hoverBorderColor Color) *BarChart

func (*BarChart) DSHoverBorderWidth Uses

func (l *BarChart) DSHoverBorderWidth(hoverBorderWidth float64) *BarChart

func (*BarChart) DSLabel Uses

func (l *BarChart) DSLabel(s string) *BarChart

func (*BarChart) DSOrder Uses

func (l *BarChart) DSOrder(order float64) *BarChart

func (*BarChart) DSType Uses

func (l *BarChart) DSType(t string) *BarChart

func (*BarChart) DSXAxisID Uses

func (l *BarChart) DSXAxisID(xAxisID string) *BarChart

func (*BarChart) DSYAxisID Uses

func (l *BarChart) DSYAxisID(yAxisID string) *BarChart

func (*BarChart) GetContent Uses

func (l *BarChart) GetContent() template.HTML

func (*BarChart) SetHeight Uses

func (l *BarChart) SetHeight(s int) *BarChart

func (*BarChart) SetID Uses

func (l *BarChart) SetID(s string) *BarChart

func (*BarChart) SetLabels Uses

func (l *BarChart) SetLabels(s []string) *BarChart

func (*BarChart) SetTitle Uses

func (l *BarChart) SetTitle(s template.HTML) *BarChart

type BarDataSet Uses

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 Uses

func (l *BarDataSet) SetBackgroundColor(backgroundColor Color) *BarDataSet

func (*BarDataSet) SetBorderCapStyle Uses

func (l *BarDataSet) SetBorderCapStyle(borderCapStyle string) *BarDataSet

func (*BarDataSet) SetBorderColor Uses

func (l *BarDataSet) SetBorderColor(borderColor Color) *BarDataSet

func (*BarDataSet) SetBorderSkipped Uses

func (l *BarDataSet) SetBorderSkipped(skip string) *BarDataSet

func (*BarDataSet) SetBorderWidth Uses

func (l *BarDataSet) SetBorderWidth(borderWidth float64) *BarDataSet

func (*BarDataSet) SetData Uses

func (l *BarDataSet) SetData(data []float64) *BarDataSet

func (*BarDataSet) SetHoverBackgroundColor Uses

func (l *BarDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *BarDataSet

func (*BarDataSet) SetHoverBorderColor Uses

func (l *BarDataSet) SetHoverBorderColor(hoverBorderColor Color) *BarDataSet

func (*BarDataSet) SetHoverBorderWidth Uses

func (l *BarDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *BarDataSet

func (*BarDataSet) SetLabel Uses

func (l *BarDataSet) SetLabel(label string) *BarDataSet

func (*BarDataSet) SetOrder Uses

func (l *BarDataSet) SetOrder(order float64) *BarDataSet

func (*BarDataSet) SetType Uses

func (l *BarDataSet) SetType(t string) *BarDataSet

func (*BarDataSet) SetXAxisID Uses

func (l *BarDataSet) SetXAxisID(xAxisID string) *BarDataSet

func (*BarDataSet) SetYAxisID Uses

func (l *BarDataSet) SetYAxisID(yAxisID string) *BarDataSet

type BarDataSets Uses

type BarDataSets []*BarDataSet

func (BarDataSets) Add Uses

func (l BarDataSets) Add(ds *BarDataSet) BarDataSets

type BarJsContent Uses

type BarJsContent struct {
    JsContent

    Data BarAttributes `json:"data"`
}

type Chart Uses

type Chart struct {
    ID     string
    Title  template.HTML
    Js     template.JS
    Height int

    JsContentOptions *Options
    // contains filtered or unexported fields
}

func NewChart Uses

func NewChart() *Chart

func (*Chart) GetAsset Uses

func (c *Chart) GetAsset(name string) ([]byte, error)

func (*Chart) GetAssetList Uses

func (c *Chart) GetAssetList() []string

func (*Chart) GetContent Uses

func (c *Chart) GetContent() template.HTML

func (*Chart) GetName Uses

func (c *Chart) GetName() string

func (*Chart) GetTemplate Uses

func (c *Chart) GetTemplate() (*template.Template, string)

func (*Chart) IsAPage Uses

func (c *Chart) IsAPage() bool

func (*Chart) SetHeight Uses

func (c *Chart) SetHeight(height int) *Chart

func (*Chart) SetID Uses

func (c *Chart) SetID(id string) *Chart

func (*Chart) SetOptionAnimationDuration Uses

func (c *Chart) SetOptionAnimationDuration(duration int)

func (*Chart) SetOptionAnimationEasing Uses

func (c *Chart) SetOptionAnimationEasing(easing string)

func (*Chart) SetOptionElementArc Uses

func (c *Chart) SetOptionElementArc(arc *OptionElementArc)

func (*Chart) SetOptionElementLine Uses

func (c *Chart) SetOptionElementLine(line *OptionElementLine)

func (*Chart) SetOptionElementPoint Uses

func (c *Chart) SetOptionElementPoint(point *OptionElementPoint)

func (*Chart) SetOptionElementRectangle Uses

func (c *Chart) SetOptionElementRectangle(rectangle *OptionElementRectangle)

func (*Chart) SetOptionLayoutPaddingBottom Uses

func (c *Chart) SetOptionLayoutPaddingBottom(bottom int)

func (*Chart) SetOptionLayoutPaddingLeft Uses

func (c *Chart) SetOptionLayoutPaddingLeft(left int)

func (*Chart) SetOptionLayoutPaddingRight Uses

func (c *Chart) SetOptionLayoutPaddingRight(right int)

func (*Chart) SetOptionLayoutPaddingTop Uses

func (c *Chart) SetOptionLayoutPaddingTop(top int)

func (*Chart) SetOptionLegendAlign Uses

func (c *Chart) SetOptionLegendAlign(align string)

func (*Chart) SetOptionLegendDisplay Uses

func (c *Chart) SetOptionLegendDisplay(display bool)

func (*Chart) SetOptionLegendFullWidt Uses

func (c *Chart) SetOptionLegendFullWidt(fullWidth bool)

func (*Chart) SetOptionLegendLabels Uses

func (c *Chart) SetOptionLegendLabels(labels *OptionLegendLabel)

func (*Chart) SetOptionLegendPosition Uses

func (c *Chart) SetOptionLegendPosition(position string)

func (*Chart) SetOptionLegendRevers Uses

func (c *Chart) SetOptionLegendRevers(reverse bool)

func (*Chart) SetOptionLegendRt Uses

func (c *Chart) SetOptionLegendRt(rtl bool)

func (*Chart) SetOptionLegendTextDirection Uses

func (c *Chart) SetOptionLegendTextDirection(textDirection string)

func (*Chart) SetOptionTitleDisplay Uses

func (c *Chart) SetOptionTitleDisplay(display bool)

func (*Chart) SetOptionTitleFontColor Uses

func (c *Chart) SetOptionTitleFontColor(fontColor Color)

func (*Chart) SetOptionTitleFontFamily Uses

func (c *Chart) SetOptionTitleFontFamily(fontFamily string)

func (*Chart) SetOptionTitleFontSize Uses

func (c *Chart) SetOptionTitleFontSize(fontSize int)

func (*Chart) SetOptionTitleFontStyle Uses

func (c *Chart) SetOptionTitleFontStyle(fontStyle string)

func (*Chart) SetOptionTitleLineHeight Uses

func (c *Chart) SetOptionTitleLineHeight(lineHeight int)

func (*Chart) SetOptionTitlePadding Uses

func (c *Chart) SetOptionTitlePadding(padding int)

func (*Chart) SetOptionTitlePosition Uses

func (c *Chart) SetOptionTitlePosition(position string)

func (*Chart) SetOptionTitleText Uses

func (c *Chart) SetOptionTitleText(text string)

func (*Chart) SetOptionTooltipsBackgroundColor Uses

func (c *Chart) SetOptionTooltipsBackgroundColor(backgroundColor Color)

func (*Chart) SetOptionTooltipsBodyAlign Uses

func (c *Chart) SetOptionTooltipsBodyAlign(bodyAlign string)

func (*Chart) SetOptionTooltipsBodyFontColor Uses

func (c *Chart) SetOptionTooltipsBodyFontColor(bodyFontColor Color)

func (*Chart) SetOptionTooltipsBodyFontFamily Uses

func (c *Chart) SetOptionTooltipsBodyFontFamily(bodyFontFamily string)

func (*Chart) SetOptionTooltipsBodyFontSize Uses

func (c *Chart) SetOptionTooltipsBodyFontSize(bodyFontSize int)

func (*Chart) SetOptionTooltipsBodyFontStyle Uses

func (c *Chart) SetOptionTooltipsBodyFontStyle(bodyFontStyle string)

func (*Chart) SetOptionTooltipsBodySpacing Uses

func (c *Chart) SetOptionTooltipsBodySpacing(bodySpacing int)

func (*Chart) SetOptionTooltipsBorderColor Uses

func (c *Chart) SetOptionTooltipsBorderColor(borderColor Color)

func (*Chart) SetOptionTooltipsBorderWidth Uses

func (c *Chart) SetOptionTooltipsBorderWidth(borderWidth int)

func (*Chart) SetOptionTooltipsCaretPadding Uses

func (c *Chart) SetOptionTooltipsCaretPadding(caretPadding int)

func (*Chart) SetOptionTooltipsCaretSize Uses

func (c *Chart) SetOptionTooltipsCaretSize(caretSize int)

func (*Chart) SetOptionTooltipsCornerRadius Uses

func (c *Chart) SetOptionTooltipsCornerRadius(cornerRadius int)

func (*Chart) SetOptionTooltipsDisplayColors Uses

func (c *Chart) SetOptionTooltipsDisplayColors(displayColors bool)

func (*Chart) SetOptionTooltipsEnabled Uses

func (c *Chart) SetOptionTooltipsEnabled(enabled bool)

func (*Chart) SetOptionTooltipsFooterAlign Uses

func (c *Chart) SetOptionTooltipsFooterAlign(footerAlign string)

func (*Chart) SetOptionTooltipsFooterFontColor Uses

func (c *Chart) SetOptionTooltipsFooterFontColor(footerFontColor Color)

func (*Chart) SetOptionTooltipsFooterFontFamily Uses

func (c *Chart) SetOptionTooltipsFooterFontFamily(footerFontFamily string)

func (*Chart) SetOptionTooltipsFooterFontSize Uses

func (c *Chart) SetOptionTooltipsFooterFontSize(footerFontSize int)

func (*Chart) SetOptionTooltipsFooterFontStyle Uses

func (c *Chart) SetOptionTooltipsFooterFontStyle(footerFontStyle string)

func (*Chart) SetOptionTooltipsFooterMarginTop Uses

func (c *Chart) SetOptionTooltipsFooterMarginTop(footerMarginTop int)

func (*Chart) SetOptionTooltipsFooterSpacing Uses

func (c *Chart) SetOptionTooltipsFooterSpacing(footerSpacing int)

func (*Chart) SetOptionTooltipsIntersect Uses

func (c *Chart) SetOptionTooltipsIntersect(intersect bool)

func (*Chart) SetOptionTooltipsMode Uses

func (c *Chart) SetOptionTooltipsMode(mode string)

func (*Chart) SetOptionTooltipsMultiKeyBackground Uses

func (c *Chart) SetOptionTooltipsMultiKeyBackground(multiKeyBackground Color)

func (*Chart) SetOptionTooltipsPosition Uses

func (c *Chart) SetOptionTooltipsPosition(position string)

func (*Chart) SetOptionTooltipsRtl Uses

func (c *Chart) SetOptionTooltipsRtl(rtl bool)

func (*Chart) SetOptionTooltipsTextDirection Uses

func (c *Chart) SetOptionTooltipsTextDirection(textDirection string)

func (*Chart) SetOptionTooltipsTitleAlign Uses

func (c *Chart) SetOptionTooltipsTitleAlign(titleAlign string)

func (*Chart) SetOptionTooltipsTitleFontColor Uses

func (c *Chart) SetOptionTooltipsTitleFontColor(titleFontColor Color)

func (*Chart) SetOptionTooltipsTitleFontFamily Uses

func (c *Chart) SetOptionTooltipsTitleFontFamily(titleFontFamily string)

func (*Chart) SetOptionTooltipsTitleFontSize Uses

func (c *Chart) SetOptionTooltipsTitleFontSize(titleFontSize int)

func (*Chart) SetOptionTooltipsTitleFontStyle Uses

func (c *Chart) SetOptionTooltipsTitleFontStyle(titleFontStyle string)

func (*Chart) SetOptionTooltipsTitleMarginBottom Uses

func (c *Chart) SetOptionTooltipsTitleMarginBottom(titleMarginBottom int)

func (*Chart) SetOptionTooltipsTitleSpacing Uses

func (c *Chart) SetOptionTooltipsTitleSpacing(titleSpacing int)

func (*Chart) SetOptionTooltipsXPadding Uses

func (c *Chart) SetOptionTooltipsXPadding(xPadding int)

func (*Chart) SetOptionTooltipsYPadding Uses

func (c *Chart) SetOptionTooltipsYPadding(yPadding int)

func (*Chart) SetTitle Uses

func (c *Chart) SetTitle(title template.HTML) *Chart

type Color Uses

type Color string

type DataSet Uses

type DataSet struct {
    Label string    `json:"label,omitempty"`
    Data  []float64 `json:"data,omitempty"`
    Type  string    `json:"type,omitempty"`
}

type DataSets Uses

type DataSets []DataSet

type JsContent Uses

type JsContent struct {
    Type    string   `json:"type,omitempty"`
    Options *Options `json:"options,omitempty"`
}

type LineAttributes Uses

type LineAttributes struct {
    Attributes

    DataSets LineDataSets `json:"datasets"`
}

type LineChart Uses

type LineChart struct {
    *Chart

    JsContent LineJsContent
}

func Line Uses

func Line() *LineChart

func (*LineChart) AddDataSet Uses

func (l *LineChart) AddDataSet(s string) *LineChart

func (*LineChart) DSBackgroundColor Uses

func (l *LineChart) DSBackgroundColor(backgroundColor Color) *LineChart

func (*LineChart) DSBorderCapStyle Uses

func (l *LineChart) DSBorderCapStyle(borderCapStyle string) *LineChart

func (*LineChart) DSBorderColor Uses

func (l *LineChart) DSBorderColor(borderColor Color) *LineChart

func (*LineChart) DSBorderDash Uses

func (l *LineChart) DSBorderDash(borderDash []int) *LineChart

func (*LineChart) DSBorderDashOffset Uses

func (l *LineChart) DSBorderDashOffset(borderDashOffset float64) *LineChart

func (*LineChart) DSBorderJoinStyle Uses

func (l *LineChart) DSBorderJoinStyle(borderJoinStyle string) *LineChart

func (*LineChart) DSBorderWidth Uses

func (l *LineChart) DSBorderWidth(borderWidth float64) *LineChart

func (*LineChart) DSCubicInterpolationMode Uses

func (l *LineChart) DSCubicInterpolationMode(cubicInterpolationMode string) *LineChart

func (*LineChart) DSData Uses

func (l *LineChart) DSData(data []float64) *LineChart

func (*LineChart) DSFill Uses

func (l *LineChart) DSFill(fill bool) *LineChart

func (*LineChart) DSHoverBackgroundColor Uses

func (l *LineChart) DSHoverBackgroundColor(hoverBackgroundColor Color) *LineChart

func (*LineChart) DSHoverBorderCapStyle Uses

func (l *LineChart) DSHoverBorderCapStyle(hoverBorderCapStyle string) *LineChart

func (*LineChart) DSHoverBorderColor Uses

func (l *LineChart) DSHoverBorderColor(hoverBorderColor Color) *LineChart

func (*LineChart) DSHoverBorderDash Uses

func (l *LineChart) DSHoverBorderDash(hoverBorderDash float64) *LineChart

func (*LineChart) DSHoverBorderDashOffset Uses

func (l *LineChart) DSHoverBorderDashOffset(hoverBorderDashOffset float64) *LineChart

func (*LineChart) DSHoverBorderJoinStyle Uses

func (l *LineChart) DSHoverBorderJoinStyle(hoverBorderJoinStyle string) *LineChart

func (*LineChart) DSHoverBorderWidth Uses

func (l *LineChart) DSHoverBorderWidth(hoverBorderWidth float64) *LineChart

func (*LineChart) DSLabel Uses

func (l *LineChart) DSLabel(s string) *LineChart

func (*LineChart) DSLineTension Uses

func (l *LineChart) DSLineTension(lineTension float64) *LineChart

func (*LineChart) DSOrder Uses

func (l *LineChart) DSOrder(order float64) *LineChart

func (*LineChart) DSPointBackgroundColor Uses

func (l *LineChart) DSPointBackgroundColor(pointBackgroundColor Color) *LineChart

func (*LineChart) DSPointBorderColor Uses

func (l *LineChart) DSPointBorderColor(pointBorderColor Color) *LineChart

func (*LineChart) DSPointBorderWidth Uses

func (l *LineChart) DSPointBorderWidth(pointBorderWidth float64) *LineChart

func (*LineChart) DSPointHitRadius Uses

func (l *LineChart) DSPointHitRadius(pointHitRadius float64) *LineChart

func (*LineChart) DSPointHoverBackgroundColor Uses

func (l *LineChart) DSPointHoverBackgroundColor(pointHoverBackgroundColor Color) *LineChart

func (*LineChart) DSPointHoverBorderColor Uses

func (l *LineChart) DSPointHoverBorderColor(pointHoverBorderColor Color) *LineChart

func (*LineChart) DSPointHoverBorderWidth Uses

func (l *LineChart) DSPointHoverBorderWidth(pointHoverBorderWidth float64) *LineChart

func (*LineChart) DSPointHoverRadius Uses

func (l *LineChart) DSPointHoverRadius(pointHoverRadius float64) *LineChart

func (*LineChart) DSPointRadius Uses

func (l *LineChart) DSPointRadius(pointRadius float64) *LineChart

func (*LineChart) DSPointRotation Uses

func (l *LineChart) DSPointRotation(pointRotation float64) *LineChart

func (*LineChart) DSPointStyle Uses

func (l *LineChart) DSPointStyle(pointStyle string) *LineChart

func (*LineChart) DSShowLine Uses

func (l *LineChart) DSShowLine(showLine bool) *LineChart

func (*LineChart) DSSpanGaps Uses

func (l *LineChart) DSSpanGaps(spanGaps bool) *LineChart

func (*LineChart) DSSteppedLine Uses

func (l *LineChart) DSSteppedLine(steppedLine bool) *LineChart

func (*LineChart) DSType Uses

func (l *LineChart) DSType(t string) *LineChart

func (*LineChart) DSXAxisID Uses

func (l *LineChart) DSXAxisID(xAxisID string) *LineChart

func (*LineChart) DSYAxisID Uses

func (l *LineChart) DSYAxisID(yAxisID string) *LineChart

func (*LineChart) GetContent Uses

func (l *LineChart) GetContent() template.HTML

func (*LineChart) SetHeight Uses

func (l *LineChart) SetHeight(s int) *LineChart

func (*LineChart) SetID Uses

func (l *LineChart) SetID(s string) *LineChart

func (*LineChart) SetLabels Uses

func (l *LineChart) SetLabels(s []string) *LineChart

func (*LineChart) SetTitle Uses

func (l *LineChart) SetTitle(s template.HTML) *LineChart

type LineDataSet Uses

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 Uses

func (l *LineDataSet) SetBackgroundColor(backgroundColor Color) *LineDataSet

func (*LineDataSet) SetBorderCapStyle Uses

func (l *LineDataSet) SetBorderCapStyle(borderCapStyle string) *LineDataSet

func (*LineDataSet) SetBorderColor Uses

func (l *LineDataSet) SetBorderColor(borderColor Color) *LineDataSet

func (*LineDataSet) SetBorderDash Uses

func (l *LineDataSet) SetBorderDash(borderDash []int) *LineDataSet

func (*LineDataSet) SetBorderDashOffset Uses

func (l *LineDataSet) SetBorderDashOffset(borderDashOffset float64) *LineDataSet

func (*LineDataSet) SetBorderJoinStyle Uses

func (l *LineDataSet) SetBorderJoinStyle(borderJoinStyle string) *LineDataSet

func (*LineDataSet) SetBorderWidth Uses

func (l *LineDataSet) SetBorderWidth(borderWidth float64) *LineDataSet

func (*LineDataSet) SetCubicInterpolationMode Uses

func (l *LineDataSet) SetCubicInterpolationMode(cubicInterpolationMode string) *LineDataSet

func (*LineDataSet) SetData Uses

func (l *LineDataSet) SetData(data []float64) *LineDataSet

func (*LineDataSet) SetFill Uses

func (l *LineDataSet) SetFill(fill bool) *LineDataSet

func (*LineDataSet) SetHoverBackgroundColor Uses

func (l *LineDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *LineDataSet

func (*LineDataSet) SetHoverBorderCapStyle Uses

func (l *LineDataSet) SetHoverBorderCapStyle(hoverBorderCapStyle string) *LineDataSet

func (*LineDataSet) SetHoverBorderColor Uses

func (l *LineDataSet) SetHoverBorderColor(hoverBorderColor Color) *LineDataSet

func (*LineDataSet) SetHoverBorderDash Uses

func (l *LineDataSet) SetHoverBorderDash(hoverBorderDash float64) *LineDataSet

func (*LineDataSet) SetHoverBorderDashOffset Uses

func (l *LineDataSet) SetHoverBorderDashOffset(hoverBorderDashOffset float64) *LineDataSet

func (*LineDataSet) SetHoverBorderJoinStyle Uses

func (l *LineDataSet) SetHoverBorderJoinStyle(hoverBorderJoinStyle string) *LineDataSet

func (*LineDataSet) SetHoverBorderWidth Uses

func (l *LineDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *LineDataSet

func (*LineDataSet) SetLabel Uses

func (l *LineDataSet) SetLabel(label string) *LineDataSet

func (*LineDataSet) SetLineTension Uses

func (l *LineDataSet) SetLineTension(lineTension float64) *LineDataSet

func (*LineDataSet) SetOrder Uses

func (l *LineDataSet) SetOrder(order float64) *LineDataSet

func (*LineDataSet) SetPointBackgroundColor Uses

func (l *LineDataSet) SetPointBackgroundColor(pointBackgroundColor Color) *LineDataSet

func (*LineDataSet) SetPointBorderColor Uses

func (l *LineDataSet) SetPointBorderColor(pointBorderColor Color) *LineDataSet

func (*LineDataSet) SetPointBorderWidth Uses

func (l *LineDataSet) SetPointBorderWidth(pointBorderWidth float64) *LineDataSet

func (*LineDataSet) SetPointHitRadius Uses

func (l *LineDataSet) SetPointHitRadius(pointHitRadius float64) *LineDataSet

func (*LineDataSet) SetPointHoverBackgroundColor Uses

func (l *LineDataSet) SetPointHoverBackgroundColor(pointHoverBackgroundColor Color) *LineDataSet

func (*LineDataSet) SetPointHoverBorderColor Uses

func (l *LineDataSet) SetPointHoverBorderColor(pointHoverBorderColor Color) *LineDataSet

func (*LineDataSet) SetPointHoverBorderWidth Uses

func (l *LineDataSet) SetPointHoverBorderWidth(pointHoverBorderWidth float64) *LineDataSet

func (*LineDataSet) SetPointHoverRadius Uses

func (l *LineDataSet) SetPointHoverRadius(pointHoverRadius float64) *LineDataSet

func (*LineDataSet) SetPointRadius Uses

func (l *LineDataSet) SetPointRadius(pointRadius float64) *LineDataSet

func (*LineDataSet) SetPointRotation Uses

func (l *LineDataSet) SetPointRotation(pointRotation float64) *LineDataSet

func (*LineDataSet) SetPointStyle Uses

func (l *LineDataSet) SetPointStyle(pointStyle string) *LineDataSet

func (*LineDataSet) SetShowLine Uses

func (l *LineDataSet) SetShowLine(showLine bool) *LineDataSet

func (*LineDataSet) SetSpanGaps Uses

func (l *LineDataSet) SetSpanGaps(spanGaps bool) *LineDataSet

func (*LineDataSet) SetSteppedLine Uses

func (l *LineDataSet) SetSteppedLine(steppedLine bool) *LineDataSet

func (*LineDataSet) SetType Uses

func (l *LineDataSet) SetType(t string) *LineDataSet

func (*LineDataSet) SetXAxisID Uses

func (l *LineDataSet) SetXAxisID(xAxisID string) *LineDataSet

func (*LineDataSet) SetYAxisID Uses

func (l *LineDataSet) SetYAxisID(yAxisID string) *LineDataSet

type LineDataSets Uses

type LineDataSets []*LineDataSet

func (LineDataSets) Add Uses

func (l LineDataSets) Add(ds *LineDataSet) LineDataSets

type LineJsContent Uses

type LineJsContent struct {
    JsContent

    Data LineAttributes `json:"data"`
}

type OptionAnimation Uses

type OptionAnimation struct {
    Duration int    `json:"duration,omitempty"`
    Easing   string `json:"easing,omitempty"`
}

type OptionElement Uses

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 Uses

type OptionElementArc struct {
    Angle           int    `json:"angle,omitempty"`
    BackgroundColor Color  `json:"backgroundColor,omitempty"`
    BorderAlign     string `json:"borderAlign,omitempty"`
    BorderColor     Color  `json:"borderColor,omitempty"`
    BorderWidth     int    `json:"borderWidth,omitempty"`
}

type OptionElementLine Uses

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 Uses

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 Uses

type OptionElementRectangle struct {
    BackgroundColor Color  `json:"backgroundColor,omitempty"`
    BorderWidth     int    `json:"borderWidth,omitempty"`
    BorderColor     Color  `json:"borderColor,omitempty"`
    BorderSkipped   string `json:"borderSkipped,omitempty"`
}

type OptionLayout Uses

type OptionLayout struct {
    Padding struct {
        Left   int `json:"left,omitempty"`
        Right  int `json:"right,omitempty"`
        Top    int `json:"top,omitempty"`
        Bottom int `json:"bottom,omitempty"`
    } `json:"padding,omitempty"`
}

type OptionLegend Uses

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 Uses

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 Uses

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 Uses

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"`
    FooterFontFamily   string `json:"footerFontFamily,omitempty"`
    FooterFontSize     int    `json:"footerFontSize,omitempty"`
    FooterFontStyle    string `json:"footerFontStyle,omitempty"`
    FooterFontColor    Color  `json:"footerFontColor,omitempty"`
    FooterAlign        string `json:"footerAlign,omitempty"`
    FooterSpacing      int    `json:"footerSpacing,omitempty"`
    FooterMarginTop    int    `json:"footerMarginTop,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 Uses

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 Uses

type PieAttributes struct {
    Attributes

    DataSets PieDataSets `json:"datasets"`
}

type PieChart Uses

type PieChart struct {
    *Chart

    JsContent PieJsContent
}

func Pie Uses

func Pie() *PieChart

func (*PieChart) AddDataSet Uses

func (l *PieChart) AddDataSet(s string) *PieChart

func (*PieChart) DSBackgroundColor Uses

func (l *PieChart) DSBackgroundColor(backgroundColor []Color) *PieChart

func (*PieChart) DSBorderColor Uses

func (l *PieChart) DSBorderColor(borderColor Color) *PieChart

func (*PieChart) DSBorderWidth Uses

func (l *PieChart) DSBorderWidth(borderWidth float64) *PieChart

func (*PieChart) DSData Uses

func (l *PieChart) DSData(data []float64) *PieChart

func (*PieChart) DSHoverBackgroundColor Uses

func (l *PieChart) DSHoverBackgroundColor(hoverBackgroundColor Color) *PieChart

func (*PieChart) DSHoverBorderColor Uses

func (l *PieChart) DSHoverBorderColor(hoverBorderColor Color) *PieChart

func (*PieChart) DSHoverBorderWidth Uses

func (l *PieChart) DSHoverBorderWidth(hoverBorderWidth float64) *PieChart

func (*PieChart) DSLabel Uses

func (l *PieChart) DSLabel(s string) *PieChart

func (*PieChart) DSType Uses

func (l *PieChart) DSType(t string) *PieChart

func (*PieChart) DSWeight Uses

func (l *PieChart) DSWeight(weight int) *PieChart

func (*PieChart) GetContent Uses

func (l *PieChart) GetContent() template.HTML

func (*PieChart) SetHeight Uses

func (l *PieChart) SetHeight(s int) *PieChart

func (*PieChart) SetID Uses

func (l *PieChart) SetID(s string) *PieChart

func (*PieChart) SetLabels Uses

func (l *PieChart) SetLabels(s []string) *PieChart

func (*PieChart) SetTitle Uses

func (l *PieChart) SetTitle(s template.HTML) *PieChart

type PieDataSet Uses

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 Uses

func (l *PieDataSet) SetBackgroundColor(backgroundColor []Color) *PieDataSet

func (*PieDataSet) SetBorderAlign Uses

func (l *PieDataSet) SetBorderAlign(align string) *PieDataSet

func (*PieDataSet) SetBorderColor Uses

func (l *PieDataSet) SetBorderColor(borderColor Color) *PieDataSet

func (*PieDataSet) SetBorderWidth Uses

func (l *PieDataSet) SetBorderWidth(borderWidth float64) *PieDataSet

func (*PieDataSet) SetData Uses

func (l *PieDataSet) SetData(data []float64) *PieDataSet

func (*PieDataSet) SetHoverBackgroundColor Uses

func (l *PieDataSet) SetHoverBackgroundColor(hoverBackgroundColor Color) *PieDataSet

func (*PieDataSet) SetHoverBorderColor Uses

func (l *PieDataSet) SetHoverBorderColor(hoverBorderColor Color) *PieDataSet

func (*PieDataSet) SetHoverBorderWidth Uses

func (l *PieDataSet) SetHoverBorderWidth(hoverBorderWidth float64) *PieDataSet

func (*PieDataSet) SetLabel Uses

func (l *PieDataSet) SetLabel(label string) *PieDataSet

func (*PieDataSet) SetType Uses

func (l *PieDataSet) SetType(t string) *PieDataSet

func (*PieDataSet) SetWeight Uses

func (l *PieDataSet) SetWeight(weight int) *PieDataSet

type PieDataSets Uses

type PieDataSets []*PieDataSet

func (PieDataSets) Add Uses

func (l PieDataSets) Add(ds *PieDataSet) PieDataSets

type PieJsContent Uses

type PieJsContent struct {
    JsContent

    Data PieAttributes `json:"data"`
}

Package chartjs imports 13 packages (graph) and is imported by 35 packages. Updated 2020-08-05. Refresh now. Tools for package owners.