Need help with dotted underlines

I’m currently trying out graphviz while working on an assignment, and I need to underline a node label with a dotted underline. I’ve tried just about everything and can’t seem to make anything work. The closest I got was to do something like this:

graph {
        node [class="dotted-underline" label="My Label"];

where my stylesheet looked like this:

.dotted-underline {
        text-decoration-line: underline;
        text-decoration-style: dotted;

I then output the diagram as an SVG, but then the label gets underlined with a solid underline and not a dotted one. Perhaps someone here knows what to do.

I believe your CSS ( text-decoration-style:) is valid for HTML, but not SVG

SVG has its own CSS properties and values. Some of them are similar to CSS properties for HTML.