MCPcopy
hub / github.com/guptarohit/asciigraph / SeriesColorGradient

Function SeriesColorGradient

options.go:192–197  ·  view source on GitHub ↗

SeriesColorGradient colors each plotted point by its value along the given stops (lowest value uses the first stop, highest the last), producing a heatmap-style gradient instead of a single solid color. It applies to all series and takes precedence over SeriesColors for the plotted points; legend bo

(stops ...AnsiColor)

Source from the content-addressed store, hash-verified

190// boxes are left uncolored while a gradient is active. Passing no stops disables
191// it. Use the built-in HeatmapSpectrum for a ready-made cool-to-warm palette.
192func SeriesColorGradient(stops ...AnsiColor) Option {
193 gradient := append([]AnsiColor(nil), stops...)
194 return optionFunc(func(c *config) {
195 c.Gradient = gradient
196 })
197}
198
199// ColorAbove colors points whose value is strictly above threshold (value >
200// threshold) with the given color, across all series. It takes precedence over

Callers 5

mainFunction · 0.92
mainFunction · 0.92
TestSeriesColorGradientFunction · 0.85

Calls 1

optionFuncFuncType · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…