KoolReport's Forum

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

Hide Filter Value On Value Metric #3213

Closed afieq opened this topic on on Dec 19, 2023 - 4 comments

afieq commented on Dec 19, 2023

Hi,

I have a Value Metric on my KoolReport Dashboard and it works fine. I want to know is there a way to hide the filter on the Value Metric for example 'This Month' as i want to make it default to only one value filter and not display on the Metric.

Thanks in advance.

Regards, Afieq

KoolReport commented on Dec 19, 2023

May be you can use the disableRangeSelect

protected function onCreated()
{
    $this->disableRangeSelect(true);
}
afieq commented on Dec 19, 2023

Hi KoolReport,

I have tried your suggestion but it only make it disable and not hide it. Is the other way to remove or hide it from showing?

Thanks in advance.

Regards, Afieq

KoolReport commented on Dec 19, 2023

You can try this hack

    MyValueMetric::create(),
    Html::style("
        #MyValueMetric select {
            display:none;
        }
    "),

Basically it will add an custom css to hide the select inside the MyValueMetric, please change this to your metric object name.

afieq commented on Dec 21, 2023

Hi KoolReport,

I have added the custom ccs as you suggested and it works like a charm. Thank you so much for your help. Kudos to you.

Regards, Afieq

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