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

Struct BarChart

plotter/barchart.go:19–51  ·  view source on GitHub ↗

A BarChart presents grouped data with rectangular bars with lengths proportional to the data values.

Source from the content-addressed store, hash-verified

17// A BarChart presents grouped data with rectangular bars
18// with lengths proportional to the data values.
19type BarChart struct {
20 Values
21
22 // Width is the width of the bars.
23 Width vg.Length
24
25 // Color is the fill color of the bars.
26 Color color.Color
27
28 // LineStyle is the style of the outline of the bars.
29 draw.LineStyle
30
31 // Offset is added to the X location of each bar.
32 // When the Offset is zero, the bars are drawn
33 // centered at their X location.
34 Offset vg.Length
35
36 // XMin is the X location of the first bar. XMin
37 // can be changed to move groups of bars
38 // down the X axis in order to make grouped
39 // bar charts.
40 XMin float64
41
42 // Horizontal dictates whether the bars should be in the vertical
43 // (default) or horizontal direction. If Horizontal is true, all
44 // X locations and distances referred to here will actually be Y
45 // locations and distances.
46 Horizontal bool
47
48 // stackedOn is the bar chart upon which
49 // this bar chart is stacked.
50 stackedOn *BarChart
51}
52
53// NewBarChart returns a new bar chart with a single bar for each value.
54// The bars heights correspond to the values and their x locations correspond

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected