highcharts从表中加载数据

时间:2016-06-02 16:53:05

标签: vb.net highcharts data-visualization rose-diagram

我的支持ID:100038677-1nk6c5。

我有风玫瑰的问题。我会从代码中创建图形。我有aspx.vb加载文字:

    Literal2.Text = "" & _
        "<table id=&quot;freq&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>" & _
            "<tr nowrap bgcolor=&quot;#CCCCFF&quot;>" & _
                "<th colspan=&quot;9&quot; class=&quot;hdr&quot;>Table of Frequencies (percent)</th>" & _
            "</tr>" & _
        "<tr nowrap bgcolor=&quot;#CCCCFF&quot;>" & _
            "<th class=&quot;freq&quot;>Direction</th>" & _
            "<th class=&quot;freq&quot;>&lt; 0.5 m/s</th>" & _
            "<th class=&quot;freq&quot;>0.5-2 m/s</th>" & _
            "<th class=&quot;freq&quot;>2-4 m/s</th>" & _
            "<th class=&quot;freq&quot;>4-6 m/s</th>" & _
            "<th class=&quot;freq&quot;>6-8 m/s</th>" & _
            "<th class=&quot;freq&quot;>8-10 m/s</th>" & _
            "<th class=&quot;freq&quot;>&gt; 10 m/s</th>" & _
            "<th class=&quot;freq&quot;>Total</th>" & _
        "</tr>" & _
        "<tr nowrap>" & _
            "<td class=&quot;dir&quot;>N</td>" & _
            "<td class=&quot;data&quot;>1.81</td>" & _
            "<td class=&quot;data&quot;>1.78</td>" & _
            "<td class=&quot;data&quot;>0.16</td>" & _
            "<td class=&quot;data&quot;>0.00</td>" & _
            "<td class=&quot;data&quot;>0.00</td>" & _
            "<td class=&quot;data&quot;>0.00</td>" & _
            "<td class=&quot;data&quot;>0.00</td>" & _
            "<td class=&quot;data&quot;>3.75</td>" & _
        "</tr>" & _
        "</table>"

    Literal1.Text = "<script type='text/javascript'>" + _
        "$(function () {" & _
            "$('#container').highcharts({" & _
                "data: {" & _
                    "table: 'freq'," & _
                    "startRow: 1," & _
                    "endRow: 17," & _
                    "endColumn: 7" & _
                "}," & _
                "chart: {" & _
                    "polar: true," & _
                    "type: 'column'" & _
                "}," & _
                "title: {" & _
                    "text: 'Wind rose for South Shore Met Station, Oregon'" & _
                "}," & _
                "subtitle: {" & _
                    "text: 'Source: or.water.usgs.gov'" & _
                "}," & _
                "pane: {" & _
                    "size: '100%'" & _
                "}," & _
                "legend: {" & _
                    "align: 'right'," & _
                    "verticalAlign: 'top'," & _
                    "y: 100," & _
                    "layout: 'vertical'" & _
                "}," & _
                "xAxis: {" & _
                    "tickmarkPlacement: 'on'" & _
                "}," & _
                "yAxis: {" & _
                    "min: 0," & _
                    "endOnTick: false," & _
                    "showLastLabel: true," & _
                    "title: {" & _
                        "text: 'Frequency (%)'" & _
                    "}," & _
                    "labels: {" & _
                        "formatter: function () {" & _
                            "return this.value + '%';" & _
                        "}" & _
                    "}," & _
                    "reversedStacks: false" & _
                "}," & _
                "tooltip: {" & _
                    "valueSuffix: '%'" & _
                "}," & _
                "plotOptions: {" & _
                    "series: {" & _
                        "stacking: 'normal'," & _
                        "shadow: false," & _
                        "groupPadding: 0," & _
                        "pointPlacement: 'on'" & _
                    "}" & _
                "}" & _
            "});" & _
        "});" & _
        "</script>"

但是我看不到图表。

0 个答案:

没有答案