Highcharts Bubble与csv数据

时间:2013-04-17 21:01:38

标签: javascript highcharts

我想通过从csv文件导入数据来创建带有高图的气泡图,这就是我所做的代码:

'$(function () {
    $('#container').highcharts({

        chart: {
            type: 'bubble',
           zoomType: 'xy'
        },
          xAxis: {
            allowDecimals: true,
            gridLineWidth: 1,
            endOnTick: true,

             max :2,
             min:-2,
             tickPixelInterval: 200,


        },yAxis: {
            gridLineWidth: 1,
            endOnTick: true,
             max :2,
             min: -2,
             tickPixelInterval: 150,

        },


        title: {
            text: 'Cycle 2012 Q 4'
        },

        series: [{

            data: [[0.612026169,1.57522991,0.2302]]
        }, {

            data: [[0.4410667,-0.96442802,0.1662]]
        }, {

            data: [[-0.280249839,-0.687351853,0.1553]]
        }, {

            data: [[0.518541583,0.045330936,0.1985]]
        }, {    

            data: [[0.098823319,0.164087324,0.2086]]
        }]

    });

});'

我不知道从csv导入数据怎么能得到相同的结果?你能帮助我吗?感谢名单

1 个答案:

答案 0 :(得分:0)

在将数据传递给Highcharts之前,您必须对数据进行预处理。本教程将在本节中介绍它:http://docs.highcharts.com/#preprocesssing-data-from-a-file