The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How to perform zoom out of diagram programmatically using some of the methods of properties of the diagram? I would appreciate some sample of the code.
SGShyam G Syncfusion Team January 21, 2020 06:05 AM UTC
Hi Jiway,
Please use the diagram zoomTo method to perform zoomIn and zoomOut operations programmatically. We have created a sample in which we have performed zoomIn and zoomOut operations at button click. Please refer to a code example and the sample below.
Code example:
function ZoomIn() {
let zoomOptions = {
type: "ZoomIn",
//Sets the factor by which we can zoom in or zoom out
zoomFactor: 0.5
}
//zoomin the diagram
diagramInstance.zoomTo(zoomOptions)
}
function ZoomOut() {
let zoomOptions = {
type: "ZoomOut",
//Sets the factor by which we can zoom in or zoom out