Hi everyone. I have a question regarding diagram generation, is it possible to swing a generated diagram ? Thanks for helping.
No sure what to want to do ?
Change the format of generation. In other words, i want to pivot the diagram so i can have a clear view of the diagram. This pivot i want to apply it on large diagrams.
You have two options:
- put the page of the diagram in landscape (if possible best option)
- use the rotate() service (but you might loose in image quality)
You should use:
im.asImage().rotate(90)
im is a DRepresentation in your example so you need to convert is to a MImage first. You should also rename the variable im to rep for instance to have a better understanding when reading the template.
Thank you for clarifying this step. I have one more question can i set the width and rotate the diagram in the same time. Thank you for helping.
Yes, most MImage services returns MImage and can be chained:
.rotate(90).fit(500, 500)....
Thank you so much for helping.
1 Like