feat: add axis draw function

This commit is contained in:
vicanso 2022-01-22 18:57:57 +08:00
parent c5d95eae0a
commit 4ac419fce9
3 changed files with 611 additions and 10 deletions

10
axis.go
View file

@ -52,16 +52,6 @@ type YAxisOption struct {
const axisStrokeWidth = 1
func maxInt(values ...int) int {
result := 0
for _, v := range values {
if v > result {
result = v
}
}
return result
}
// GetXAxisAndValues returns x axis by theme, and the values of axis.
func GetXAxisAndValues(xAxis XAxis, tickPosition chart.TickPosition, theme string) (chart.XAxis, []float64) {
data := xAxis.Data