Configuration guide¶
Width behavior¶
width=Noneuses detected terminal width.Extremely small widths are clamped upward so charts remain legible.
Very large widths are capped to avoid runaway output.
Color behavior¶
Color is capability-aware by default:
ANSI color is emitted only when the terminal supports it.
NO_COLORdisables color even if the terminal is interactive.Non-interactive output defaults to plain text without escape sequences.
You can still force plain output with use_color=False.
Unicode behavior¶
Unicode box-drawing and block characters are enabled when the environment
appears UTF-8 capable. Set use_unicode=False to force ASCII-safe output.
Heatmap color schemes¶
textcharts.Heatmap supports two color schemes:
divergingfor values centered around a neutral midpointsequentialfor monotonic low-to-high intensity
Matrix validation¶
Matrix-based renderers fail fast on shape mismatches:
len(row_labels)must equallen(matrix)Every row in
matrixmust have the same length ascol_labels
This is deliberate. Silent truncation is convenient in an internal app, but it is a poor contract for a public library.