Okay
  Public Ticket #3245897
Placeholder values on charts
Closed

Comments

  • Tim started the conversation

    I saw a thread (https://tmsplugins.ticksy.com/ticket/1543638/) in the way past where it seemed that placeholders were not being passed through from Charts to their underlying data table. I have not seen any updates as to if this is working now or not?

    I have worked a bandaid in place to leverage the global VAR1 to take the place of current "state" variables like %CURRENT_POST_ID% by hooking into `wpdatatables_before_get_table_metadata` and reassigning the current post ID to the global VAR1. Ideally I would like the placeholders to work on charts as they do when the table itself is displayed. Anyway to implement this consistently without taking up the global vars?

  •  1,850
    Miloš replied

    Hi, Tim.

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    Yes, it is still the same logic as before, and i can't realistically say an ETA when that might be changed.

    The charts can not be filtered independently unless we do "follow table filtering" with source table data loaded on the same page.

    -

    The only way to filter a chart is to place the source table on the same page and activate "follow table filtering".

    Now, there are CSS workarounds to hide the table completely, then you can add VAR or other placeholders for table filtering through shortcode, and the chart will follow it on the page with table being completely hidden;

    there is also a workaround to have chart and table filters with the main table hidden.

    -


    Regarding hiding the table when it is on the same page as the chart, to have that filtering capability but hide the table, i can give you some custom CSS;

    We can hide the table using CSS, leaving only the chart and the filters. 

    Since you need to show the filters, a simple CSS like this would not be useful, because it'd hide the filters too:

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

    So, instead, we would first need to disable the following in 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 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.

    -

    That is the only way currently to use filtering on charts.

    We will do our best to add more options in the future.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.



    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