[Perspective table] - How to display two columns of row data in multiple lines?

How to display two columns of row data in multiple lines so that it would show data of row in multiple lines in small size devices.

I'm not sure I follow your question. Are you wanting to only show two columns of a larger dataset, or are you wanting to pivot 2 columns to be shown as rows?

Can you provide an example of what you're looking for?

You can't force the Table to render data "down" instead of "across". But you can manipulate your data to work this way:

Original data:

[
    {
        "name": "Row1",
        "value": 1
    },
    {
        "name": "Row2",
        "value": 2
    }
]

This displays in the Table in a manner such as this:

Modify your data to this shape:

[
    {
        "name": "Name",
        "Row1": "Row1",
        "Row2": "Row2"
    },
    {
        "name": "Value",
        "Row1": 1,
        "Row2": 2
    }
]

Then modify the column configurations of your Table to point to these new keys (name, Row1, and Row2), and disable your Header.


Keep in mind that you will need a new key shared among all objects for each of the "columns" you want displayed as rows.

1 Like