MCPcopy Index your code
hub / github.com/gonum/plot / BarHeight

Method BarHeight

plotter/barchart.go:75–87  ·  view source on GitHub ↗

BarHeight returns the maximum y value of the ith bar, taking into account any bars upon which it is stacked.

(i int)

Source from the content-addressed store, hash-verified

73// ith bar, taking into account any bars upon
74// which it is stacked.
75func (b *BarChart) BarHeight(i int) float64 {
76 ht := 0.0
77 if b == nil {
78 return 0
79 }
80 if i >= 0 && i < len(b.Values) {
81 ht += b.Values[i]
82 }
83 if b.stackedOn != nil {
84 ht += b.stackedOn.BarHeight(i)
85 }
86 return ht
87}
88
89// StackOn stacks a bar chart on top of another,
90// and sets the XMin and Offset to that of the

Callers 2

PlotMethod · 0.80
DataRangeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected