Model in EJ 1 Angular Diagram

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,
          };
      }
    };

    Model_img1