HighCharts饼图工具提示未在悬停时显示

时间:2013-04-24 14:57:18

标签: javascript asp-classic highcharts highstock

我有一个highCharts饼图,当使用小提琴显示mouseOver上的工具提示数据点就好了,以及当我点击LegendItem或者饼图片的弹出效果时的点击事件,但是当我将我的代码插入我的网站,它不适用于任何版本的IE或谷歌浏览器。我不知道这笔交易是什么。 这是工具提示工作,以及点击事件,但它们都不能在我的代码中工作。

http://jsfiddle.net/hAnCr/

$("document").ready(
function(){
$('#container').highcharts({
        chart:{
            type:'pie',
            height: 250,
            width: 350
              },
        colors:[
            '#5485BC', '#AA8C30', '#5C9384', '#981A37', '#FCB319',     '#86A033', '#614931', '#00526F', '#594266', '#cb6828', '#aaaaab', '#a89375'
            ],
        title:{text: null},
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                showInLegend: true,
                dataLabels: {
                    enabled: false,                        
                    formatter: function() {
                        return this.percentage.toFixed(2) + '%';
                    }
                },                                  
            }
        },
        legend: {
            enabled: true,
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle'
        },
        series: [{
            type: 'pie',
            dataLabels: {

                    },
            data: [
                ['Domestic Equity', 38.5],
                ['International Equity', 26.85],
                ['Other', 15.70],
                ['Cash and Equivalents', 10.48],
                ['Fixed Income', 8.48]
            ]
        }]
    });
});

我遇到的第二个问题是,如果我可以在数据中执行switch语句,基本上创建一个传递1个参数的函数,并根据参数值更改我的data []值?

感谢您的帮助, NickG

0 个答案:

没有答案