Okay
  Public Ticket #2779210
Subscribed users
Closed

Comments

  • Ahmed Sleiman started the conversation

    Dear Team,

    let's say I have wpdata tables installed on my site with different charts and tables.

    is it possible to allow certain features only to subscribed users? like for example, only subscribed uses can export the data, or use the filters, etc.


    best regards.

  • [deleted] replied

    Hi Ahmed

    Thank you for reaching out to us.

    Unfortunately it is not possible to select specific features to be available or unavailable based on the user's role. 

    We do have an editing option where Users see and edit only own data where you can manage which data will be shown to which users, and Editor roles where you can specify which user roles will be able to edit the table.

    I hope this helps, do let us know if there is anything else we can assist you with.

  • Ahmed Sleiman replied

    Dear,

    I couldn't find any time-series chart in your documentation. I tried using the demo account and could create the chart but I had two issues:

    1) Dates are sorted from Newest-oldest (I tried changing the sorting in the table, it didn't reflect on the chart)

    2) since it's daily data of 2 years, so the dates are conjuncted, I was trying a way to make it look good. like maybe group days of the same month



  • [deleted] replied

    Hi Ahmed

    That is the default behavior of the charts engine, but if you need some custom solution you can check our documentation about wpDataCharts callbacks

    • Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. wpDataChart callbacks allow adding options that are available in Google Charts APIHighcharts API, and Chart.js API
    • All necessary resources are available in charts engines API (depends on which one you use). Every engine has a different approach to chart settings. In wpDataChart callbacks, you have to adopt those settings to the wpDataChart object (you can take a look at examples for each engine in our documentation, and also in the Support help center). A huge number of examples for any area of programming can be found on stackoverflow.com (typing your problem in google and at the end add "site: stackoverflow.com" and Google will search only that website). Also, a lot of examples of charts, chart settings, and customization can be found on jsffidle.net (typing in google for example "line chart highcharts jsffidle")
    • Please note that using hooks or wpDataTable and wpDataChart callbacks requires a certain level of programming skills and included support refers only to advice.


    When you are posting on ticket that are not yours or have questions or issues which are not related to the title of the active ticket can you please open a new one, and we will help you there. In that way, issues and questions which are related to different subjects will be in different tickets so other customers or our support agents can find it easily. Our policy is to have one issue or question per ticket because of the reasons that is described already.

    Thank you for understanding.



  • Ahmed Sleiman replied

    Hello again,

    can we add filters to charts? without having the table on the same page. just purely filters for charts


    regards.

  • [deleted] replied

    Hi Ahmed

    Unfortunately it is not possible to add just the filters without the table, but you will be able to hide the table from displaying and leave only the filters visible.

    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.