Skip to main content

 

When I ran the sample code below, a blank page was generated.

The sample data named org-chart-data.csv has already been stored in the data link.

Is it possible to create an organizational chart document from the organizational chart data via the API?

I apologize for the inconvenience, but I would greatly appreciate it if you could check this.

--------------------------------------------------------------------------------------------------------------------------------------------

sample-lucid-rest-applications/standard-import/demo-files/org-chart/unzipped-contents at main · lucidsoftware/sample-lucid-rest-applications · GitHub

{
  "version": 1,
  "product": "lucidchart",
  "pages": p
    {
      "id": "page1",
      "title": "Org Chart Example",
      "dataBackedShapes": d
        {
          "id": "orgChart1",
          "type": "orgChart",
          "position": {
            "x": 150,
            "y": 150
          },
          "collectionId": "org-chart-data",
          "idField": "Employee ID",
          "foreignKeyField": "Supervisor ID",
          "nameField": "Full Name",
          "roleField": "Role",
          "imageUrlField": "Image",
          "extraFields":
            "Email",
            "Cell Phone",
            "Building"
          ]
        }
      ]
    }
  ],
  "collections":
    {
      "id": "org-chart-data",
      "dataSource": "org-chart-data.csv"
    }
  ]
}


 

response

https://lucid.app/lucidchart/ab7edbd2-ddef-4ee3-b2f3-1e0843a99175/view

Hi ​@shu , thank you for contributing to the Lucid for Developers Community. This can happen because the request isn't formatted correctly. For generating a document from a data source, you need to use our Standard Import process, which requires packaging your files together first.

A quick note on your comment about the CSV being in a "data link": For the Standard Import process to work, the dataSource field in your JSON ("dataSource": "org-chart-data.csv") must refer to a file that is included inside the .lucid package. Our API is not accessing data sources that are already linked in your Lucid account in the product UI.

Let me know if you have any further questions and I’ll do my best to help.


Thanks to you, it has been successfully resolved.

I have one more question: Is it possible to create a Japanese version of the organizational chart, system architecture diagram, etc., through the API?

 


Reply