At the moment, as far as I can tell, the way to get around duplicate names is to give a unique id e.g. 'name2' and then modify the name field in the people obj
people:
#duplicates
Henry2:
name: Henry
William2:
name: William
The only problem with this in the below code if person.name && !person.fullname you end up with the name written twice:
if (person.fullname) { // only make a second line when there is a fullname
label =
'<<table align="center" border="0" cellpadding="0" cellspacing="2" width="4">' +
'<tr><td align="center">' +
`${person.name || id}</td></tr>` +
'<tr><td align="center">' +
'<font point-size="10" color="#aaaaaa">' +
`${person.fullname}</font></td></tr></table>>` // put the fullname in the second line
} else {
label = person.name || id // if there is a name use that otherwise use id
}
At the moment, as far as I can tell, the way to get around duplicate names is to give a unique id e.g. 'name2' and then modify the name field in the people obj
The only problem with this in the below code if person.name && !person.fullname you end up with the name written twice:
https://github.com/rstacruz/kingraph/blob/ac6c8da851ae5354c308dcbfbbd8b9501054efa0/lib/render_graph.js#L76-L86
The solution I came up with is the following:
Really loving this project btw thanks