Link 无法使用 FusionCharts LinkedChart

Link wont work with FusionCharts LinkedChart

我正在尝试进行一个简单的向下钻取,将几个月分解为几周,我只是想让第一列起作用。我得到要呈现的图表,但是当我单击 January 时,它不会转到链接的图表。 2 月和 3 月的外部链接有效,所以我猜这是 JSON 数据的问题。

define(['app'], function (app) {
app.register.controller('MilesovertimeController', [function () {
    var vm = this;

    vm.myDataSource ={
        "chart": {
            "caption": "Miles Over Time",
            "subCaption": "Track the miles you have run over your entire running career!",
            "xAxisName": "Time (Month)",
            "yAxisName": "Miles",
            "theme": "fint"
        },
        "data": [
            {
                "label": "January",
                "value": "10",
                "link": "newchart-json-Jan"
            },
            {
                "label": "February",
                "value": "20",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "March",
                "value": "5",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "April",
                "value": "55",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "May",
                "value": "40",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "June",
                "value": "110",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "July",
                "value": "75",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "August",
                "value": "90",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "September",
                "value": "10",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "October",
                "value": "45",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "November",
                "value": "30",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "December",
                "value": "100",
                "link": "n-http://fusioncharts.com"
            }
        ],
        "linkeddata": [
            {
                "id": "Jan",
                "linkedchart": {
                    "chart": {
                        "caption": "Miles In January",
                        "subcaption": "This is what you did in January",
                        "xAxisName": "Weeks",
                        "yAxisName": "Miles"
                    },
                    "data": [
                        {
                            "label": "Week 1",
                            "value": "50"
                        },
                        {
                            "label": "Week 2",
                            "value": "25"
                        },
                        {
                            "label": "Week 3",
                            "value": "40"
                        },
                        {
                            "label": "Week 4",
                            "value": "10"
                        }
                    ]
                }
            }
        ]
    }

}]);
);

编辑:这就是我要模仿的http://www.fusioncharts.com/features/linkedcharts-for-drill-down/

重要编辑:当我点击 1 月栏时,出现此错误:

Uncaught RuntimeException: #03091456 chartobject-2.render() Error >> Unable to find the container DOM element.

<div class="container" ng-controller="MilesovertimeController as vm">
<div fusionCharts
     width="1000"
     height="550"
     type="column2d"
     datasource="{{vm.myDataSource}}">
</div>
</div>

为了进行深入研究,请确保指令具有 id

var app = angular.module('myApp', ["ng-fusioncharts"]);
app.controller('MilesovertimeController', [function () {
    var vm = this;

    vm.myDataSource ={
        "chart": {
            "caption": "Miles Over Time",
            "subCaption": "Track the miles you have run over your entire running career!",
            "xAxisName": "Time (Month)",
            "yAxisName": "Miles",
            "theme": "fint"
        },
        "data": [
            {
                "label": "January",
                "value": "10",
                "link": "newchart-json-Jan"
            },
            {
                "label": "February",
                "value": "20",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "March",
                "value": "5",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "April",
                "value": "55",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "May",
                "value": "40",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "June",
                "value": "110",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "July",
                "value": "75",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "August",
                "value": "90",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "September",
                "value": "10",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "October",
                "value": "45",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "November",
                "value": "30",
                "link": "n-http://fusioncharts.com"
            },
            {
                "label": "December",
                "value": "100",
                "link": "n-http://fusioncharts.com"
            }
        ],
        "linkeddata": [
            {
                "id": "Jan",
                "linkedchart": {
                    "chart": {
                        "caption": "Miles In January",
                        "subcaption": "This is what you did in January",
                        "xAxisName": "Weeks",
                        "yAxisName": "Miles"
                    },
                    "data": [
                        {
                            "label": "Week 1",
                            "value": "50"
                        },
                        {
                            "label": "Week 2",
                            "value": "25"
                        },
                        {
                            "label": "Week 3",
                            "value": "40"
                        },
                        {
                            "label": "Week 4",
                            "value": "10"
                        }
                    ]
                }
            }
        ]
    }

}]);
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://fusioncharts.github.io/angular-fusioncharts/demos/js/angular-fusioncharts.min.js"></script>



<div ng-app="myApp">
  <div class="container" ng-controller="MilesovertimeController as vm">
    <div fusionCharts
         width="1000"
         height="550"
         id="test"
         type="column2d"
         datasource="{{vm.myDataSource}}">
    </div>
  </div>
</div>