Skip to main content

I have created a LucidChart package that has custom shapes, data connectors and extension editor.  My custom package adds custom data fields to shapes and that is working great.

I need similar capability to add custom data to either the document or a page.  My gut says the feature exists and is probably staring at me in the documentation but I honestly am not seeing it.  

On a similar note, if the feature exists, how can I, as a standard user in LucidChart, see or manage the custom data of the document and/or page in the UI?

Thanks, Dan

Hi PromitaDan, I’m Alec, one of the API engineers at Lucid. I’m attaching a screenshot to hopefully help answer your question. In the upper right corner of the toolbar, just above the canvas, you’ll notice I’ve selected an icon that if you hover over should say ‘Contextual Panel’. Clicking into that should let you see the data panel just like the screenshot, and add custom data to your page.

 

Hope this helps!

 


Thanks Alec.  That is very helpful.  I now see how a user can add/edit Page data.

Does a similar feature exist for the document as a whole?  Do “documents” have “data” that a user can edit/modify, etc?


Related question:  what is the difference between:

activePage.shapeData.set('q_data', JSON.stringify(q_data));
activePage.properties.set('q_data', JSON.stringify(q_data));

thanks, Dan


So the data panel I helped you navigate to manages Custom Data. Custom Data in a lucid document can exist at various different levels - it can be associated with a page, a group, a layer, a shape, or a line. Unfortunately, Custom Data does not exist at a document level but Collections do. If you import a data set to a document as a csv or excel doc (through the data panel on the left toolbar, not the one I showed you before), it becomes a collection. That data can be edited by a user manually on the document or programmatically through the sdk, and would probably be the best solution to storing data and making it accessible in all pages of a lucid doc.

As for your second question, page properties are not exposed in the UI, and are used to store things pertaining to the page, unlike shape data which is exposed in the UI and can be linked to shapes on the canvas.


Reply