Open OscarYuen opened 4 years ago
seconded
Seems like forgotten pieces of code, which needs refactoring.
As I can see from the history that was a function defined in go-chart/style.go
[commit]
// StyleShow is a prebuilt style with the `Show` property set to true.
func StyleShow() Style {
return Style{
Show: true,
}
}
But later it's signature was changed to func Shown() Style
[commit]
func Shown() Style {
return Style{
Hidden: false,
}
}
So, @OscarYuen, correct usage in your example looks like below:
XAxis: chart.XAxis{
Name: "Week",
NameStyle: chart.Shown(),
Style: chart.Shown(),
Ticks: []chart.Tick{
{1.0, "1"},
{2.0, "2"},
{3.0, "3"},
{4.0, "4"},
{5.0, "5"},
{6.0, "6"},
{7.0, "7"},
},
},
chart.StyleShow() is undefined in latest package. What API I can call? thanks