terminal_graph

Search:
Group by:

TerminalGraph with one convenient import.

This faรงade re-exports bar, candle, connected line, scatter/XY, multiplot, 2D surface, static, live, sparkline, and terminal-styling APIs. Importing it has no side effects; terminal state changes happen only through explicitly called helpers. Compiling this file directly runs a small graph demonstration because that code is guarded by when isMainModule.

import terminal_graph

echo plot([3, 4, 9, 6, 2, 4, 5, 8])
echo sparkline([1.0, 4.0, 2.0, 8.0])

var graph = initStaticGraph("Request latency", unit = "ms")
let latency = graph.addSeries("p95")
graph.push(latency, [18.0, 20.5, 19.0, 23.0])
echo graph.render(width = 60, height = 14, useColor = false)

let terrain = @[@[0.0, 0.5], @[0.75, 1.0]]
echo plotSurface(terrain)

Exports

clearLines, graphAxisColor, graphColorBelow, BarGraphOptions, plot, graphXAxisTickCount, graphCaptionColor, plotBars, BarMode, DefaultLineCharSet, initAsciiGraphConfig, graphXAxisRange, plotBars, graphSeriesLegends, AsciiGraphConfig, graphColorGradient, clearBarRange, graphYAxisFormatter, initBarGraphOptions, clearTerminal, axisOffset, replaceLinesSequence, setBarRange, DefaultBarColors, synchronizedOutputSequence, plotMany, AxisValueFormatter, upperBound, HeatmapSpectrum, plotBars, labelPrecision, graphLabelColor, graphSeriesChars, plot, graphWidth, lowerBound, graphSeriesColors, plotMany, LineCharSet, graphCaption, graphHeight, LineGraphOption, graphColorAbove, clearLinesSequence, plotBars, graphLineEnding, graphXAxisFormatter, createLineCharSet, clearLines, graphAxisColor, graphColorBelow, plot, graphXAxisTickCount, graphCaptionColor, clearCandleRange, DefaultLineCharSet, initAsciiGraphConfig, graphXAxisRange, graphSeriesLegends, AsciiGraphConfig, graphColorGradient, graphYAxisFormatter, Candle, clearTerminal, axisOffset, replaceLinesSequence, synchronizedOutputSequence, plotMany, plotCandles, AxisValueFormatter, initCandlePlotOptions, upperBound, HeatmapSpectrum, plotCandles, labelPrecision, setCandleRange, graphLabelColor, graphSeriesChars, plot, graphWidth, lowerBound, graphSeriesColors, plotMany, LineCharSet, graphCaption, graphHeight, LineGraphOption, candle, CandlePlotOptions, graphColorAbove, plotCandles, clearLinesSequence, graphLineEnding, graphXAxisFormatter, createLineCharSet, plotCandles, replaceLinesSequence, graphLabelColor, graphAxisColor, clearLines, graphColorBelow, plot, graphXAxisTickCount, graphCaptionColor, DefaultLineCharSet, initAsciiGraphConfig, graphXAxisRange, plot, clearTerminal, AxisValueFormatter, graphSeriesLegends, AsciiGraphConfig, graphColorGradient, plotMany, synchronizedOutputSequence, axisOffset, upperBound, HeatmapSpectrum, labelPrecision, graphSeriesChars, graphWidth, lowerBound, graphSeriesColors, plotMany, LineCharSet, graphCaption, graphYAxisFormatter, graphHeight, LineGraphOption, graphColorAbove, clearLinesSequence, graphLineEnding, graphXAxisFormatter, createLineCharSet, replaceLinesSequence, seriesCount, clearCandleRange, graphAxisColor, sampleCount, plot, graphCaptionColor, draw, clear, renderFrame, Series, initStaticGraph, graphXAxisRange, push, SeriesStats, push, graphSeriesLegends, AxisValueFormatter, isActive, draw, MinimumRenderWidth, graphColorGradient, push, LiveCandleGraph, sampleCount, push, isActive, Candle, graphColorBelow, draw, clearTerminal, synchronizedOutputSequence, statistics, draw, samples, plotCandles, plotCandles, initCandlePlotOptions, upperBound, initLiveGraph, clear, setCandleRange, graphSeriesChars, plotCandles, StaticGraph, addSeries, graphWidth, lowerBound, clear, push, maxSamples, clearRange, plotMany, LineCharSet, graphCaption, clearRange, updateLatest, renderFrame, LiveDashboard, setMaxSamples, push, graphLineEnding, stopLive, push, createLineCharSet, plotCandles, addSeries, stopLive, stopLive, clearLines, graphXAxisTickCount, setRange, LineGraphOption, updateLatest, DefaultLineCharSet, latest, initAsciiGraphConfig, LiveLineGraph, DefaultMaxSamples, renderFrame, push, isActive, AsciiGraphConfig, clear, valueRange, initLiveLineGraph, clear, graphYAxisFormatter, push, plotMany, stopLive, initPlotter, initLiveDashboard, clearRange, axisOffset, latestCandle, render, startLive, HeatmapSpectrum, clearLinesSequence, labelPrecision, graphLabelColor, plot, startLive, MinimumRenderHeight, PlotStyle, Plotter, LiveGraph, graphSeriesColors, graphHeight, initLiveCandleGraph, isActive, push, candle, CandlePlotOptions, graphColorAbove, setRange, graphXAxisFormatter, startLive, setRange, candleCount, startLive, fixedColumns, MultiplotColumnKind, multiplot, multiplotBreakpoint, autoColumns, MultiplotVerticalAlignment, MultiplotBreakpoint, multiplotResponsive, initMultiplotOptions, multiplot, MultiplotOptions, MultiplotRenderer, MultiplotHorizontalAlignment, MultiplotColumns, sparkline, clearLines, sparkline, graphAxisColor, graphColorBelow, plot, graphXAxisTickCount, graphCaptionColor, DefaultLineCharSet, SparklineTicks, initAsciiGraphConfig, graphXAxisRange, clearSparklineMaximum, graphSeriesLegends, AsciiGraphConfig, initSparklineOptions, graphColorGradient, graphYAxisFormatter, setSparklineMaximum, setSparklineRange, setSparklineMinimum, clearTerminal, axisOffset, replaceLinesSequence, synchronizedOutputSequence, plotMany, AxisValueFormatter, upperBound, HeatmapSpectrum, labelPrecision, SparklineConstantMode, graphLabelColor, graphSeriesChars, plot, SparklineOptions, graphWidth, lowerBound, graphSeriesColors, plotMany, LineCharSet, graphCaption, graphHeight, LineGraphOption, graphColorAbove, clearSparklineRange, clearLinesSequence, graphLineEnding, graphXAxisFormatter, createLineCharSet, FireSparklinePalette, clearSparklineMinimum, render, PlotStyle, clear, Plotter, clearRange, initPlotter, MinimumRenderWidth, Series, MinimumRenderHeight, clear, maxSamples, push, addSeries, initStaticGraph, latest, sampleCount, valueRange, DefaultMaxSamples, setRange, setMaxSamples, SeriesStats, seriesCount, push, statistics, StaticGraph, samples, clearLines, graphAxisColor, graphColorBelow, plot, graphXAxisTickCount, graphCaptionColor, SurfacePlotOptions, DefaultLineCharSet, SurfaceGlyphs, initAsciiGraphConfig, graphXAxisRange, plotContour, graphSeriesLegends, AsciiGraphConfig, graphColorGradient, graphYAxisFormatter, clearTerminal, axisOffset, replaceLinesSequence, initSurfacePlotOptions, plotSurface, synchronizedOutputSequence, plotMany, AxisValueFormatter, plotSurface, upperBound, HeatmapSpectrum, plotContour, setSurfaceRange, labelPrecision, graphLabelColor, graphSeriesChars, plot, graphWidth, lowerBound, graphSeriesColors, plotMany, LineCharSet, graphCaption, graphHeight, LineGraphOption, graphColorAbove, plotContour, clearLinesSequence, plotContour, graphLineEnding, clearSurfaceRange, graphXAxisFormatter, plot2D, createLineCharSet, plotSurface, plotSurface, clearLines, XYSeries, graphAxisColor, xyPoint, graphColorBelow, plot, graphXAxisTickCount, graphCaptionColor, plotScatterMany, plotXY, plotScatter, clearXRange, DefaultLineCharSet, plotXY, initAsciiGraphConfig, graphXAxisRange, graphSeriesLegends, AsciiGraphConfig, graphColorGradient, plotXY, DefaultXYColors, XYPoint, graphYAxisFormatter, clearTerminal, axisOffset, replaceLinesSequence, plotScatter, initXYSeries, synchronizedOutputSequence, plotMany, AxisValueFormatter, plotXYMany, upperBound, plotScatterMany, HeatmapSpectrum, labelPrecision, graphLabelColor, graphSeriesChars, plot, plotXY, setYRange, graphWidth, lowerBound, plotScatter, clearYRange, graphSeriesColors, plotMany, LineCharSet, plotXYMany, graphCaption, graphHeight, LineGraphOption, xyPoints, plotScatter, graphColorAbove, setXRange, clearLinesSequence, XYPlotOptions, graphLineEnding, graphXAxisFormatter, createLineCharSet, initXYPlotOptions