My goal is to create custom shapes for a storyboard that will export to a csv file for further manipulation. I have not found out-of -the-box shapes that will export image data, so I’m trying to create a custom shape that will.
I also need the images to be visible in shapes within lucidchart ,and easily input from files not urls.
My attempts with the following code have failed to show images in a shape at instantiation and with data input.
Is it possible to reach my goal? If so, what can be altered in this to make it work?
{
"properties": "
{
"name": "ImageName",
"default": "clockwise-one-arrow.png",
"label": "Image name",
"type": "file"
}
],
"images": {
"logo": {
"type": "file",
"path": "{{=@ImageName}}"
}
},
"style": {
"fill": {
"type": "image",
"ref": "logo"
}
},
"geometry":
{
"type": "rect"
}
]
}
Hi KevinTP, I’m Alec, I’m a developer at Lucid. I admit that I’m not an expert with our Custom Shape definitions, but a part of our documentation found here might have the answer you’re looking for.
From that section of our docs, it would appear that you can make your use case work by skipping the middle-man of trying to define your image name in properties, and instead reference it directly like so:
{
images: {
"myImage": {
type: 'file'
path: 'clockwise-one-arrow.png'
}
}
style: {
fill: {
type: 'image'
ref: 'myImage'
mode: 'stretch'
}
stroke: { color: '#00000000', width: 1 }
rounding: 0
}
geometry: e
{ type: rect }
]
}
Hopefully this works for your use case, let us know if you have any further questions!
Reply
Create an account in the community
A Lucid account is required to interact with the community. You will be redirected to the Lucid app to create an account.
Log in to the community
A Lucid account is required to interact with the community. You will be redirected to the Lucid app to log in.
Login with SSO
Log in with LucidEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.