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

Method StockRange

plotter/sankey.go:75–81  ·  view source on GitHub ↗

StockRange returns the minimum and maximum value on the value axis for the stock with the specified label and category.

(label string, category int)

Source from the content-addressed store, hash-verified

73// StockRange returns the minimum and maximum value on the value axis
74// for the stock with the specified label and category.
75func (s *Sankey) StockRange(label string, category int) (min, max float64, err error) {
76 stk, ok := s.stocks[category][label]
77 if !ok {
78 return 0, 0, fmt.Errorf("plotter: sankey diagram does not contain stock with label=%s and category=%d", label, category)
79 }
80 return stk.min, stk.max, nil
81}
82
83// stock represents the amount of a stock and its plotting order.
84type stock struct {

Callers 1

ExampleSankey_groupedFunction · 0.95

Calls

no outgoing calls

Tested by 1

ExampleSankey_groupedFunction · 0.76