KoolReport's Forum

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

How to add labels for values and dates? #1166

Closed Fuad Pashayev opened this topic on on Nov 19, 2019 - 3 comments

Fuad Pashayev commented on Nov 19, 2019

Hi,I need the labels for the x and y axis. For example at the end of Y axis I need a label: for example "Dates" and at the x axis I need "Values",how i can accomplish this? I need "MONTHS" label at red color and "VALUES" label at yellow color.

Fuad Pashayev commented on Nov 21, 2019

Can you please help around this issue?

KoolReport commented on Nov 21, 2019

Yes you can, you do this:

BarChart::create([
    ...
    "options"=>[
        "scales"=>[
            "yAxes"=>[
                [
                    "scaleLabel"=>[
                        "display"=>true,
                        "labelString"=>"Y Axis Label"
                    ]
                ]
            ],
            "xAxes"=>[
                [
                    "scaleLabel"=>[
                        "display"=>true,
                        "labelString"=>"X Axis Label"
                    ]
                ]
            ],
        ]
    ]
]);
Fuad Pashayev commented on Nov 22, 2019

Thank you it worked )

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
solved

ChartJS