Skip to main content
Jun 18, 2025 3:16 AM UTC
Solved

Can I create a color-coded org chart using API import in Lucid?

I would like to create a color-coded organizational chart using the standard import feature of the API, but the generated organizational chart does not have any colors. Could you please tell me the reason? The content of the JSON is as follows:

 

{
  "version": 1,
  "product": "lucidchart",
  "pages": [
    {
      "id": "page1",
      "title": "Org Chart Example",
      "dataBackedShapes": [
        {
          "id": "orgChart1",
          "type": "orgChart",
          "position": {
            "x": 150,
            "y": 150
          },
          "collectionId": "org-chart-data",
          "idField": "EmployeeID",
          "foreignKeyField": "SupervisorID",
          "nameField": "FullName",
          "roleField": "Role",
          "extraFields": [
            "Department",
            "Topping"
          ],
          "fill": {
            "type": "color",
            "color": "#800080"
          },
          "stroke": {
            "color": "#6f2131",
            "width": 3,
            "style": "solid"
          },
          "rounding": 10,
          "fieldStyles": {
            "EmployeeID": {
              "fill": {
                "type": "color",
                "color": "#FFCC00"
              }
            },
            "FullName": {
              "fill": {
                "type": "color",
                "color": "#00FF00"
              }
            },
            "Role": {
              "fill": {
                "type": "color",
                "color": "#0000FF"
              }
            },
            "Department": {
              "fill": {
                "type": "color",
                "color": "#FFA500"
              }
            },
            "Topping": {
              "fill": {
                "type": "color",
                "color": "#FF69B4"
              }
            }
          }
        }
      ]
    }
  ],
  "collections": [
    {
      "id": "org-chart-data",
      "dataSource": "org-chart-data.csv"
    }
  ]
}

Trevor JAnswer
Lucid product team
Jun 18, 2025 3:53 PM UTC

Hi Shu,

Org charts imported through the API don’t support any sort of style fields, so unfortunately there’s no way to add this programmatically. All valid fields are defined here: Data Backed Shapes

Could you tell us more about the workflow you are building? This would help us prioritize adding support for styles in the future.

Comments

Trevor JAnswer
Lucid product team
Jun 18, 2025 3:53 PM UTC

Hi Shu,

Org charts imported through the API don’t support any sort of style fields, so unfortunately there’s no way to add this programmatically. All valid fields are defined here: Data Backed Shapes

Could you tell us more about the workflow you are building? This would help us prioritize adding support for styles in the future.

Translate
shuAuthor
Jun 30, 2025 9:19 AM UTC

I am trying to create an organizational chart using the API. I believe it would be very convenient if we could add color coding or similar features.

Translate
Michael B
Lucid product team
Jun 30, 2025 3:15 PM UTC

Thanks Shu,

We agree that there is room for improvement with the org chart (and hierarchys in general). I have passed on your feedback for future consideration. We do not have an ETA for when these improvements will happen.

Translate