Esta página ainda não foi traduzida, por isso aparece em inglês.

Chart types

18 built-in chart types. Switch at runtime via chart.setChartType(type).

Standard

TypeDescription
candlestickClassic OHLC candles.
barOHLC bars (Western style).
lineClose-line chart.
areaFilled area under the close line.
baselineAbove / below a baseline price, two-color fill.
stepLineStaircase line — emphasizes discrete bar closes.
lineWithMarkersLine plus a dot at each data point.
hollowCandleHollow body when close > previous close.
hlcAreaHigh-low band with a close line.
hiLoA bar from each low to its high, coloured by direction; wide bars carry their high and low.

Derived

TypeDescription
heikinAshiSmoothed candle series via Heikin-Ashi transform.
renkoFixed price-brick chart; time-independent.
kagiYang/yin reversal lines; the reversal is a percent (4) or an amount of price.
lineBreakA new line once the close breaks the last lines (3 by default).
pointAndFigureX/O columns; box size + reversal count.
rangeBarsEach bar's high-low equals a fixed range.

Volume-weighted

TypeDescription
volumeCandlesCandle width proportional to volume.
equivolumeFull-range boxes with width proportional to volume share; color tracks close vs prior close (Richard Arms style).

Switching at runtime

chart.setChartType('equivolume')

Transforms (Heikin-Ashi, Renko, Kagi, Line Break, P&F, Range Bars) are handled internally — chart.getData() still returns the raw input series.

Settings of the built bar types

Renko's box, the lines a Line Break has to break, Kagi's reversal, Point & Figure's box and reversal, and the range of range bars. What isn't set is worked out from the data (an ATR box for Renko, 1% of the average close for a P&F box…). The settings are kept in a saved state; in ChartWidget they are in the settings dialog for the chart's type.

chart.setChartTypeOptions({
  renko: { boxSize: 50 },                         // or 'atr' with atrPeriod
  lineBreak: { lines: 2 },
  kagi: { reversal: 25, reversalType: 'price' },  // or a percent
  pointAndFigure: { boxSize: 10, reversal: 3 },
  rangeBars: { range: 20 },
})
chart.getChartTypeOptions()
new Chart(host, { chartTypeOptions: { renko: { boxSize: 50 } } })

The main series, and lines on the price pane

Hide the main series to look at the indicators or compared symbols alone; mark the highest high and lowest low on screen; mark the bid and ask. A feed whose ticks carry bid and ask keeps those up to date by itself.

chart.setMainSeriesVisible(false)
chart.setHighLowLines(true)          // or new Chart(host, { highLowLines: true })
chart.setBidAsk({ bid: 64210.5, ask: 64211 })
chart.setBidAsk(null)