vicanso / go-charts

A charts library for Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

number/values at inside or top of my bar

dickyjoelsaputra opened this issue · comments

hello , i want to add number/values at inside or top of my bar , how to do that

Capture

@dickyjoelsaputra You can set the label options like this:

  • Top of bar
	charts.BarRender(
		values,
		....
		// custom option func
		func(opt *charts.ChartOption) {
			opt.SeriesList[0].Label.Show = true
		},
	)
  • Inside of bar
	charts.BarRender(
		values,
		....
		// custom option func
		func(opt *charts.ChartOption) {
			opt.SeriesList[0].Label.Show = true
			opt.SeriesList[0].Label.Position = charts.PositionBottom
		},
	)