如何在AngularJS.i中实现Highchart是角度实现高图的麻烦

时间:2017-02-10 08:48:10

标签: javascript highcharts highstock bubble-chart

如何在AngularJS中实现此代码?

在AngularJS文件中无法正常工作

http://jsfiddle.net/Kondaldurgam/qkr4dqe3/

如何在AngularJS中实现Highchart?

 Highcharts.chart('container', {

chart: {
    type: 'bubble',
    plotBorderWidth: 1,
    zoomType: 'xy'
},

title: {
    text: 'Highcharts bubbles with radial gradient fill'
},

xAxis: {
    type:'',
    gridLineWidth: 1
},

yAxis: {
    startOnTick: false,
    endOnTick: false
},

series: [{
    data: [
        [9, 81, 63],
        [98, 5, 89],
        [51, 50, 73],
        [41, 22, 14],
        [58, 24, 20],
        [78, 37, 34],
        [55, 56, 53],
        [18, 45, 70],
        [42, 44, 28],
        [3, 52, 59],
        [31, 18, 97],
        [79, 91, 63],
        [93, 23, 23],
        [44, 83, 22]
    ],
    marker: {
        fillColor: {
            radialGradient: { cx: 0.4, cy: 0.3, r: 0.7 },
            stops: [
                [0, 'rgba(255,255,255,0.5)'],
                [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0.5).get('rgba')]
            ]
        }
    }
}, ]

});

1 个答案:

答案 0 :(得分:0)

根据您在两个小提琴中提供的信息,您在xAxis属性中看起来很缺少'category'

xAxis: {
        type: "category", // <==== here
        gridLineWidth: 1
    }

这是working fiddle