Hi,
This is my scenario: I have a Diagram and I do Diagram.BringIntoView(new Point(0,0), zoom, false), but when I do Diagram.AutoFit(new Thickness(0, 0, 0, 0), false), my Diagram back to the original position (without zoom) as if the function BringIntoView() doesn't work. I need that the Diagram will be in center and with zoom.
Thanks,
Maite.
This is my scenario: I have a Diagram and I do Diagram.BringIntoView(new Point(0,0), zoom, false), but when I do Diagram.AutoFit(new Thickness(0, 0, 0, 0), false), my Diagram back to the original position (without zoom) as if the function BringIntoView() doesn't work. I need that the Diagram will be in center and with zoom.
Thanks,
Maite.
5 Answers, 1 is accepted
0
Hi,
This is the designed and expected behavior of the AutoFit() method. By setting the Thickness parameter to 0 you actually define no Margin around the graph of your diagram. Thus defining default zoom. If you need to change the zoom of the diagram using the AutoFit() method you should define custom margin.
Regards,
Pavel R. Pavlov
Telerik
This is the designed and expected behavior of the AutoFit() method. By setting the Thickness parameter to 0 you actually define no Margin around the graph of your diagram. Thus defining default zoom. If you need to change the zoom of the diagram using the AutoFit() method you should define custom margin.
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Maite
Top achievements
Rank 1
answered on 22 Oct 2014, 09:15 AM
Hi,
This solution doesn't help me. AutoFit() with a thicnkess doesn't work. It doesn't do zoom.
Maite.
This solution doesn't help me. AutoFit() with a thicnkess doesn't work. It doesn't do zoom.
Maite.
0
Hi,
That is not completely true. The RadDiagram zooms and pans the viewport so that shapes are visualized. The only scenario that the AutoFit() method will not do anything is when the Thickness is greater than the visible area of the diagram.
Please take a look at the attached project to see the AutoFit() in action.
Regards,
Pavel R. Pavlov
Telerik
That is not completely true. The RadDiagram zooms and pans the viewport so that shapes are visualized. The only scenario that the AutoFit() method will not do anything is when the Thickness is greater than the visible area of the diagram.
Please take a look at the attached project to see the AutoFit() in action.
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Maite
Top achievements
Rank 1
answered on 24 Oct 2014, 11:35 AM
Hello,
I'm so sorry. I did not explain well. I need to do expand zoom. I saw that AutoFit() does the zoom more little. If the Diagram is more bigger than the Grid, AutoFit() does zoom, but if the Diagram is more little than de Grid, the zoom doesn't work.
Thanks!
Maite.
I'm so sorry. I did not explain well. I need to do expand zoom. I saw that AutoFit() does the zoom more little. If the Diagram is more bigger than the Grid, AutoFit() does zoom, but if the Diagram is more little than de Grid, the zoom doesn't work.
Thanks!
Maite.
0
Hi,
Could you please be more specific and clarify what exactly you have in mind when you say "expand zoom"? Also, which Grid you refer to?
Regards,
Pavel R. Pavlov
Telerik
Could you please be more specific and clarify what exactly you have in mind when you say "expand zoom"? Also, which Grid you refer to?
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.