如何隐藏底部垂直线高图表.js

how can I hide bottom vertical lines highcharts.js

本文关键字:底部 垂直线 高图表 js 隐藏 何隐藏      更新时间:2023-09-26

我尝试制作图表

chart: {
   type: 'column'
        }

不幸的是,我无法隐藏底部垂直线这是小提琴:https://jsfiddle.net/Vitalis93/jzm7qe85/4/你可以帮我吗?

索引.html

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

脚本.js

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: null
        },
        subtitle: {
            text: null
        },
        xAxis: {
            categories: [
                'Jan',
                'Feb',
                'Mar',
                'Apr',
                'May',
                'Jun',
                'Jul',
                'Aug',
                'Sep',
                'Oct',
                'Nov',
                'Dec'
            ],
            crosshair: false,
            labels:{
                enabled:false
            },
            gridLineWidth: 0,
            minorGridLineWidth: 0,
            lineColor: 'transparent'
        },
        yAxis: {
                gridLineWidth: 0,
            minorGridLineWidth: 0,
            lineColor: 'transparent',
            min: 0,
            title: {
                text: null
            },
            labels:{
            enabled:false
            },
        },
        tooltip: {
            enabled:false
        },
        plotOptions: {
            column: {
                pointPadding: 0.0,
                borderWidth: 0
            }
        },
         legend: {
            enabled: false
           },
        series: [{
            name: 'Berlin',
            data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
        }]
    });
});
 xAxis: {
            lineWidth: 0,
            minorGridLineWidth: 0,
            lineColor: 'transparent',
            crosshair: false,
            labels:
            {
                enabled:false
            },
             minorTickLength: 0,
             tickLength: 0
        },

添加到 xAxis

tickLength: 0

编辑小提琴:https://jsfiddle.net/Vitalis93/jzm7qe85/7/