ChartIQ未显示在移动设备上

时间:2018-12-21 15:14:58

标签: javascript vue.js charts

ChartIQ图未显示在移动设备上。控制台中显示错误。

控制台错误:

Unhandled rejection TypeError: Cannot read property 'maxTicks' of undefined    
at CIQ.ChartEngine.N.(anonymous function).(anonymous function).(anonymous function) [as createDataSet](http://192.168.0.139:8080/static/chartiq/js/chartiq.js:40674:117802)    
at CIQ.ChartEngine.setPeriodicity (http://192.168.0.139:8080/static/chartiq/js/chartiq.js:29657:9)    
at VueComponent.showChart (http://192.168.0.139:8080/7.js:1869:17)    
at VueComponent.boundFn [as showChart ](http://192.168.0.139:8080/app.js:108489:12)

尝试了maxTicks参数,但是它没有用,一切都可以在桌面版本上使用。

 showChart: function () {
    var myQuoteFeed = {}
    var self = this
    myQuoteFeed.fetchInitialData = function (symbol, startDate, endDate, 
         params, cb) { 
      console.log('Asking for initial data...')
      specificMarket(self.currentMarket, self.period, self.limit).then(res => {
        cb({
          quotes: self.getModifyData(res)
        })
      })
    }

    var behavior = {
      refreshInterval: 5
    }
    this.stxx = new CIQ.ChartEngine({
      container: $$$('.chartContainer')
    })
    this.stxx.setPeriodicity({period: 1, timeUnit: 'minute', interval: 5})
    this.stxx.attachQuoteFeed(myQuoteFeed, behavior)
    this.stxx.layout.crosshair = true
    this.stxx.newChart('market')
   },

0 个答案:

没有答案