Customization-Use-Cases

Charting Library allows you to customize its appearance, the way it displays data, default properties and lots of other things.

Customizations are client-side and server-side. Some of them are made through the constructor, other ones can be made using widget/chart methods.

Here is the single place where you can find most used customizations and links to their descriptions.

Default instrument and resolution

Change default symbol (instrument) and resolution (interval).

Minimum supported resolution is 1 second.

[[documentation|Widget-Constructor#symbol-interval-mandatory]]

Default visible range (time frame)

Change time range of bars for the default resolution

[[documentation|Widget-Constructor#timeframe]]

Default visible range for resolutions

Change time range of bars when the resolution is changed by a user. Look at the sample here:

[[documentation|Chart-Methods#onintervalchanged]]

Initial timezone

You can set what time zone is used by default. It can be changed by the user in the menu.

[[documentation|Widget-Constructor#timezone-]]

Size of the chart

You can place the chart as en element on your web page or use fullscreen mode.

[[Width and Height|Widget-Constructor#width-height]]

[[Fullscreen|Widget-Constructor#fullscreen-]]

[[Autosize|Widget-Constructor#autosize-]]

Chart colors

Customize colors of the chart so it perfectly fits in your site.

  1. Color of toolbars - [[documentation|Widget-Constructor#toolbar_bg]]
  2. Color of the chart - [[documentation|Widget-Constructor#overrides]]

Indicators

  1. Limit amount of indicators for 1 chart layout - [[documentation|Widget-Constructor#study_count_limit]]
  2. Limit what indicators are displayed and can be added - [[documentation|Widget-Constructor#studies_access]]
  3. Add your own indicators calculated on a server - [[documentation|Creating-Custom-Studies]]
  4. Change default properties of indicators - [[documentation|Widget-Constructor#studies_overrides]]
  5. Change default properties on the fly - [[documentation|Widget-Methods#applystudiesoverridesoverrides]]

Drawings

  1. Limit what drawings are displayed and can be added - [[documentation|Widget-Constructor#drawings_access]]
  2. Change default properties of drawings - [[documentation|Widget-Constructor#overrides]]
  3. Change default properties on the fly - [[documentation|Widget-Methods#applyoverridesoverrides]]

Language

Choose one of more than 20 translations of the library

[[documentation|Widget-Constructor#locale]]

Note: Language is set when the chart is created. It cannot be changed without recreating of a chart.

Formatting of numbers and dates

  1. Change decimal sign of numbers - [[documentation|Widget-Constructor#numeric_formatting]]
  2. Set custom formatters for data and time - [[documentation|Widget-Constructor#customformatters]]
  3. Prices are formatted according to the symbol information - [[documentation|Symbology#pricescale-minmov]]

Default properties of a chart

You can change any properties that present in the properties dialog.

  1. Initially - [[documentation|Widget-Constructor#overrides]]
  2. On the fly - [[documentation|Widget-Methods#applyoverridesoverrides]]

Server for snapshots

TradingView allows you to save snapshot on its servers, but if you wish you can change it.

[[documentation|Widget-Constructor#snapshot_url]]

Show/hide elements of the chart

If you don't need some elements of the chart (toolbars, buttons, other controls), you can hide them:

  1. Most of the chart elements can be shown/hidden by using [[Featuresets]]
  2. You can add your own CSS - [[documentation|Widget-Constructor#custom_css_url-since-14]]

Time frames at the bottom of the chart

Time frame is a time period of bars and a resolution preferred for displaying of the period. You can customize the list.

[[documentation|Widget-Constructor#time_frames]]

Initial list of favorite intervals / chart styles

You can select what intervals and chart styles should be shown on the top toolbar by default. A user can change it if items_favoriting is enabled in the [[Featuresets]].

[[documentation|Widget-Constructor#favorites]]

Resolutions displayed in the menu

  1. Full list of resolution is provided in the configuration of the datafeed - [[documentation|JS-Api#supported_resolutions]]
  2. Resolutions are enabled or disabled in the list basing on the symbol information - [[documentation|Symbology#supported_resolutions]]
  3. Initial list of favorite resolutions can be set - [[documentation|Widget-Constructor#favorites]]

Volume indicator

In spite of other indicators Volume is added by default if the instrument supports it ([[documentation|Symbology#has_no_volume-]]).
You can disable this behaviour using [[documentation|Featuresets]].

Context menu

You can add new elements to the context menu or hide existing items.

[[documentation|Widget-Methods#oncontextmenucallback]]

Custom buttons on the toolbar

You can add your own buttons to the top toolbar of the chart.

[[documentation|Widget-Methods#createbuttonoptions]]

:chart: Watch list

It is possible to choose default symbols for the watch list and set read-only state if needed.

[[documentation|Widget-Constructor#chart-widgetbar]]

:chart: News feed

You can attach to any RSS feed and even select the feed depending on the instrument type.

[[documentation|Widget-Constructor#chart-rss_news_feed]]

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市虽界,隨后出現(xiàn)的幾起案子似芝,更是在濱河造成了極大的恐慌蛹磺,老刑警劉巖锹安,帶你破解...
    沈念sama閱讀 217,734評論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異并闲,居然都是意外死亡细睡,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,931評論 3 394
  • 文/潘曉璐 我一進店門帝火,熙熙樓的掌柜王于貴愁眉苦臉地迎上來溜徙,“玉大人,你說我怎么就攤上這事犀填〈酪迹” “怎么了?”我有些...
    開封第一講書人閱讀 164,133評論 0 354
  • 文/不壞的土叔 我叫張陵九巡,是天一觀的道長图贸。 經(jīng)常有香客問我,道長冕广,這世上最難降的妖魔是什么疏日? 我笑而不...
    開封第一講書人閱讀 58,532評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮撒汉,結(jié)果婚禮上沟优,老公的妹妹穿的比我還像新娘。我一直安慰自己睬辐,他們只是感情好挠阁,可當我...
    茶點故事閱讀 67,585評論 6 392
  • 文/花漫 我一把揭開白布宾肺。 她就那樣靜靜地躺著,像睡著了一般鹃唯。 火紅的嫁衣襯著肌膚如雪爱榕。 梳的紋絲不亂的頭發(fā)上瓣喊,一...
    開封第一講書人閱讀 51,462評論 1 302
  • 那天坡慌,我揣著相機與錄音,去河邊找鬼藻三。 笑死洪橘,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的棵帽。 我是一名探鬼主播熄求,決...
    沈念sama閱讀 40,262評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼逗概!你這毒婦竟也來了弟晚?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,153評論 0 276
  • 序言:老撾萬榮一對情侶失蹤逾苫,失蹤者是張志新(化名)和其女友劉穎卿城,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體铅搓,經(jīng)...
    沈念sama閱讀 45,587評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡瑟押,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,792評論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了星掰。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片多望。...
    茶點故事閱讀 39,919評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖氢烘,靈堂內(nèi)的尸體忽然破棺而出怀偷,到底是詐尸還是另有隱情,我是刑警寧澤播玖,帶...
    沈念sama閱讀 35,635評論 5 345
  • 正文 年R本政府宣布椎工,位于F島的核電站,受9級特大地震影響黎棠,放射性物質(zhì)發(fā)生泄漏晋渺。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,237評論 3 329
  • 文/蒙蒙 一脓斩、第九天 我趴在偏房一處隱蔽的房頂上張望木西。 院中可真熱鬧,春花似錦随静、人聲如沸八千。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,855評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽恋捆。三九已至照皆,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間沸停,已是汗流浹背膜毁。 一陣腳步聲響...
    開封第一講書人閱讀 32,983評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留愤钾,地道東北人瘟滨。 一個月前我還...
    沈念sama閱讀 48,048評論 3 370
  • 正文 我出身青樓,卻偏偏與公主長得像能颁,于是被迫代替她去往敵國和親杂瘸。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 44,864評論 2 354

推薦閱讀更多精彩內(nèi)容