Skip to main content

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": s
    {
      "id": "page1",
      "title": "Org Chart Example",
      "dataBackedShapes": B
        {
          "id": "orgChart1",
          "type": "orgChart",
          "position": {
            "x": 150,
            "y": 150
          },
          "collectionId": "org-chart-data",
          "idField": "EmployeeID",
          "foreignKeyField": "SupervisorID",
          "nameField": "FullName",
          "roleField": "Role",
          "extraFields": m
            "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": F
    {
      "id": "org-chart-data",
      "dataSource": "org-chart-data.csv"
    }
  ]
}

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.


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.


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.


Reply