tests for some things that came up as regressions when building out examples.
This commit is contained in:
parent
230dd16308
commit
6d48c49c07
3 changed files with 104 additions and 3 deletions
12
chart.go
12
chart.go
|
|
@ -373,12 +373,20 @@ func (c Chart) getAnnotationAdjustedCanvasBox(r Renderer, canvasBox Box, xr, yr,
|
|||
return canvasBox.OuterConstrain(c.Box(), annotationSeriesBox)
|
||||
}
|
||||
|
||||
func (c Chart) getBackgroundStyle() Style {
|
||||
return c.Background.WithDefaultsFrom(c.styleDefaultsBackground())
|
||||
}
|
||||
|
||||
func (c Chart) drawBackground(r Renderer) {
|
||||
DrawBox(r, c.Box(), c.Background.WithDefaultsFrom(c.styleDefaultsBackground()))
|
||||
DrawBox(r, c.Box(), c.getBackgroundStyle())
|
||||
}
|
||||
|
||||
func (c Chart) getCanvasStyle() Style {
|
||||
return c.Canvas.WithDefaultsFrom(c.styleDefaultsCanvas())
|
||||
}
|
||||
|
||||
func (c Chart) drawCanvas(r Renderer, canvasBox Box) {
|
||||
DrawBox(r, canvasBox, c.Canvas.WithDefaultsFrom(c.styleDefaultsCanvas()))
|
||||
DrawBox(r, canvasBox, c.getCanvasStyle())
|
||||
}
|
||||
|
||||
func (c Chart) drawAxes(r Renderer, canvasBox Box, xrange, yrange, yrangeAlt Range, xticks, yticks, yticksAlt []Tick) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue