Skip to content

Removing the thick line at origin #6248

@SeloSlav

Description

@SeloSlav

I'm using version 2.8.0

Is it possible to remove the thick line at the horizontal axis, or to at least make it thinner like the others?

image

My reason for wanting to do so is because the label "1kg" in my example here actually has the value 0. I've set up my y axis to map the equation's exponents, so 10^0 = 1kg,10^1 = 10kg, 10^2 = 100kg, etc.

I don't want a line at 0 at all.

yAxes: [{
    display: true,
    scaleLabel: {
        labelString: []
    },
    ticks: {
        min: -2,
        beginAtZero: false,
        stepSize: 1,
        callback: function(label, index, labels) {
            if ((label > index) && (label < index + 1))
                return Math.pow(10, parseFloat(label / index).toFixed(2)) + " kg";
            else return Math.pow(10, parseFloat(label).toFixed(1)) + " kg";
        }
    }
}]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions