0

I have this graph. I have a grid and I want to insert in each row this graph. The problem is that as you can see there is a small line in the left, it seems that this line is the graph axis. I need to remove it not only because of the visual aspect but because the axis increases the grid cell height.

Thanks in advance!

<script src="http://code.highcharts.com/highcharts.js"></script>

<div id="container" style="min-width: 400px; height: 100px; margin: 0 auto"></div>
    ​
var chart;
$(document).ready(function() {
    chart = new Highcharts.Chart({
        chart: {
            backgroundColor: null,
            renderTo: 'container',
            type: 'bar',
        },
        title: {
            text: ''
        },
        xAxis: {
            gridLineWidth: 0,
            enabled: false,
            categories: [''],
            labels: {
                enabled: false
            }
        },
        yAxis: {
            enabled: false,
            gridLineWidth: 0,
            lineWidth: 0,
            min: 0,
            title: {
                text: ''
            },
            labels: {
                enabled: false
            }
        },
        legend: {
            enabled: false,
        },
        tooltip: {
            formatter: function() {
                return ''+
                    this.series.name +': '+ this.y +'';
            }
        },
        credits: 
        {
            enabled: false,
            position: 
            {
                align: 'left',
                x: 10
            }
        },
        plotOptions: {
            series: {
                stacking: 'normal'
            }
        },
        series: [ {
            name: 'Clicks',
            data: [2]
        }, {
            name: 'Distributed Points',
            data: [3]
        }],
        exporting: 
        {
            enabled: false
        }
    });
});
​

​</p>

4

1 回答 1

1

这就是你所追求的吗? 在此处输入图像描述

我设置了 xAxis lineWidth: 0,然后在绘制绘图后:

$('.highcharts-axis').css('display','none');

编辑:

如果您还设置tickWidth: 0了 ,则可以在不使用 CSS 调用的情况下移除所有轴线的痕迹。

Revved小提琴在这里

于 2012-06-02T00:33:18.647 回答