Using high cards in touch sench - Unable to display a blank chart

I am trying to transfer some graphic diagrams from php web application to Sencha Touche mobile application.

I want to put a blank diagram on the view page and populate it dynamically with some jsonp calls. Here is my view code (not all 130 lines ...):

{
xtype : 'panel',
scrollable: true,
html : 'INSERIRE QUI I GRAFICI E LE TABELLE',
items : [
    {
        xtype : 'panel',
        layout : 'fit',
        html : 'AREA PER GRAFICO',
        itemId : 'chartRenderPanel',
        margin: '180px'
    },
    {   //sample code, to be replaced with a consinstent config...
        xtype: 'highchart',
        chartConfig: {
           chart: {
                  type: 'spline'
           },
           title: {
                  text: 'A simple graph'
          },
          xAxis: {
                  plotLines: [{
                  color: '#FF0000',
                  width: 5,
                  value: 'mar'
                  }]
          }
          }
                  },
          {
           xtype : 'panel',
           layout : 'fit',
           html : 'AREA PER TABELLE',
           itemId : 'tableRenderPanel',
           margin: '180px'
        }
        ]
}

Highchart part taken from this violin http://jsfiddle.net/marcme/DmsGx/

it works on the violin, but not in my mobile application: debugging with chrome, I am stuck here in Highcharts.js:

update : function(delay) {
        var cdelay = delay || this.updateDelay;
        if(!this.updateTask) {
            this.updateTask = new Ext.util.DelayedTask(this.draw, this);
        }
        this.updateTask.delay(cdelay);
    },

With the message "Uncaught TypeError: undefined is not a function" in the console.

Please, help!:)

Lorenzo

0
source share
1

DelayedTask - sencha touch, Extjs.

this.updateTask = new Ext.util.DelayedTask(this.draw, this);

if (Ext.util.DelayedTask)
    this.updateTask = new Ext.util.DelayedTask(this.draw, this);
else
    this.updateTask = Ext.create('Ext.util.DelayedTask', this.draw, this);
0

Source: https://habr.com/ru/post/1539436/


All Articles