หน้านี้ยังไม่ได้แปลเป็นภาษาไทย จึงแสดงเป็นภาษาอังกฤษ
Chart types
18 built-in chart types. Switch at runtime via chart.setChartType(type).
Standard
| Type | Description |
|---|---|
candlestick | Classic OHLC candles. |
bar | OHLC bars (Western style). |
line | Close-line chart. |
area | Filled area under the close line. |
baseline | Above / below a baseline price, two-color fill. |
stepLine | Staircase line — emphasizes discrete bar closes. |
lineWithMarkers | Line plus a dot at each data point. |
hollowCandle | Hollow body when close > previous close. |
hlcArea | High-low band with a close line. |
hiLo | A bar from each low to its high, coloured by direction; wide bars carry their high and low. |
Derived
| Type | Description |
|---|---|
heikinAshi | Smoothed candle series via Heikin-Ashi transform. |
renko | Fixed price-brick chart; time-independent. |
kagi | Yang/yin reversal lines; the reversal is a percent (4) or an amount of price. |
lineBreak | A new line once the close breaks the last lines (3 by default). |
pointAndFigure | X/O columns; box size + reversal count. |
rangeBars | Each bar's high-low equals a fixed range. |
Volume-weighted
| Type | Description |
|---|---|
volumeCandles | Candle width proportional to volume. |
equivolume | Full-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)