Documentation ¶
Index ¶
- Constants
- Variables
- func AddSeries(graph chart.Chart, series ...chart.Series) chart.Chart
- func CreateChart() chart.Chart
- func DefaultFont() *truetype.Font
- func GetDefaultFont() (*truetype.Font, error)
- func ImageContent(c chart.Chart) (string, error)
- func OpenImage(c chart.Chart) error
- func OpenURL(url string) error
- func Render(graph chart.Chart, code string)
- func SeriesIndex(s pandas.Series) []float64
Constants ¶
View Source
const (
DotWidth = 3 // 点的宽度
)
View Source
const (
// ResourcesPath 资源路径
ResourcesPath = "fonts"
)
Variables ¶
View Source
var ( ColorRed = drawing.Color{R: 0xFF, G: 0x00, B: 0x00, A: 0xFF} // 红色 ColorGreen = drawing.Color{R: 0x00, G: 0xFF, B: 0x00, A: 0xFF} // 绿色 ColorBlue = drawing.Color{R: 0x00, G: 0x00, B: 0xFF, A: 0xFF} // 蓝色 )
View Source
var (
DashedLine = []float64{5.0, 5.0} // 虚线
)
Functions ¶
func AddSeries ¶ added in v0.4.2
func AddSeries(graph chart.Chart, series ...chart.Series) chart.Chart
func CreateChart ¶ added in v0.4.2
func CreateChart() chart.Chart
func GetDefaultFont ¶
GetDefaultFont returns the default font (Roboto-Medium).
func ImageContent ¶ added in v0.4.0
func OpenImage ¶ added in v0.4.0
func OpenImage(c chart.Chart) error
OpenImage TODO: 打开chart有点问题, 原因可能是生成的URL过长
func SeriesIndex ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.