Ext JS chart Tooltip不在鼠标指针下渲染

时间:2015-05-29 14:22:20

标签: extjs tooltip extjs-chart

我正在尝试将工具提示添加到我的ExtJS图表中。工具提示正在渲染但不在鼠标指针下。它会在页面末尾呈现。

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");
                    }
                }

            }
           ]
  });   

我的代码在这里:http://jsfiddle.net/Abhishek1191/vdazU/1076/

我觉得我在这里做的事情很糟糕,或者我正在使用的ExtJS库存在一些问题。帮助将受到高度赞赏

0 个答案:

没有答案