KoolReport's Forum

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

D3 funnel click event #1397

Closed ankit raj opened this topic on on Apr 20, 2020 - 2 comments

ankit raj commented on Apr 20, 2020

Hello , i have two blocks in a d3 funnel and i need to bind click event so that i know which block is clicked.How do i do that? I tried this but it didnt work:

   \koolreport\d3\FunnelChart::create([
            "dataSource"=>array(
                array("category"=>"Visit","amount"=>50000),
                array("category"=>"Download","amount"=>0)
            ),
            "width"=>420,
            "columns"=>[
                "category",
                "amount"
            ],
            "chart"=>array(
                'bottomWidth'=>0.4,
            ),
            "events"=>
            array(
                "click"=>[
                    "block"=>
                    [
                       "callback"=> function(data){
                                console.log("data");
                            }
                        ]
                ]
            )
KoolReport commented on Apr 20, 2020

Please use the itemSelect, following this documentation of D3 Client Events

ankit raj commented on Apr 20, 2020

Thanks

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