Hey everyone!

With the Labour Day holidays coming up, we’d like to let you know about our upcoming working hours:

Thursday, May 1st: Our team will be off during Labour Day.
Friday, May 2nd: We'll also be off for an extended holiday break.

We’ll be back on Monday, May 5th, ready to respond to all messages received during this time.

In the meantime, if you need help, feel free to:

https://www.youtube.com/@AmeliaWordPressBookingPlugin/videos

https://www.youtube.com/@wpDataTables/videos

Thank you for being so understanding, and we hope you enjoy the long weekend! 

Okay
  Public Ticket #3493617
add filter to chart
Closed

Comments

  • OSAMA alkamel started the conversation

    There is a lot of data displayed in the chart. I want to know how to add a filter for a specific time period in the chart
    Thanks

    Attached files:  لقطة شاشة 2023-10-07 134307.png

  •  1,894
    Miloš replied

    Hello,

    Sorry for the delayed reply.

    -

    If i understand, you wish to be able to filter this Chart on the Page on the Date Range?

    It is not possible to add a filter to the Chart itself,

    but there is a workaround how you can achieve this.


    By default, the charts will not follow any filtering from their source table if you just put the chart "on its own" on the page.

    But If you place the source table together with its chart on the same page,

    and activate " Follow Table filtering"  on the chart Wizard settings,  it is going to follow any filtering/sorting you do on the table.

    -

    Now, depending if you wish to hide the table and have a filtering for Charts, we can have two workarounds available.

    1. If you wish to hide the entire table along with table filters;

    you can add this CSS to the table's back-end settings/Customize/Custom CSS.

    .wpdt-c .wpDataTables.wpDataTablesWrapper {
    display: none !important;
    }

    This will completely hide the table from the page, but you can still pass the table shortcode with the chart, and you will get the "follow table filtering" effect on this chart.

    2. Or if you wish just to hide the table while leaving the filters with the chart,

    we would first need to disable the following in the table settings:

    "Show X entries" drop-down; "Info Block" from Display tab:

    5739555450.png

    Then, "Enable main search block"  and "show filters in a form above the table" from the Sorting and Filtering tab:

    7822122957.png

    Then, you can add this CSS in the table settings/Customize/Custom CSS:

    .wpdt-c .wpDataTablesWrapper table {
    display: none !important;
    }
    

    That will just leave the chart visible with the filters on the page,

    if you pass both table and chart shortcodes.

    Let me know if that helps.smile.png


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • OSAMA alkamel replied

    Thanks for the reply, the solution worked

  •   Miloš replied privately