Reputation: 3179
My goal is to have a list of items each item has an image beside it whose size is proportional to some number from a dataset. For example, a list of countries which includes an image of a person whose size is proportional to the population.
How can I dynamically specify the size of an image based on data from the dataset? Two approaches which don't seem to work: (1) specify an expression for the image size (that doesn't seem to fit). (2) tell the image to fit container and set the size of the container to an expression.
I don't want to resort to storing 100 images of varying sizes. Are there any better solutions?
Upvotes: 0
Views: 2953
Reputation: 23789
The trick is to use the "Padding" values of a cell or an image. These can be set with an expression, and will be the white space around your image.
For example, set right padding to
=RowNumber("DataSet").ToString() &"pt"
and you will get an image that gets smaller on each row.
Hope this helps...
Upvotes: 1