Select to view content in your preferred language

Dashboard table: last column too wide when expanding

640
3
Jump to solution
01-31-2024 07:40 AM
Labels (1)
YvanS
by
Occasional Contributor

Hi,

Is there a reason (and a solution) for the last column of a Dashboard table (the right-most column) to be too wide when that table gets expanded?

Instead of distributing the width across columns, it is the last one that gets wider.

Untitled.png

1 Solution

Accepted Solutions
AndresCastillo
MVP Alum

@YvanS 

What you are experiencing regarding the last column being to wide mainly occurs when the dashboard consists of a table element that takes up the full width of the page.

If we were to add other dashboard elements that reduce the overall table container's width, we can make the Fit to data option actually fit better.

The use-case for having a table take up the whole page width may be more feasible in a mobile view.

 

 

 

ArcGIS Dashboards, as of 07/30/205 provides two options in the UI config:

Fit to element width:
AndresCastillo_0-1753909332365.png

 

AndresCastillo_1-1753909532145.png



Fit to data

AndresCastillo_2-1753909698303.png

 

AndresCastillo_3-1753909757794.png




The ArcGIS Assistant json config has a tableSettings > layout key/property.
Fit to element width there is written as  fit-columns.
-Its the same as completely removing the layout key from the json.
Fit to data there is written as fit-data-stretch

There are other options available that you could experiment with, and see if it fits your data better:

fit-data-table

fit-data-fill

fit-data

We can reference these other options looking at another software's (Tabulator) docs:
https://tabulator.info/examples/6.3#fittodata

View solution in original post

0 Kudos
3 Replies
LeeMadison
Emerging Contributor

I had the problem on mobile dashboard with fit to data. It worked fine for the first category selected. Any change in filtering the column width stayed the same and characters were cut off.

The solution.

Open the dashboard in  Arcgis Assistant

    Find the widget you are trying to fix, in my case a table in a mobile view, then find the columnSettings parameter. For the column header title add  [U+200E] multiple times

"columnSettings": [
                    {
                        "title": "‎ [U+200E] ‎[U+200E]‎‎‎ [U+200E]Candidate‎[U+200E]‎ [U+200E]‎ [U+200E]‎ ",
                        "fieldName": "candidate",
                        "textAlign": "left",
                        "isBold": false,
                        "isItalic": false,
                        "isUnderlined": false
                    },

This effectively adds three hidden characters on either side of the title, forcing the column width.

The only issue is if you make a change to the widget and save it you will have to repeat the process., so get your widget functional first.

 

 

 

0 Kudos
AndresCastillo
MVP Alum

@YvanS 

What you are experiencing regarding the last column being to wide mainly occurs when the dashboard consists of a table element that takes up the full width of the page.

If we were to add other dashboard elements that reduce the overall table container's width, we can make the Fit to data option actually fit better.

The use-case for having a table take up the whole page width may be more feasible in a mobile view.

 

 

 

ArcGIS Dashboards, as of 07/30/205 provides two options in the UI config:

Fit to element width:
AndresCastillo_0-1753909332365.png

 

AndresCastillo_1-1753909532145.png



Fit to data

AndresCastillo_2-1753909698303.png

 

AndresCastillo_3-1753909757794.png




The ArcGIS Assistant json config has a tableSettings > layout key/property.
Fit to element width there is written as  fit-columns.
-Its the same as completely removing the layout key from the json.
Fit to data there is written as fit-data-stretch

There are other options available that you could experiment with, and see if it fits your data better:

fit-data-table

fit-data-fill

fit-data

We can reference these other options looking at another software's (Tabulator) docs:
https://tabulator.info/examples/6.3#fittodata

0 Kudos
AndresCastillo
MVP Alum

This is what the Fit to element width in UI option looks like with data center-aligned:

AndresCastillo_0-1753913032735.png

 

Here is the Fit to Data option with dummy elements to the left and right (allows resizing the table width), values left-aligned:

AndresCastillo_1-1753913219563.png

 

 

0 Kudos