Hi

I am trying to put the extjs chart in ext js grid cell. Please tell me the approach how to do that. I have tried the following approach, it is giving me the error insertAdjacentHtml is null or not an object.please help me out.

Code:
var grid = Ext.create('Ext.grid.Panel', {
        store: store,
        stateful: true,
        
        stateId: 'stateGrid',
        columns: [
            {
                text     : 'Company',
                flex     : 1,
                sortable : false,
                dataIndex: 'company'
            },
            {
                text     : 'Price',
                width    : 75,
                sortable : true,
                renderer : 'usMoney',
                dataIndex: 'price'
            },
            {
                text     : 'Change',
                width    : 75,
                sortable : true,
                renderer : change,
                dataIndex: 'change'
            },
            {
                text     : '% Change',
                width    : 75,
                sortable : true,
                renderer : pctChange,
                dataIndex: 'pctChange'
            },
            {
                text     : 'Last Updated',
                width    : 85,
                sortable : true,
                renderer : Ext.util.Format.dateRenderer('m/d/Y'),
                dataIndex: 'lastChange'
            },
            {
              text     : 'chartDisplay',
              width    : 85,
              sortable : false,
              renderer :  function(v, meta, panel1){
              var store = Ext.create('Ext.data.JsonStore', {
                     fields: ['year', 'comedy', 'action', 'drama', 'thriller'],
                     data: [
                             {weeks: 1, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000 }
             ]});
              var panel1 = Ext.create('widget.panel', {
                     width: 800,
                     height: 400,
                     title: 'Stacked Bar Chart - Movies by Genre',
                     layout: 'fit',
                     items: {
                         xtype: 'chart',
                         animate: true,
                         shadow: true,
                         store: store,
                         legend: {
                             position: 'right'
                         },
                         axes: [{
                             type: 'Numeric',
                             position: 'bottom',
                             fields: ['comedy', 'action', 'drama', 'thriller'],
                             title: false,
                             grid: true,
                             label: {
                                 renderer: function(v) {
                                     return String(v).replace(/000000$/, 'M');
                                 }
                             },
                             roundToDecimal: false
                         }, {
                             type: 'Category',
                             position: 'left',
                             fields: ['year'],
                             title: false
                         }],
                         series: [{
                             type: 'bar',
                             axis: 'bottom',
                             gutter: 80,
                             highlight: true,
                             xField: 'year',
                             yField: ['comedy', 'action', 'drama', 'thriller'],
                             stacked: true,
                             tips: {
                                 trackMouse: true,
                                 width: 65,
                                 height: 28,
                                 renderer: function(storeItem, item) {
                                     this.setTitle(String(item.value[1] / 1000000) + 'M');
                                 }
                             }
                         }]
                     }
                 });
                var id = Ext.id();
                 //meta.attr = 'id="' + id +'"';
                 meta.tdCls = '"' + id + '"';
                 //r.chart.render.defer(1, r.chart, [id]);
                 Ext.Function.defer(panel1.render, 100, panel1, [id]);
                 //r.chart.render(id);
                 return '';
            }
             },
            
        ],
        height: 350,
        width: 600,
        title: 'Array Grid',
        renderTo: Ext.getBody(),
        viewConfig: {
            stripeRows: true
        }
    });