KoolReport's Forum

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

D3 PieChart Dashboard Tooltip options #2357

Closed Mathieu Viennet opened this topic on on Sep 24, 2021 - 2 comments

Mathieu Viennet commented on Sep 24, 2021

Hi,

i'm using Dashbaord and D3 Piechart. Right now, when I mousse over the pie, it shows the percentage in the tooltip. I know there's an option to show the total amount instead...

I tried this but it's not working :

protected function onInit()
    {
        $this
        ->colorScheme(ColorList::nature())
        ->height("500")
        ->settings([
            "tooltip"=>array(
        "use"=>"value",
        "prefix"=>"$"
    )
        ]);

    }

Thank you!

KoolReport commented on Sep 27, 2021

You do this:

protected function onInit()
{
        $this
        ->colorScheme(ColorList::nature())
        ->height("500")
        ->tooltip([
            "use"=>"value",
            "prefix"=>"$"
        ]);
}
Mathieu Viennet commented on Sep 28, 2021

Thank you works perfectly!

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
solved

None