Remove y and x axis lines and change axis font style in Chartjs

👍:0

I want to completley remove the lines from the y and x axis, not just
the grid lines but the left and bottom lines.

Just set the scale line color to transparent in the options, like so

    ...
    scaleLineColor: "rgba(0,0,0,0)",
    ...

Additionally, how would I change the font style of the axis labels to
a custom font?

From https://stackoverflow.com/a/34176161/360067, just set the font-face in your CSS and then set the scale font family, like so

CSS

    @font-face {
        font-family: 'FontAwesome';
        src: /* path to your font files */
        font-weight: normal;
        font-style: normal;
    }

Script

    ...
    scaleFontFamily: "'FontAwesome'",
    ...

Leave a comment