Okay
  Public Ticket #2837783
Hide Table that Chart is linked to
Closed

Comments

  •  2
    Gary started the conversation

    I would like to display a chart that is tied to a table with placeholders however, I do not want to display the table. How can I view the chart without seeing the table?

  • [deleted] replied

    Hi Gary

    Thank you for reaching out to us.

    If you need to show the filters, a simple css like this would be enough:

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

    But if you need to show the filters, you would first need to disable the following in table settings:

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

    2852344743.png

    "Enable main search block" from Sorting and Filtering tab:

    3844294247.png

    And "Table Tools" from Table Tools tab:

    6988162559.png

    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]
    

    And that's it. 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.

    The screenshots are from an older version of wpDataTables, but they still apply.