We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line := charts.NewLine() line.SetXAxis(names).AddSeries(metric, items). SetGlobalOptions( charts.WithTooltipOpts(opts.Tooltip{ Show: true, Trigger: "axis", }), charts.WithColorsOpts(opts.Colors{"#0052d9"}), charts.WithLegendOpts(opts.Legend{Show: false}), charts.WithXAxisOpts(opts.XAxis{ Show: false, }), ). SetSeriesOptions( charts.WithMarkPointNameTypeItemOpts( opts.MarkPointNameTypeItem{Name: "Maximum", Type: "max"}, opts.MarkPointNameTypeItem{Name: "Average", Type: "average"}, opts.MarkPointNameTypeItem{Name: "Minimum", Type: "min"}, ), charts.WithAreaStyleOpts( opts.AreaStyle{ Opacity: 0.3, Color: "#0052d9", }, ), charts.WithMarkPointStyleOpts( opts.MarkPointStyle{Label: &opts.Label{Show: true}}), ) line.Validate() line.JSON()
需要把 type XAxis struct 里面的Show的json tag中的omitempty去掉 // Set this to false to prevent the axis from showing. Show bool json:"show,omitempty"
json:"show,omitempty"
charts.WithXAxisOpts(opts.XAxis{ Show: false, }),
line.Validate() line.JSON()
No response
v2.3.3
The text was updated successfully, but these errors were encountered:
Hi @lufeng4828, 确实有bool类型不一致导致序列化后出来的问题。 建议升级到v2.4.0-rc1 试试。
Sorry, something went wrong.
No branches or pull requests
Describe the issue
需要把 type XAxis struct 里面的Show的json tag中的omitempty去掉
// Set this to false to prevent the axis from showing.
Show bool
json:"show,omitempty"
How to reproduce this issue
charts.WithXAxisOpts(opts.XAxis{
Show: false,
}),
line.Validate()
line.JSON()
Other information
No response
go-echarts version
v2.3.3
The text was updated successfully, but these errors were encountered: