WebDev February 2016

Extjs 4 : use cloneConfig() to clone a chart

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.

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.

initialiseAll :

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

Answers


tonymayoral February 2016

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:

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

Post Status

Asked in February 2016
Viewed 3,801 times
Voted 12
Answered 1 times

Search




Leave an answer