rstacruz / kingraph

Plots family trees using JavaScript and Graphviz
439 stars 86 forks source link

Is it possible that `table` or `polygon` (if exported to SVG) get round corners similar to `border-radius`? #21

Open gusbemacbe opened 10 months ago

gusbemacbe commented 10 months ago

Hello!

I would like to add the round corners for the HTML table element or SVG polygon element. I made a small test on a YAML file and it did not work:

styles:
  global:
    fillcolor: "#CCCCCC"
    strokeWidth: 4
    strokeLineCap: round
    strokeLineJoin: round
  male:
    color: "#2E3482"
    fillcolor: "#E1E1FF"
  female:
    color: "#E20042"
    fillcolor: "#FEF2F6"

The HTML table element does not have depreciated attributes similar to border-radius. The SVG polygon element has attributes, but they are not similar to border-radius because if you add the zero for the stroke-width attribute even if with stroke-linecap and stroke-linejoin attributes with the value round, you will not see the round corners. The addition of style for both these elements will not work either.

gusbemacbe commented 10 months ago

Cc: @AlexanderWillner and @vorburger