Ext JS chart Tooltip not rendering under mouse pointer

966 Views Asked by At

I am trying to add tooltips to my ExtJS chart. The tooltip is getting rendered but not under the mouse pointer. It is getting rendered near end of the page.

Ext.create('Ext.chart.Chart', {
 renderTo: Ext.getBody(),
 width: 470,
 height: 300,
    store: store,
 axes: [{
                type: 'Numeric',
                minimum: 0,
                minorTickSteps: 0,
                maximum: 150,
                position: 'left',
                fields: ['lineY', 'greenY', 'yellowY', 'redY'],
                title: 'Buffer Penetration'

            }, {
                type: 'Numeric',
                position: 'bottom',
                fields: ['lineX', 'areaX'],
                title: 'Critical Chain Comp'
            }],
 series: [
            {
                type: 'area',
                axis: 'left',
                xField: 'areaX',
                yField: ['redY']

            },

             {
                 type: 'area',
                 axis: 'left',
                 xField: 'areaX',
                 yField: ['yellowY']

             },
             {
                 type: 'area',
                 axis: 'left',
                 xField: 'areaX',
                 yField: ['greenY']

             },

            {
                type: 'line',
                axis: 'left',
                fill: false,
                // tip: 'This is a tip',
                xField: 'lineX',
                yField: 'lineY',
                tips: {
                    trackMouse: true,
                    width: 140,
                    height: 28,
                    renderer: function (storeItem, item) {
                        // calculate and display percentage on hover

                        this.setTitle("Tooltip Text");
                    }
                }

            }
           ]
  });   

I have my code here : http://jsfiddle.net/Abhishek1191/vdazU/1076/

I feel like I am doing something silly here or maybe there is some issue with the ExtJS library I am using. Help would be highly appreciated

0

There are 0 best solutions below