Open robbbsen opened 5 years ago
You have to set GridMajorStyle
and GridMinorStyle
ond the axis and set Show
, StrokeColor
and StrokeWidth
. As far as I know otherwise they default to false
, ColorTransparent
and 0.0
, which each of them makes them invisible.
graph = chart.Chart{
XAxis: chart.XAxis{
Style: chart.StyleShow(),
},
YAxis: chart.YAxis{
Style: chart.StyleShow(),
GridMajorStyle: chart.Style{
Show: true,
StrokeColor: drawing.ColorBlack,
StrokeWidth: 1.5,
},
GridMinorStyle: chart.Style{
Show: true,
StrokeColor: drawing.Color{R: 0, G: 0, B: 0, A: 100},
StrokeWidth: 1.0,
},
},
Series: []chart.Series{
chart.ContinuousSeries{
XValues: []float64{1, 2, 3, 4},
YValues: []float64{1, 2, 3, 1},
Style: chart.Style{StrokeWidth: 3, Show: true},
},
},
Width: 570,
Height: 300,
}
Unfortunately, not working for BarChart. Any ideas on this?
Unfortunately, not working for BarChart. Any ideas on this?
based on issue #139 I don't think it's implemented
Hi. Unfortunately the topic "grid lines" isn't documented at all. The only thing I could find was a test file inside the project. Out of that I've created a small test:
Unfortunately this isn't displaying any grind lines. Output:
Is this a missing feature, am I doing anything wrong or is it buggy? Thank you very much!