This is a migrated thread and some comments may be shown as answers.

Margin for diagram?

1 Answer 84 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Kristoffer
Top achievements
Rank 1
Kristoffer asked on 10 Apr 2013, 09:39 AM
I manage to place my diagram on the edge of the view when zooming in and out a couple of times, moving the mouse at the same time (obviously changing the center point). I want my diagram nodes to never touch the edge of the view. How can I achieve this?

Please note that setting the diagram's Margin does not help.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 15 Apr 2013, 10:08 AM
Hello,

I am a bit confused about whether you need the shapes to be always in the view-port, or you just want to have a visual distance (let say about 5 px) between the shapes and diagram border?

If you just need a padding, you could remove the diagram border and place the whole diagram inside a border element. Then apply the necessary margin to the diagram.

If you want all shapes to be always in the view-port you will have to restrict the view-port (Position and Zoom properties) when panning and zooming.

Could you please elaborate a bit more on your scenario if the provided information does not help you?

Kind regards,
Hristo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Diagram
Asked by
Kristoffer
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or