• Resolved timmyusa

    (@timmyusa)


    I would like to be able to add a date range filter to wpdatatables charts. Ideally I would like to default to the last XXX days and allow users to filter using Date To and Date From. This is easy to do with Tableau and other data visualization tools.

    Is this possible? As a customer since 2019, I appreciate the new features you have added over the years. It would be great to continue to allow for better customization of filters, style/display and more charts!

    Something like this: https://www.vizwiz.com/2014/01/tableau-tip-showing-all-dates-on-date.html

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hi, timmyusa
    Yes. You won’t be able to set filters directly on a chart, though – but there is a workaround to achieve your goal of having a date range filter for charts.
    You can place the chart’s table on same page, and enable “Follow table filtering” on the chart.
    Then, we can hide the main table element with CSS, and leave only the table filters visible.

    Here is how you can do that.
    We would first need to disable the following in table settings:

    “Show X entries” drop-down; “Info Block” from Display tab.
    Then, you can hide the table, leaving the filters above the chart like this:

    <style>
    .wpdt-c .wpDataTablesWrapper table {
    display: none !important;
    }
    </style>
    [wpdatatable id=1]
    [wpdatachart id=1]
    

    This is how you’d create a page where you’d have Chart #1 dependent on wpDataTable #1 so it follows filtering, and the table hidden using CSS.
    Let us know if you have any questions. Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to add date range filters to dynamic charts?’ is closed to new replies.