动态highcharts打开新的高位

时间:2014-12-29 16:06:19

标签: jquery highcharts highslide

你好我在仪表板上工作。我从MSSQL数据库中检索所有图表信息 即时通讯运行以下代码。

服务器侧

        series(i) = New Series() With { _
                .Name = mymvlist(i).ToString(), _
                .PlotOptionsColumn = New PlotOptionsColumn With {.Point = New PlotOptionsColumnPoint With {.Events = New PlotOptionsColumnPointEvents With {.Click = _
            "function() {hs.htmlExpand(null,{pageOrigin:{ x: 400,  y: 500 },headingText: this.series.name,maincontentText: this.category + ':<br/> ' + this.y + ' GB'+ ':<br/>'  + '<div id=""test"" style=""color:#0000FF"">' + '</div>' ,width: 320 ,height: 400});  }" _
                }}}, _
               .Data = New Data(myseriesdataVM(myList, mymvlist(i).ToString()))}

客户端

   $(function () {         
        hs.Expander.prototype.onAfterExpand = addChart;

        function addChart() {
            var chart = $("#test").highcharts();
            if (chart) {
                chart.destroy();
            }
            $("#test").highcharts({
                chart: { width: 300, height: 300 },
                title: { text: 'test' },
                series: [{ type: 'pie', data: [Math.random() * 10, Math.random() * 10, Math.random() * 10] }]
            });
        }


   })

我想在highslide中显示新图表,选择this.category和this.y将从MS-SQL数据库中获取查询结果

0 个答案:

没有答案