JSON for the flowdiagram

How do we get the JSON for the created flowchart and How do we get a flowchart using JSON?

1) When provide user a symbol pallete and a diagram space, he draws a flowchart and clicks submit. Can we save the JSON? If yes , Please share the sample

2) When we hardcode a JSON in TS file , how can we get a Flowchart when we browse the HTML? Please share an example


Thanks in advance.

4 Replies

SG Shyam G Syncfusion Team November 6, 2019 09:54 AM UTC

Hi SaiSravya, 
 
Query 
Response 
When provide user a symbol pallete and a diagram space, he draws a flowchart and clicks submit. Can we save the JSON? If yes , Please share the sample 
Yes, we can save the whole diagram as a JSON using the diagram SaveDiagram method and the same can be loaded using the diagram LoadDiagram method. Please refer to a sample below. 
 
 
 
When we hardcode a JSON in TS file , how can we get a Flowchart when we browse the HTML? Please share an example 
Could you please share us more details such as elaborate your requirement in detail with screenshot or video. 
 
 
Regards, 
Shyam G 



SA SaiSravya November 6, 2019 10:49 AM UTC

I am unable to run the code. Attached the screenshots. Please do rectify it

Attachment: Error1_bfa0b7d.rar


SA SaiSravya November 6, 2019 11:01 AM UTC

when i am trying to import i am facing issue. Could you please help me on this


Attachment: packageError_aca67da5.rar


SG Shyam G Syncfusion Team November 7, 2019 12:21 PM UTC

Hi SaiSravya, 

The toolbar component packages is not installed in your machine. So only the issue occurs. Please use the below command to install toolbar packages. 

Command: npm install @syncfusion/ej2-angular-navigations --save

Please refer to an help documentation for more details 


Regards, 
Shyam G 


Loader.
Up arrow icon