Kumo Charts

Options

Option Description
datafeed The market data; required
symbol The symbol shown the first time it opens; required. After that, the symbol the user looked at last
timeframe The timeframe the first time it opens; 15m by default, or the first of the timeframes given when they do not include 15m
timeframes The timeframes offered; 1m 3m 5m 15m 30m 1h 2h 4h 6h 12h 1D 1W 1M by default (DEFAULT_TIMEFRAMES). The first time it opens, 5m 30m 4h 1D are shown in the top bar and the rest in the timeframe menu; those the datafeed cannot build are dropped
indicators The indicators the first time it opens; MA and VOL by default
theme light (the default) or dark, decided by the page
language zh (the default), en, ja or ko, decided by the page (LANGUAGES lists them with their names, and isLanguage(value) checks whether a value is one of them); dates and numbers are written as in zh-CN, en-US, ja-JP and ko-KR (LOCALES)
upColor red for red up and green down; green by default
accentColor The main color of buttons and of what is selected, as the brand's color
timeZone The time zone for showing times until the user picks one: as Asia/Shanghai, or exchange (each symbol in the time zone of its trading calendar); the browser's time zone by default. Once the user has picked one in the bottom right corner of the time scale, the user's choice (kept in the state)
brand { name, logo, href }: the name in the top left corner, the address of the logo image and the address a click goes to. With only name, only the name is shown; with neither name nor logo, the KumoChart mark is shown; without brand, nothing is shown in the top left corner
features Turns off the parts not needed; see the list below
lockedLinks Links fixed by the page, as { symbol: true } to have the charts of a layout always show the same symbol: a fixed link does not change with a saved state or setLinks(), and it is no longer in the layout menu; none is fixed by default
messages Replaces texts of the interface: { en: { indicators: 'Studies' } }
themes The colors of each theme: the design variables of the interface and the colors of the chart itself; see "Colors and fonts"
fontFamily The font of the interface and the scales, written as a CSS font-family
buttons The page's own buttons, in the top bar or the drawing toolbar; see "Your own buttons"
contextMenu The page's own context menu items; see "Context menu"
crosshairLines More lines of text below the crosshair's price label on the price scale, as the difference from the latest price: the argument is { chart, symbol, price } (the price of the pointer in the bar area), and it returns a list of texts; it is called whenever the pointer moves, so it has to be fast
watchlist The ids of the symbols in the page's watchlist: the symbol search lights up their stars, and a click on a star emits watchlistStar; see "Watchlist". null by default, without stars
drawingTools Which tools the drawing toolbar has, in what order; see "Drawing tools"
drawingStyles The page's styles for drawing tools, as which end the Fibonacci levels count from; the styles the user changed go on top of them; see "Drawing tools"
drawingBarItems What goes in the bar that floats up by a selected drawing, in what order: the built-in items, style toggles (as { field: 'extendRight' }) and the page's own buttons; see "Changing the two bars"
drawingToolbarControls Which of the buttons of the drawing toolbar other than tools (crosshair, magnet, keep drawing, favorites, hide, remove all) stay; see "Changing the two bars"
customDrawings The page's own drawing tools, in the drawing toolbar with the built-in ones; see "Custom drawing tools"
customIndicators The page's own indicators (with an algorithm of its own, or a formula), listed in the indicators window with the built-in ones; see "Custom indicators"
storage Where the user's layout, each chart, drawings and alerts are kept: in the browser's localStorage by default (under the key kumochart-pro-chart), under another key with browserStorage(key), or in a storage of your own (see "Saving the state"); null keeps nothing
licenseKey The commercial license key, covering the footprints, time price opportunity, order flow indicators, large trades, order book heatmap, information-driven bars and formula indicators of the chart; without a license key the chart shows an "unlicensed" watermark in its bottom left corner, and only development on your own computer needs none (see "License")
appId The id of a desktop or mobile app, as a reverse domain name, as com.acme.charts, given with licenseKey: pages without a domain name are licensed by it, websites only by their domain (see "License")

The toggles in features: topBar (the top bar, see below), symbolSearch (symbol search, on by default when the datafeed can search), compare (comparing symbols, which also needs a datafeed that can search), chartTypes (chart types), indicators (indicators), volumeProfile (volume profiles), drawings (drawings), replay (replay), alerts (alerts on prices, indicators and drawings), history (undo and redo of drawings), screenshot (screenshots: downloading or copying an image), dataExport (exporting the chart's data), multiChart (multi-chart layouts) and shortcuts (keyboard shortcuts, see "Keyboard shortcuts"); all are on by default except symbol search, comparing symbols and exporting the chart's data. The toggles are about the interface only (except alerts: off, the alerts there are neither drawn nor watched, see "Alerts"): with indicators off, say, the user sees no indicators button, but the page can still add indicators with addIndicator(); with compare off, the page can still compare symbols with addComparison().

Drawings have two more small toggles: drawingToolbar (the drawing toolbar on the left) and drawingBar (the bar that floats up by a selected drawing), both on by default; off, drawing works as before, and the page puts up its own with chart.drawingTools; see "A drawing toolbar of your own".

The top bar: with topBar off, the whole top bar (symbol, timeframe, chart type, indicators, layout, replay, the page's buttons) is not shown, the chart fills its container, and the page puts up its own bar, working the chart through methods: setSymbol(), setTimeframe(), setChartType(), setLayout(), openDialog('symbolSearch'), openDialog('indicators') and so on, reading the changes of the state from events (symbolChange, timeframeChange, layoutChange, …). Keyboard shortcuts, context menus and every window work as before.

When options are wrong (a misspelled option or toggle name in features, a text messages does not have, a button with neither text nor icon, a misspelled drawing tool, a color variable that does not exist, a timeframe not among the timeframes given, an indicator in indicators that does not exist), createProChart() throws an error right away, saying what is wrong and what can be written instead. A page without types that misspells a field does not quietly go without it.

Changing them after it shows: applyOptions

The theme, the language, colors, fonts, texts of the interface, feature toggles, your own buttons and menus, the watchlist, drawing tools, and what goes in the two drawing bars can all be changed after the chart shows:

chart.applyOptions({ theme: 'dark', upColor: 'red' });
chart.applyOptions({ features: { replay: false } }); // changes only the toggles given
chart.applyOptions({ accentColor: null }); // null goes back to the default

features, messages and themes are merged key by key onto what was there, and the others are replaced whole; null goes back to the default. timeZone is a default: it affects only users who have not picked a time zone of their own yet. Options read only once at creation, as datafeed, symbol and storage, cannot be changed, and passing them is an error. Switching the theme or the language is done with it too: applyOptions({ theme: 'dark' }), applyOptions({ language: 'en' }).

↑↓ to select · Enter to open · Esc to close