Okay
  Public Ticket #3226918
Table display
Closed

Comments

  •  2
    Martin started the conversation

    Hi there,

    I have a very small table which displays key facts about a country. It is currently horizontal, like this:

    Population:Area in km2:Population density (People per km2):64,408,800554,020116

    but I would like the headers to be vertical, like this:

    Population: 64,408,800
    Area in km2:554,020
    Population density (People per km2):  116

    Is that possible?

    FYI, the the table is also used to select a country so that WPdatacharts then only displays a chart for that one country using the follow table filtering function.

    thanks!

    Martin

  •  2
    Martin replied

    Attachment shows better the current table display.

    thx M

    Attached files:  Screenshot 2023-02-08 at 12.40.44.png

  •  1,708
    Miloš replied

    Hi, Martin 

    Thanks for reaching out to us.

    I see what you mean, you would need to "reverse" the position between headers and rows,

    to have headers on the side.

    Pivoting the table is not a built-in option of wpDataTables, but please feel free to check out this ticket:

    https://tmsplugins.ticksy.com/ticket/3042192/

    One of our customers made a short tutorial for all customers that want to use the Pivot feature with wpDataTables. 

    I hope that helps.

    -

    If you wish to see a built-in option for this in the future, please don't hesitate to

    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.

    -

    2. The only alternative, "kind of similar" visual layout that i could suggest, without having a PIVOT workaround,

    could be if you wish to try the Responsiveness feature, and have all the rows always "expanded", then you might achieve the headers on the left , and cell data on the right, with a "colon" between them (:).


    This is a bit of an improvised solution, 

    we will add two Conditional Formatting rules to your first "responsive column" (that has the + expander symbol).

    - For this example, I have this table, and we will make a two-column responsive layout for mobile screens. ( we will select the first two columns to be visible on mobile screens, and hide the others)

    3159265571.png

    - Basically, with the plugin built-in responsive "hidden columns" design, there is a CSS class we named "detail-show", that gets "triggered", whenever we click on the + symbol, 

    and then all the hidden data gets revealed.

    - Now, If we create two conditional statements in the column that has the"+" symbol ( the first column shown on mobile screens); 

    we can "add this class" to the rows, as long as the cell value isn't empty;

    but also another rule to say : if the cell is empty,  also add the same CSS class to that case.

    9371729033.png

    - So, basically, this improvised solution will look as if you pressed the + sign on all the rows by default.

    ( In case if you need to auto-expand only the rows which are not empty  - you can simply remove the second rule)

    - Here is a screenshot of the resulting table:

    2334750878.png



    3. For using the table to filter only one Country for a chart,

    it seems that you already have that solved, or did you need any advice for this as well?

    Thank you

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    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

  •  2
    Martin replied

    Many thanks Milos,

    I am liaising with developers about the best way of doing this and we have not decided yet. But you put forward two ingenious solutions so I am very grateful!

    Regards

    Martin

  •  1,708
    Miloš replied

    Hi, Martin.

    Sorry for replying late.

    We had a break during our national holiday which additionaly slowed down the response times.

    You are very welcome, i am happy to provide any possible ideas for workarounds.

    These improvised solutions require some custom work from your end, but i hope it will be useful.

    Don't hesitate to reach out to us with new tickets for any new questions.

    Thanks.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    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