Model

19 Jul 20171 minute to read

The Diagram model represents the data to render the Diagram and to manipulate the Diagram elements. The following code illustrates how to define Diagram model.

  • HTML
  • //Creates diagram
    <div>
    <ej-diagram  id="diagramCore" width="100%" height="490px" [pageSettings]="pageSettings">
    </ej-diagram>
    </div>
  • JAVASCRIPT
  • import { Component } from '@angular/core';
    
    @Component({
      selector: 'ej-app',
      templateUrl: 'app/components/diagram/default.component.html'
    })
    export class ModelComponent {
        pageSettings: Object;
        constructor() {
            this.pageSettings = {
              pageWidth: 2000,
              pageHeight: 2000,
          };
      }
    };