forked from GoAdminGroup/go-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linechart.go
38 lines (31 loc) · 784 Bytes
/
linechart.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package components
import (
"github.com/chenhg5/go-admin/template/types"
"html/template"
)
type LineChartAttribute struct {
Name string
Title string
Data string
ID string
Height int
}
func (compo *LineChartAttribute) SetID(value string) types.LineChartAttribute {
compo.ID = value
return compo
}
func (compo *LineChartAttribute) SetTitle(value string) types.LineChartAttribute {
compo.Title = value
return compo
}
func (compo *LineChartAttribute) SetHeight(value int) types.LineChartAttribute {
compo.Height = value
return compo
}
func (compo *LineChartAttribute) SetData(value string) types.LineChartAttribute {
compo.Data = value
return compo
}
func (compo *LineChartAttribute) GetContent() template.HTML {
return ComposeHtml(*compo, "line-chart")
}