Documentation ¶
Overview ¶
Package graph allows rendering an isometric projection of a GitHub user's contribution history.
Index ¶
Constants ¶
View Source
const ( Color0 = "#ebedf0" Color1 = "#9be9a8" Color2 = "#40c463" Color3 = "#30a14e" Color4 = "#216e39" ColorDark0 = "#2d333b" ColorDark1 = "#0e4429" ColorDark2 = "#006d32" ColorDark3 = "#26a641" ColorDark4 = "#39d353" HalloweenColor0 = "#ebedf0" HalloweenColor1 = "#ffee4a" HalloweenColor2 = "#ffc501" HalloweenColor3 = "#fe9600" HalloweenColor4 = "#03001c" HalloweenDarkColor0 = "#161b22" HalloweenDarkColor1 = "#631c03" HalloweenDarkColor2 = "#bd561d" HalloweenDarkColor3 = "#fa7a18" HalloweenDarkColor4 = "#fddf68" )
Variables ¶
View Source
var DarkTheme = func(color string) string { switch color { case Color0: return ColorDark0 case Color1: return ColorDark1 case Color2: return ColorDark2 case Color3: return ColorDark3 case Color4: return ColorDark4 default: return "#2d333b" } }
View Source
var HalloweenDarkTheme = func(color string) string { switch color { case Color0: return HalloweenDarkColor0 case Color1: return HalloweenDarkColor1 case Color2: return HalloweenDarkColor2 case Color3: return HalloweenDarkColor3 case Color4: return HalloweenDarkColor4 } return "#2d333b" }
View Source
var HalloweenLightTheme = func(color string) string { switch color { case Color0: return HalloweenColor0 case Color1: return HalloweenColor1 case Color2: return HalloweenColor2 case Color3: return HalloweenColor3 case Color4: return HalloweenColor4 } return "#ebedf0" }
Functions ¶
This section is empty.
Types ¶
type ContributionDay ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph is a graph instance that is used to render a contributions graph.
func New ¶
func New(contribs []ContributionDay) *Graph
New creates a graph instance with the contributions-per-day that are passed. Graph.Render can then be used to render the graph.
Click to show internal directories.
Click to hide internal directories.