Okay
  Public Ticket #2778006
Range selection
Closed

Comments

  • Hans started the conversation

    I use your plugin to display a chart from a CSV file. This file has 2 columns, DateTime and hPa:

    16-05-2021 15: 03,1001.2
    16-05-2021 15: 18,1000.3
    16-05-2021 15: 33,1000.1
    ...

    The CSV file increases with each new measurement, it is a growing list.

    I only want to show the 10 most recent rows (measurements) in the chart, can you tell me how to do that?

  • [deleted] replied

    Hi Hans

    Thank you for reaching out to us.

    At the moment, wpDataTables can only use date range filter which displays a fixed range date, so you wouldn't be able to display last x number of days in that way. If this was a MySQL table, you could include the DATEDIFF function, so the whole table automatically displays records from the past desired number of days.

    Then when you create the chart, in the wizard enable "Follow table filtering". That will make the chart follow the filtering of the table.

    If you want the charts to follow table filtering, then both the page and the chart need to be displayed on the same page. Also, for the filters to be shown, the table must be present as well.

    Now, there is a way to simply hide the table using CSS, leaving only the chart and the filters. Anyone who knows CSS will be able to still display the table if they were to inspect the page, and simply change the properties.

    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 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.

    I hope that helps

    Screenshots are from an older version of the plugin, but they still check out.


  • Hans replied

    Thanks for your comprehensive answer Blaženka.

    Unfortunately I can only work with CSV files so the otherwise fine plugin is not usable for me. I bought a license yesterday, can you tell me if and how I can cancel it with a refund?

    Kind regards,

    Hans.

  • [deleted] replied

    Hi Hans

    We are really sorry to hear that, if there is anything else we can do please do let us know.

    Please log into http://store.tms-plugins.com/ with the credentials you received in your e-mail when you purchased the plugin, then navigate to Purchases/wpDataTables, and if you're still within 15 days from purchase you will see the "Request Refund" button.

    6366610744.png

    If you don't see it, and you're using a screen with width lower than 1600px, you will need to scroll through that screen horizontally to see the button.

    After you submit a refund request, you will not receive any confirmation emails, but you will see that the button is grayed out:

    9137845838.png

    That means that the refund request is successfully submitted, and that you will receive your refund in 5 - 7 business days.



  • Hans replied

    Thanks for helping!

  • [deleted] replied

    You are most welcome, I wish I could do more.

    Have a wonderful rest of the day!