highcharts柱状图+折线图

<div id="container"
         style="min-width: 280px; height: 233px; margin: 0 auto"></div>
var Ri1 = parseFloat("33.3");
var Ri2 = parseFloat("25.0");
var Ri3 = parseFloat("44.4");
var Ri4 = parseFloat("25.0");
var Ri5 = parseFloat("38.9");
var Ri6 = parseFloat("72.2"); 
var chart1 = new Highcharts.Chart({
            chart: {
                type: 'column',
                renderTo: 'container',
                backgroundColor: 'transparent',
                spacingBottom: 0,
                spacingTop: 0,
                spacingLeft: 0,
                spacingRight: 0
            },
            title: {
                text: ''
            },
            credits: {
                enabled: false
                // 禁用版权信息
            },

            colors: [               
                "#32A6A3",
                "#ED93B5",
                "#FC983B",
            ],
            xAxis: {
                type: 'category',
                tickWidth: 0,//去掉刻度
                gridWidth: 1,
                lineColor: '#ccc',
                categories: ['a', 'b', 'c'],
                minRange: 1,
                tickPixelInterval: 1,
                label: {
                    reserveSpace: false,
                    padding: 0,
                    step: 1,
                    style: {
                        textOverflow: 'none',
                        fontSize: '8px'
                    }
                }
            },

            yAxis: {
                min: 0,
                max: max,
                floor: 0,
                ceiling: 100,
                labels: {
                    enabled: false
                },
                tickWidth: 0,//去掉刻度
                gridLineWidth: 0,//去掉y轴方向的横线
                title: {
                    text: ''
                }
            },
            legend: {
                enabled: false
            },
            plotOptions: {
                column: {
                    dataLabels: {
                        enabled: false,
                        style: {
                            color: '#555',
                            fontWeight: 'normal',
                            border: 1
                        }
                    }
                },
                lines: {
                    dataLabels: {
                        enabled: false

                    }
                },
                series: {
                    borderWidth: 0,
                    dataLabels: {
                        format: '{point.y:.1f}',

                    }
                }
            },

            series: [
                {
                    type: 'column',
                    name: '得分',
                    colorByPoint: true,
                    data: [Ri4, Ri5, Ri6]
                },
                {
                    type: 'line',
                    name: '本型号均值',
                    lineWidth: 1,
                    lineColor: '#888',
                    marker: {
                        fillColor: '#888',
                        lineColor: '#888',
                        symbol: 'circle',
                        lineWidth: 1,
                        radius: 1,
                    },
                    data: [Ri1, Ri2, Ri3]
                }
            ]

        });

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值