Our state of the art Gantt chart


Post by shimnx »

I saw the import function on the official website
https://bryntum.com/examples/gantt/msprojectimport/
But I wanted to add import functionality to Angular, so I didn't know how to use it.


Post by shimnx »

Can you provide an Angular import demo


Post by alex.l »

Hi shimnx,

We don't have msprojectimport demo in Angular currently. I don't see any framework related code in there. What problems do you have during your implementation? We could help you with issues, just post your app here.
If you need an assistance in development, please contact our sales for Professional Services, we will be glad to help you. https://www.bryntum.com/services

All the best,
Alex


Post by shimnx »

async importMPP(){
     
if ((this.gantt.widgetMap as any).input.files) { const { project } = this.gantt; // Import the uploaded mpp-file data (will make a new project and assign it to the gantt) // await this.importData(parsedJson.data); // // destroy old project // (project as any).destroy(); // // set the view start date to the loaded project start // this.gantt.setStartDate((this.gantt.project as any).startDate); // await this.gantt.scrollToDate((this.gantt.project as any).startDate, { block : 'start' }); // (this.gantt.widgetMap as any).input.clear(); // // remove "Importing project ..." mask // this.gantt.unmaskBody(); } }

Assuming I have the right data (parsedJson) I want to import on the front end, how should I import it next? Also, can you provide us with imported back-end services?
Thank you!

Attachments
advanced examples 3.zip
(154.29 KiB) Downloaded 41 times

Post by shimnx »

https://bryntum.com/examples/gantt/msprojectimport/
When I used the official example to import an MPP file, because some of our information had Chinese characters, the Chinese characters appeared garbled after the import


Post by alex.l »

Assuming I have the right data (parsedJson) I want to import on the front end, how should I import it next?

Sorry, not sure I've got your problem. We have Importer.js file in example you mentioned. There is a code that shows exactly that you are asking.
You need to create a project, load data into project and set that project to your gantt instance. Please check importData method. Second part of implementation is shown in importMPP method that you commented. Make sure you passed instances of gantt and project model correct.

Also, can you provide us with imported back-end services?

I am afraid it cannot be implemented in bounds of forum support. I've opened a feature request to implement this demo
https://github.com/bryntum/support/issues/4860

When I used the official example to import an MPP file, because some of our information had Chinese characters, the Chinese characters appeared garbled after the import

Does it garbled in the Gantt or you see it garbled already in your JSON file? Usually it's a problem of encoding. Please check your settings.

All the best,
Alex


Post by Maxim Gorkovsky »

Idea of the import demo is following: upload MSP file to the backend, run java app to read MPP file and convert it to the required JSON format, send it to client. Then client should process the data and create a project definition. There is nothing specific to the angular framework, just plain JS.

Speaking of Chinese character support, we haven't tested that. Could you send us a sample file so we could check at which stage problem occurs?


Post by shimnx »

Is there any relevant documents imported that you can show us


Post by alex.l »

Hi shimnx,

No, we don't have docs for that, only example of implementation with working classes. Better to check relevant websites, as example Microsoft Project and Java docs.

All the best,
Alex


Post Reply