KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Hide gridlines in chartjs #3259

Open Melina Maccio opened this topic on on Mar 7, 2024 - 3 comments

Melina Maccio commented on Mar 7, 2024

Hi! how do I hide the gridines on the chartJs barchart?

John commented on Mar 9, 2024

Hi, my suggestion is to try this:

'options' => [

 'scales' => [
  'y' => [
    'grid' => [
       'drawOnChartArea' => false // try also 'display' => false
     ]
  ],
Melina Maccio commented on Mar 11, 2024

None of those worked. I'm using chartjs in the dashboard framework by the way.

Sebastian Morales commented on Mar 14, 2024

Pls try the following option:

"options" => [
    "scales" => [
        "xAxes" => [
            [
                "gridLines" => [
                    "display" => false
                ]
            ]
        ],
        "yAxes" => [
            [
                "gridLines" => [
                    "display" => false
                ]   
            ]
        ]
    ]
] 

Pls note the xAxes and yAxes are arrays of arrays because there could be multiple x or y axes.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Dashboard