交易视图库交易量图未显示

时间:2018-10-10 06:26:58

标签: javascript jquery ruby-on-rails tradingview-api

我正在Ruby on Rails应用程序中使用TradingView。

并按照Wiki中的说明实施它,但底部体积图未显示

主图表上方显示并正常工作,而体积图下方显示其显示消息正在加载体积(20)... ,与所附图表图像屏幕截图相同。

chart_screenshot enter image description here

请提供任何解决此问题的建议,并正确显示打击量图表。

我正在使用以下代码:

function tvinit() {
TradingView.onready(function(){
  var lang = "<%= params[:lang]=="zh-CN" ? "zh" : params[:lang] %>";
  window.tvWidget = new TradingView.widget({
    fullscreen: true,
    symbol: gon.market.id,
    toolbar_bg: '#21313C',
    allow_symbol_change: true,
    container_id: "candlestick",
    datafeed: window.tvchartui,
    library_path: "/trading-ui-assets/charting_library/",
    locale:  lang || "en",
    drawings_access: { type: 'black', tools: [ { name: "Trend Line" } ] },
    disabled_features: ["header_widget", "left_toolbar", "use_localstorage_for_settings", "volume_force_overlay", "use_localstorage_for_settings", "header_symbol_search", "symbol_search_hot_key", "use_localstorage_for_settings"],
    enabled_features: ["move_logo_to_main_pane"],
    studies_overrides: {
        "bollinger bands.median.color": "#ccc",
        "bollinger bands.upper.linewidth": 7
    },
    debug: true,
    charts_storage_url: 'https://saveload.tradingview.com',
    charts_storage_api_version: '1.1',
    client_id: 'tradingview.com',
    user_id: 'public_user_id',
    favorites: {
        intervals: ["1D", "3D", "3W", "1W", "1M"],
        chartTypes: ["Candles"]
    },
    studies_overrides: {
      "volume.volume.color.0": "#000",
      "volume.volume.color.1": "#fff"
    },
    overrides: {
      "mainSeriesProperties.style": 1,
      "paneProperties.background": "#21313C",
      "paneProperties.vertGridProperties.color": "#454545",
      "paneProperties.horzGridProperties.color": "#454545",
      "symbolWatermarkProperties.transparency": 90,
      "scalesProperties.textColor": "#AAA",
      "paneProperties.leftAxisProperties.autoScaleDisabled":true,
      "mainSeriesProperties.priceAxisProperties.autoScaleDisabled":true,
      "paneProperties.leftAxisProperties.log": true,
      "paneProperties.leftAxisProperties.logDisabled" :true,
      "mainSeriesProperties.priceAxisProperties.log": true,
      "mainSeriesProperties.priceAxisProperties.logDisabled":true,
      "symbolWatermarkProperties.color": "#ccc",
      "volumePaneSize": "tiny",
    }
  });
});

}

0 个答案:

没有答案