KoolReport's Forum

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

How change format in english a spanish into the charts? #1486

Open Mauricio Cisternas opened this topic on on Jun 12, 2020 - 1 comments

Mauricio Cisternas commented on Jun 12, 2020

into the column the charts the format datatime is english (for example Febrary, 2019 and i want change say Febrero, 2019) Can i the lenguaje a spanish in the date.

thank you!!!

KoolReport commented on Jun 15, 2020

You can use the "formatValue:

SomeChart::create([
    "columns"=>[
        "myDate"=>[
            "formatValue"=>function($value){
                setlocale(LC_TIME, "es_ES");
                return strftime("%B, %Y",strtotime($value));
            }
        ]
    ]
]);

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
None yet

None