Skip to content

React style assignment <dot:td style={styleVar} > #1085

Answered by kamiazya
wcoolidge asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Thank you for finding and using ts-graphviz! I'm glad to hear that you're finding the HTML-Like Label rendering feature in @ts-graphviz/react useful. This is one of my favorite features as a developer, as it provides fine-grained control over the appearance of Graphviz graphs directly from TypeScript.

Regarding your question about setting styles for dotted, dashed, or solid lines using a styleVar variable in <dot:td style={styleVar}>, here are a few suggestions:

Correct Way to Set Styles:

It seems there might be an issue with how styleVar is being used. Instead of setting the style directly in the JSX tag like <dot:td style={styleVar}>, you should ensure that the style variable is cor…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kamiazya
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants