Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Charts Sencha图表:未捕获类型错误:对象[Object Object]没有方法';getDirection';_Charts_Sencha Touch 2_Axis_Series_Sencha Charts - Fatal编程技术网

Charts Sencha图表:未捕获类型错误:对象[Object Object]没有方法';getDirection';

Charts Sencha图表:未捕获类型错误:对象[Object Object]没有方法';getDirection';,charts,sencha-touch-2,axis,series,sencha-charts,Charts,Sencha Touch 2,Axis,Series,Sencha Charts,早上好 我正在使用Sencha Touch 2.3、Sencha Cmd 4.0.2.67 不幸的是,我对Sencha了解不够,无法解释和诊断我的问题,因此请原谅任何遗漏 当我尝试运行我的应用程序时,它会在绘制任何图表之前创建多个仪表和条形图,应用程序崩溃,console.log会给出以下错误消息: 未捕获类型错误:对象[Object Object]没有方法“getDirection” 它说错误出现在chart.series.series.js的第683行,看起来是这样的(这是它如何从盒子里出来

早上好

我正在使用Sencha Touch 2.3、Sencha Cmd 4.0.2.67

不幸的是,我对Sencha了解不够,无法解释和诊断我的问题,因此请原谅任何遗漏

当我尝试运行我的应用程序时,它会在绘制任何图表之前创建多个仪表和条形图,应用程序崩溃,console.log会给出以下错误消息:

未捕获类型错误:对象[Object Object]没有方法“getDirection”

它说错误出现在chart.series.series.js的第683行,看起来是这样的(这是它如何从盒子里出来的):

for(i=0,ln=axes.length;i10)?数据库[tt]。条目[tt2]。中心值*2:10;
//确保仪表最大值不小于当前值
如果(仪表最大值<当前值){
gaugemax=currentValue+(currentValue*.1);//使用currentValue的110%
}  
//只显示整数
gaugemax=数学四舍五入(gaugemax/10)*10;
//设置仪表颜色
gaugeColor=设置GaugeColour(站点名称);
///新仪表
var chartgx={
cls:“thegauge”,
itemId:'仪表'+tt2,
xtype:'图表',
影子:没错,
商店:gaugeStore,
宽度:“自动”,
动画:对,
插入:50,
轴:[{
类型:“仪表”,
位置:'仪表',
最低:0,
最大值:gaugemax,
步骤:10,
差额:10
}],  
系列:[{
类型:“仪表”,
最低:0,
最大值:gaugemax,
步骤:10,
差额:10,
angleField:“CurrentValue”,
油炸圈饼:30,
颜色集:[标准颜色,#e1e1']
}]  
}; 
`

有人能告诉我如何纠正吗。

从仪表上拆下轴似乎解决了这个问题,但现在我看到另一个问题:-(

var gaugeTitle = thetabs[tt].Entries[tt2].Title;
var currentValue = (thetabs[tt].Entries[tt2].CurrentValue > 0)?thetabs[tt].Entries[tt2].CurrentValue:0;  
var baseValue = thetabs[tt].Entries[tt2].BaseValue;  
var centreValue = thetabs[tt].Entries[tt2].CentreValue;  
var generated = thetabs[tt].Entries[tt2].Generated;  
var gaugeData = thetabs[tt].Entries[tt2];// this data populates the gauge store  

// now we create a store for the gauge  
var gaugeStore = Ext.create('Ext.data.Store', {  
storeId: 'gaugeStore',  
fields: [{'name':'BaseValue','type':'int'},  
{'name':'CentreValue','type':'int'},  
{'name':'CurrentValue','type':'int'},  
{'name':'Generated'},  
{'name':'Title'},  
{'name':'Type'}],  
data: gaugeData  
});  

gaugeStore.setData(gaugeData);  // Use the add function to add records or model instances.

// set the maximum value on the gauge, then round it to whole number    
var gaugemax = (thetabs[tt].Entries[tt2].CentreValue>10)?  thetabs[tt].Entries[tt2].CentreValue*2:10;  

// ensure gauge max is never less than currentValue  
if(gaugemax < currentValue){  
gaugemax =  currentValue+(currentValue*.1); // use 110% of currentValue   
}  
// show whole numbers only  
gaugemax = Math.round(gaugemax/10)*10;   

//set gauge colour  
gaugeColor = setGaugeColour(siteName);  

/// new gauge  
var chartgx = {  
cls: 'thegauge',  
itemId: 'gauge'+tt2,  
xtype: 'chart',  
shadow: true,  
store: gaugeStore,  
width : 'auto',  
animate: true,  
insetPadding: 50,  
axes: [{  
type: 'gauge',  
position: 'gauge',  
minimum: 0,  
maximum: gaugemax,  
steps: 10,  
margin: 10  
}],  

series: [{  
type: 'gauge',  
minimum: 0,  
maximum: gaugemax,  
steps: 10,  
margin: 10,  
angleField: 'CurrentValue',  
donut: 30,  
colorSet:[gaugeColor,'#e1e1e1']  
}]  
}; 


                            `