Reputation:
The current TradingView widget loaded very slowly in the website. Except that it has a lot of unnecessary functions for users, which I need to remove from the widget.
How can I remove this tools from tradingview widget? The code is below:
new TradingView.widget({
symbol: 'Bitfinex:ETHUSD',
interval: '5',
theme: 'Dark',
style: '1',
container_id: "tv_chart_container",
library_path: "/charting_library/",
locale: lang,
width: '100%',
height: '618px',
hide_top_toolbar: false,
left_toolbar: true,
hide_side_toolbar: false,
allow_symbol_change: false,
hideideas: false,
debug: false,
chartsStorageUrl: 'https://saveload.tradingview.com',
chartsStorageApiVersion: '1.1',
clientId: 'tradingview.com',
userId: 'public_user_id',
disabled_features: [
'use_localstorage_for_settings',
],
preset: 'mobile',
'studies': [
'Volume@tv-basicstudies'
]
})
Upvotes: 4
Views: 8750
Reputation: 1132
As per their documentation you can use the property enabled_features
.
The value of the property will be the array containing names of features that should be enabled by default.
So in this case the it will be
enabled_features: ["hide_left_toolbar_by_default"]
For more information you can refer hide_left_toolbar_by_default
(Reference) visibility control in Visibility of controls and visual elements
You can also disable this by using the property disabled_features
(Documentation) by
disabled_features: ["left_toolbar"]
Upvotes: 0
Reputation: 20882
As per the TradingView docs, you need to provide this value to the widgetOptions:
disabled_features: ['left_toolbar'],
Upvotes: 2
Reputation:
After a lot of researches and conversation with TradingView support team I has been notified that ITS NOT POSSIBLE yet :)
Upvotes: 0
Reputation: 2437
To hide certain drawing tools in the left toolbar you would include a drawings_access
object in your widget constructor.
https://github.com/tradingview/charting_library/wiki/Widget-Constructor#drawings_access
(link will only be available if you have access to the Trading View Charting Library repo)
Example of removing the Brush and Rectangle tools:
// inside widget constructor
drawings_access: {
type: "black",
tools: [
{
name: "Brush"
},
{
name: "Rectangle"
},
]
}
Upvotes: 1