0

在单击图表时,我需要帮助在弹出窗口中打开 highchart

$(document).ready(DrawMyGraph1);


  function DrawMyGraph1() {
   var   xaxis = $.parseJSON($("#hdnXaxis").val());
   var   series1 = $.parseJSON($("#hdnYaxis").val());

    chart = new Highcharts.Chart(
    {
        chart: {
            type: 'column',
            renderTo: 'container3',
            defaultSeriesType: 'area',
            events: {
                click: function () 
                {

                }
            }

        },
        title: {
            text: ''
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: xaxis,
            labels: {
                enabled: false
            }
        },
        yAxis: {
            title: {
                text: 'No of Patients'
            }
        },

        credits: {
            enabled: false
        },
        tooltip: {
            formatter: function () {
                return this.series.name + ' - ' + Highcharts.numberFormat(this.y, 0);
            }
        },
        series: series1
    });

}

我需要在图表单击事件中调用函数“hs.Expander.prototype”以使用 highslide 在弹出窗口中打开 highchart。谁能帮忙

4

1 回答 1

1

请参阅此 jsFiddle: http: //jsfiddle.net/roadrash/eteqX/
在页面的 head 部分调用 Highslide 文件很重要 - 在图表代码之前。

<script type='text/javascript' src="http://highcharts.com/highslide/highslide-full.min.js"></script>
<script type='text/javascript' src="http://highcharts.com/highslide/highslide.config.js"></script>
<link rel="stylesheet" type="text/css" href="http://highcharts.com/highslide/highslide.css"/>
于 2013-08-02T12:59:51.133 回答