|
| 1 | +--- |
| 2 | +##### jQuery |
| 3 | + |
| 4 | +[Add DevExtreme to your jQuery application](/concepts/58%20jQuery%20Components/05%20Add%20DevExtreme%20to%20a%20jQuery%20Application/00%20Add%20DevExtreme%20to%20a%20jQuery%20Application.md '/Documentation/Guide/jQuery_Components/Add_DevExtreme_to_a_jQuery_Application/') and add Diagram resources (scripts and styles) to the page: |
| 5 | + |
| 6 | + <!-- tab: index.js --> |
| 7 | + $(function() { |
| 8 | + $("#diagram").dxDiagram({ }); |
| 9 | + }); |
| 10 | + |
| 11 | + <!-- tab: index.html --> |
| 12 | + <html> |
| 13 | + <head> |
| 14 | + <!-- ... --> |
| 15 | + <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script> |
| 16 | + <script src="https://cdn3.devexpress.com/jslib/minor_24_2/js/dx-diagram.min.js"></script> |
| 17 | + <link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/minor_24_2/css/dx-diagram.min.css"> |
| 18 | + <link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/minor_24_2/css/dx.light.css"> |
| 19 | + <script type="text/javascript" src="https://cdn3.devexpress.com/jslib/minor_24_2/js/dx.all.js"></script> |
| 20 | + <script type="text/javascript" src="index.js"></script> |
| 21 | + <script type="text/javascript" src="data.js"></script> |
| 22 | + </head> |
| 23 | + <body> |
| 24 | + <div id="diagram"></div> |
| 25 | + </body> |
| 26 | + </html> |
| 27 | + |
| 28 | + |
| 29 | +##### Angular |
| 30 | + |
| 31 | +[Add DevExtreme to your Angular application](/concepts/40%20Angular%20Components/10%20Getting%20Started/03%20Add%20DevExtreme%20to%20an%20Angular%20CLI%20Application '/Documentation/Guide/Angular_Components/Getting_Started/Add_DevExtreme_to_an_Angular_CLI_Application/'), then install `devexpress-diagram` (`npm i devexpress-diagram`), and add Diagram resources (scripts and styles) to the page: |
| 32 | + |
| 33 | + <!-- tab: app.component.html --> |
| 34 | + <dx-diagram></dx-diagram> |
| 35 | + |
| 36 | + <!-- tab: app.module.ts --> |
| 37 | + import { BrowserModule } from '@angular/platform-browser'; |
| 38 | + import { NgModule } from '@angular/core'; |
| 39 | + import { AppComponent } from './app.component'; |
| 40 | + |
| 41 | + import { DxDiagramModule } from 'devextreme-angular'; |
| 42 | + |
| 43 | + @NgModule({ |
| 44 | + declarations: [ |
| 45 | + AppComponent |
| 46 | + ], |
| 47 | + imports: [ |
| 48 | + BrowserModule, |
| 49 | + DxDiagramModule |
| 50 | + ], |
| 51 | + providers: [ ], |
| 52 | + bootstrap: [AppComponent] |
| 53 | + }) |
| 54 | + export class AppModule { } |
| 55 | + |
| 56 | + <!-- tab: angular.json --> |
| 57 | + // ... |
| 58 | + "styles": [ |
| 59 | + // ... |
| 60 | + "node_modules/devexpress-diagram/dist/dx-diagram.min.css", |
| 61 | + ], |
| 62 | + |
| 63 | +##### Vue |
| 64 | + |
| 65 | +[Add DevExtreme to your Vue application](/concepts/55%20Vue%20Components/05%20Add%20DevExtreme%20to%20a%20Vue%20Application/00%20Add%20DevExtreme%20to%20a%20Vue%20Application.md '/Documentation/Guide/Vue_Components/Add_DevExtreme_to_a_Vue_Application/') and add Diagram resources (scripts and styles) to the page: |
| 66 | + |
| 67 | + <!-- tab: App.vue --> |
| 68 | + <template> |
| 69 | + <DxDiagram> |
| 70 | + </DxDiagram> |
| 71 | + </template> |
| 72 | + |
| 73 | + <script setup> |
| 74 | + import 'devextreme/dist/css/dx.light.css'; |
| 75 | + import 'devexpress-diagram/dist/dx-diagram.min.css'; |
| 76 | + import { DxDiagram } from 'devextreme-vue/diagram'; |
| 77 | + </script> |
| 78 | + |
| 79 | +##### React |
| 80 | + |
| 81 | +[Add DevExtreme to your React application](/concepts/50%20React%20Components/05%20Add%20DevExtreme%20to%20a%20React%20Application/00%20Add%20DevExtreme%20to%20a%20React%20Application.md '/Documentation/Guide/React_Components/Add_DevExtreme_to_a_React_Application/') and use the following code snippet to create a Diagram component: |
| 82 | + |
| 83 | + <!-- tab: App.js --> |
| 84 | + import React from 'react'; |
| 85 | + |
| 86 | + import 'devextreme/dist/css/dx.light.css'; |
| 87 | + import 'devexpress-diagram/dist/dx-diagram.min.css'; |
| 88 | + |
| 89 | + import { Diagram } from 'devextreme-react/diagram'; |
| 90 | + |
| 91 | + function App() { |
| 92 | + return ( |
| 93 | + <Diagram> |
| 94 | + </Diagram> |
| 95 | + ); |
| 96 | + } |
| 97 | + |
| 98 | + export default App; |
| 99 | + |
| 100 | +--- |
0 commit comments