Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

How do I specify a node's shape when I import a Node List?

0 votes
I'm able to import edges and nodes and get the relationships working properly, but I want to be able to have shapes other than rectangles. I think I gather that configurations are the path to this, but I haven't figured out how to specify, for example, that these nodes will be squares, these will be triangles, and these will be circles.

Thank you!
in Help by

1 Answer

0 votes
 
Best answer

Yes, configurations is the way to realize your requirement. Your node list data range needs to have one column that determines which shape type to use. That column will be imported as a custom property in yEd and thus can serve as mapping source for the required properties mapper configuration.

Lets suppose you have a (simple) spreadsheet that lists employees and their work department:

All devs should get one shape and all sales employees another shape.

To do that, you need to create an appropriate properties mapper confiuration. Since configurations can only be created for existing properties, you need to either import your spreadsheet once without using any configurations to get the desired custom properties or create a couple of dummy properties in an empty yEd document. Lets assume you did the latter and created two text properties "Name" and "Department":

 

With the custom properties created, go to the properties mapper and create an appropriate configuration:

 

As the final step, import the spreadsheet. Specify the desired data range

(for simplicity's sake only nodes are created) and choose the previously created configuration

 

All this should result in a diagram with two different shape types:

by [yWorks] (161k points)
selected by
Yes, but how do we retain the source-to-target relation in all of this? This produces a set of nodes with no edges.

Source-to-target relations are created by specifying an "Edge List" data range or an "Adjacency Matrix" data range (in addition to your "Node List" data range).

E.g.

 

Please see chapter Import of Excel Files in the yEd Manual for details.

I have followed every step and it creates the template, but when I apply, all my nodes are still the same. Is there a secret trick?
No, there is no secret trick. It works exactly as described above. If it does not work for you, you deviate from the instructions somewhere.
Legal Disclosure | Privacy Policy
...