XlsIO Image Marker, fixed height not width
I need to set the image %Reports.Image;size:60 will set image width to 60 and height is not fixed, but I need to do opposite, I need to define height not width, it should be calculated itself by ratio. Is there any way to do that ?
SIGN IN To post a reply.
3 Replies
AV
Abirami Varadharajan
Syncfusion Team
September 3, 2019 05:33 PM UTC
Hi John,
Greetings from Syncfusion.
While applying marker with image using size argument, you need to specify both height and width. When width value is only given, it considers the width value as height’s value. So, we request you to specify the width by using below calculation to achieve your requirement.
Code Example:
|
float height = 80;
float width = (float)(height * height / 100.0);
worksheet["A4"].Text = "%Reports.Image;size:" + width + "," + height; |
Please refer to below documentation to know about the syntax of Image arguments and its purpose in detail.
Documentation Link: https://help.syncfusion.com/file-formats/xlsio/working-with-template-markers#bind-from-collection-objects-with-images
Regards,
Abirami
Hi John,
Greetings from Syncfusion.
While applying marker with image using size argument, you need to specify both height and width. When width value is only given, it considers the width value as height’s value. So, we request you to specify the width by using below calculation to achieve your requirement.Code Example:
float height = 80;float width = (float)(height * height / 100.0);worksheet["A4"].Text = "%Reports.Image;size:" + width + "," + height;Please refer to below documentation to know about the syntax of Image arguments and its purpose in detail.
Documentation Link: https://help.syncfusion.com/file-formats/xlsio/working-with-template-markers#bind-from-collection-objects-with-imagesRegards,Abirami
that defeats the purpose of template marker, first I have to find the cell that has the required image marker, then replace its text for height and width.
Why not just place the image there by code instead of using marker.
You should add the auto ratio feature in future release.
AV
Abirami Varadharajan
Syncfusion Team
September 4, 2019 02:11 PM UTC
Hi John,
We consider your requirement for “Applying marker image with auto ratio” and logged a feature report for the same. We will include the implementation in our upcoming release which will be available by end of September 2019.
You can track the status of the feature through the following feedback.
Feedback Link: https://www.syncfusion.com/feedback/8656/support-to-apply-marker-image-with-auto-ratio
Regards,
Abirami.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
JO John
- Aug 31, 2019 03:27 AM UTC
- Sep 4, 2019 02:11 PM UTC