小编dev*_*dev的帖子

extJs 4网格定制 - 最后的总行数

我想要一个只有两列的网格,一个用于名称,另一个用于百分比.最后一行将以"总计"作为名称,总百分比将为"百分比".此行的样式与其他行的样式不同.请指导我如何实现这一目标.谢谢..

javascript extjs extjs4

6
推荐指数
1
解决办法
1万
查看次数

extJs(设置高度和宽度)的百分比

我正在开发一个门户网站,如http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/portal/portal.html.这个示例的好处是,如果您使用浏览器的高度和宽度,则在运行时重新调整高度和宽度.现在我有一个面板(就像图表中的图表一样),但区别在于我有两个图表要显示在该面板中,所以我不能使用布局:'填充'.问题是我必须以点为单位定义两个图表的宽度和高度.由于调整面板大小时图表不会调整大小.我怎样才能使它们相对于其父级获得高度和宽度百分比?并且对于记录高度和宽度'auto'ssut不会渲染图形.

非常感谢您的帮助

   Ext.define("Ext.app.ChartPortlet",{extend:"Ext.panel.Panel",alias:"widget.chartportlet",requires:["Ext.data.JsonStore","Ext.chart.theme.Base","Ext.chart.series.Series","Ext.chart.series.Line","Ext.chart.axis.Numeric"],
  generateData:function(){var b=[{name:"x",djia:10000,sp500:1100}],a;for(a=1;a<50;a++) {b.push({name:"x"+a,sp500:b[a-1].sp500+ ((Math.floor(Math.random()*2)%2)?-1:1)*Math.floor(Math.random()*7),djia:b[a-1].djia+    ((Math.floor(Math.random()*2)%2)?-1:1)*Math.floor(Math.random()*7)})}return b}
  ,initComponent:function()
    {Ext.apply(this,{layout: {
        type: 'vbox',
        align: 'stretch'
    }
   ,width:600,height:300,items:
   [{xtype:"chart",animate:false,shadow:false,store:Ext.create("Ext.data.JsonStore",
   {fields:["name","sp500","djia"],data:this.generateData()}),legend:        {position:"bottom"},axes:[{type:"Numeric",position:"left",fields:["djia"],
    title:"Dow Jones Average",label:{font:"11px Arial"}}, {type:"Numeric",position:"right",grid:false,fields:["sp500"],title:"S&P 500",label:  {font:"11px Arial"}}],
    series:[{type:"line",lineWidth:1,showMarkers:false,fill:true,axis: ["left","bottom"],xField:"name",yField:"djia",style:{"stroke-width":1}},    {type:"line",lineWidth:1,showMarkers:false,
     axis:["right","bottom"],xField:"name",yField:"sp500",style:{"stroke-width":1}}]}]


     });this.callParent(arguments)}});
Run Code Online (Sandbox Code Playgroud)

javascript extjs extjs4

2
推荐指数
1
解决办法
1万
查看次数

Jscrollpane在底部初始化

我正在使用jscrollpane插件进行自定义滚动条.我无法完成的是在底部进行初始化,即无论何时加载该窗口,它都应自动滚动到底部.任何帮助是极大的赞赏.

javascript php jquery jquery-jscrollpane

1
推荐指数
1
解决办法
2374
查看次数

标签 统计

javascript ×3

extjs ×2

extjs4 ×2

jquery ×1

jquery-jscrollpane ×1

php ×1