I have an attribute table controlled by Atlas on map composer from QGIS. I need to adapt the table for each map and its features but from bottom. In other words, I need to make grow the table from bottom to top. By default table grows from top to bottom
If you want the table to dynamically change its location relative to other objects (including growing from the bottom), you have to:
- Set the "Reference point" to the bottom part.
- Set the dynamic height of
Position and Sizesettings using the following expression:
6.2 + 6.2 * (1 + aggregate(layer:='table2', aggregate:='count', expression:= fid))
Where 6.2 is the height of the cells with field names. The second value 6.2 is the height of cells with values that are multiplied by the number of these cells in the corresponding table.
- To make the tables not to overlap, you need to set
table1to dynamically change the Y-coordinate, using the expression:
279 - 6.2 * (1 + aggregate(layer:='table2', aggregate:='count', expression:= fid))
Where 279 is the
Y value of
table2 (bottom) with a slight shift.