热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Extjs4:使用cloneConfig()克隆图表-Extjs4:usecloneConfig()tocloneachart

Ihaveagridwithachart:我有一个带图表的网格:WhenIclickonthischart,anewpanelcorrespondingto

I have a grid with a chart :

我有一个带图表的网格:

enter image description here

When I click on this chart,a new panel corresponding to the details of this chart is created just below. howeever, its length is limited to 500px as it is a toolTip.

当我点击此图表时,会在下面创建一个与此图表详细信息对应的新面板。但是,它的长度限制为500px,因为它是一个工具提示。

enter image description here

My goal is to create a panel to show the detail of this graph covering the entire length of the grid

我的目标是创建一个面板,以显示该图形的细节,覆盖整个网格长度

I used cloneConfig() to create this panel.I tried to set its length to 900px but its not working.

我使用cloneConfig()来创建这个面板。我试图将它的长度设置为900px,但它不起作用。

initialiseAll :

var gTimeLinePanelDetail = Ext.getCmp('GlobalTimeLinePanelDetail');

var gTimeLinePanelDetail = Ext.getCmp('GlobalTimeLinePanelDetail');

if(gTimeLinePanelDetail == undefined)
{
    me.detailPanel = new Ext.tip.Tip({
        id : 'GlobalTimeLinePanelDetail' ,
        width : gridWidth,                      
    });
}

listeners :

listeners: {                
                click: function(hdle) {
                    me.showFullDetail(hdle, me);
                },

and my function :

和我的功能:

showFullDetail : function(hdle, me){

        var gTimeLinePanelDetail = Ext.getCmp('GlobalTimeLinePanelDetail');

        if(gTimeLinePanelDetail !=  undefined)
        {   
            var insideChartDetail = me.objChart.cloneConfig();

            // set dimensions
            insideChartDetail.setHeight(30);
            insideChartDetail.setWidth(gridWidth);

            gTimeLinePanelDetail.removeAll();
            gTimeLinePanelDetail.add(insideChartDetail);

            gTimeLinePanelDetail.showAt([xGrid,yMe + me.getHeight()]);
        }       
    },

My question is how to change the length of this panel to cover the entire length of the grid knowing that the size of a tooltip is limited to 500px

我的问题是如何更改此面板的长度以覆盖网格的整个长度,因为知道工具提示的大小限制为500px

1 个解决方案

#1


0  

The default maxWidth of the tooltip is 500 px. Try changing tooltip's maxWidth config to a greater value. For example you could try this in your code:

工具提示的默认maxWidth为500 px。尝试将工具提示的maxWidth配置更改为更大的值。例如,您可以在代码中尝试此操作:

me.detailPanel = new Ext.tip.Tip({
        id : 'GlobalTimeLinePanelDetail' ,
        width : gridWidth,
        maxWidth : gridWidth                      
    });

推荐阅读
author-avatar
手机用户2602922195
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有