basics of stacked bar.

This commit is contained in:
Will Charczuk 2016-07-28 18:51:55 -07:00
parent 020ec8f4a4
commit a1fb284797
8 changed files with 272 additions and 25 deletions

View file

@ -159,16 +159,16 @@ var (
DashArrayDashesLarge = []int{10, 10}
)
// GetDefaultSeriesStrokeColor returns a color from the default list by index.
// GetDefaultColor returns a color from the default list by index.
// NOTE: the index will wrap around (using a modulo).
func GetDefaultSeriesStrokeColor(index int) drawing.Color {
func GetDefaultColor(index int) drawing.Color {
finalIndex := index % len(DefaultColors)
return DefaultColors[finalIndex]
}
// GetDefaultPieChartValueColor returns a color from the default list by index.
// GetAlternateColor returns a color from the default list by index.
// NOTE: the index will wrap around (using a modulo).
func GetDefaultPieChartValueColor(index int) drawing.Color {
func GetAlternateColor(index int) drawing.Color {
finalIndex := index % len(DefaultAlternateColors)
return DefaultAlternateColors[finalIndex]
}