Setting a style
Pass astyle string in the options object at the top-level declaration:
All 12 styles
line (default)
Continuous line connecting each bar’s value.
stepline
Horizontal segment to next bar, then vertical jump. Classic staircase.
stepline_diamond
Step line with diamond markers at each vertex.
histogram
Vertical bars from 0 to the value. Positive values grow up, negative values grow down.
columns
Alias for histogram. Identical rendering.
area
Filled area between the line and 0 (clamped at zero).
areabr
Area on baseline - not clamped to 0; fills between the value and the chart baseline.
linebr
Line on baseline. Similar to areabr but no fill.
circles
Discrete dots at each bar’s value. No connecting line.
cross
Cross marker (+) at each bar’s value. No connecting line.
arrowup
Arrow pointing up when value > 0, down when value < 0. Good for signal markers.
arrowdown
Arrow pointing down when value > 0, up when value < 0.
Arrow-specific options
| Option | Type | Description |
|---|---|---|
colorUp | string | Color when value > 0 |
colorDown | string | Color when value <= 0 |
size | number | Arrow size in pixels |
Histogram with per-bar color
For histograms where you want different colors for positive/negative values:Related pages
Plot basics
Signature, registration, and emission pattern.
MACD histogram example
Complete MACD with histogram + line plots.
color.*
Color format reference.