Highcharts,雷达图表问题

时间:2015-02-19 20:17:01

标签: javascript highcharts radar-chart

我在这张雷达图表上遇到问题,我试图将项目的颜色(财务状况)与另一个颜色联系起来,例如,财务模型和赞助商/开发应该联系起来,但是没有。在excel工作正常,这是代码:



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

        chart: {
            polar: true,
            type: 'line'
        },

        title: {
            text: 'Budget vs spending',
            x: -80
        },

        pane: {
            size: '80%'
        },

        xAxis: {
            categories: ['Sponsor/Developer', 'SPA', 'SPV', 'Legal DD','Legal contracts', 'Environmental license',
                'Grid connection license', 'Construction License', 'Generation License', 'Mining rights',
                'Suite Studies/License', 'Property/terrain', 'Technical studies', 'EPC', 'Financial model'],
            tickmarkPlacement: 'on',
            lineWidth: 0                        
        },

        yAxis: {
            gridLineInterpolation: 'polygon',
            lineWidth: 0,
            min: 0            
        },

        tooltip: {
            shared: true,
            pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
        },

        legend: {
            align: 'right',
            verticalAlign: 'top',
            y: 70,
            layout: 'vertical'
        },

        series: [{
            name: 'Legal',           
            data: [4, 4, 4, 4, 4, 4,null,null,null,null,null,null,null,null,null],
            pointPlacement: 'on',
            color: "#206ef0",

        }, {
            name: 'Development',            
            data: [null, null, null, null, null, 4,4,4,4,4,4,null,null,null,null],
            pointPlacement: 'on',
            color: "#f07820"
        },
        {
            name: 'Technical',            
            data: [null, null, null, null, null, null, null, null, null, null, null,4,4,4,4],
            pointPlacement: 'on',
            color : "#37ce4c"
        },
        {
            name: 'Financial',
            data: [4, null, null, null, null, null, null, null, null, null, null, null, null, null, 4],            
            pointPlacement: 'on',
            color: "#dfdd19"
        }
    ]

    });
});    
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>

<div id="container" style="height: 400px; width: 500px"></div>
&#13;
&#13;
&#13;

我认为必须有一个属性,但我无法找到它。 我希望你能帮助我,谢谢。

0 个答案:

没有答案