Carolo
Carolo

Reputation: 67

Highcharts Get rid off bottom line

How can I get rid of the gray bottom line on axis X?

Any help please jsFiffle example

$(function () {
$('#container').highcharts({
    title: {text:''},
    yAxis: {
        gridLineWidth: 0,   
        minorGridLineWidth: 0,
        labels:{enabled: false},
        title: {enabled:false}
    },
    xAxis: {
        gridLineWidth: 0,        
        minorGridLineWidth: 0,
        tickWidth: 0,
        categories: ['Jan', 'Feb'],
        labels:{ enabled: false }
    },
    legend: {enabled: false},
    series: [{ data: [29.9, 71.5]  }]
});

});

Thanks

Upvotes: 2

Views: 649

Answers (3)

Strikers
Strikers

Reputation: 4776

There is a property for every axis called lineWidth which determines the width of the axis line.

setting it to a value will give the user defined width to the axis.

here it should be given as 0

lineWidth: 0

here I have updated your fiddle with changes

I hope this is what you are looking for.

Upvotes: 1

Paweł Fus
Paweł Fus

Reputation: 45079

You were very close, simply add lineWidth: 0, see: http://jsfiddle.net/EtvMR/2/

    xAxis: {
        gridLineWidth: 0,
        minorGridLineWidth: 0,
        tickWidth: 0,
        lineWidth: 0,
        categories: ['Jan', 'Feb'],
        labels: {
            enabled: false
        }
    },

Upvotes: 2

helderdarocha
helderdarocha

Reputation: 23637

You can set the CSS property display: none for the class selector highcharts-axis and it will disappear:

.highcharts-axis {
    display: none;
}

See: JSFiddle

Upvotes: 1

Related Questions