[classDef] Suggestion: extend classDef with default shape
See original GitHub issueIs your feature request related to a problem? Please describe. I’m frustrated when I use a class (for example “:::redis” which gives it a red colour) I need to manually shape each node. Example:
graph TD
classDef redis fill:#FF0000;
database1[(database1)]:::redis
Describe the solution you’d like To simplify using a syntax where the classDef also contains the shape
graph TD
classDef [(redis)] fill:#FF0000;
database1:::redis
Describe alternatives you’ve considered Copy paste a lot
Additional context
to:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:16 (12 by maintainers)
Top Results From Across the Web
Developers - [classDef] Suggestion: extend classDef with default ...
[classDef] Suggestion: extend classDef with default shape. ... (for example ":::redis" which gives it a red colour) I need to manually shape each...
Read more >How do I encapsulate an old-style class with a classdef class?
So it has a name--but how do I wrap a default constructor in an internal try-catch block to shove 'MATLAB:class:InvalidType' down a hole?...
Read more >Is it allowed to extend the Shape class? - java - Stack Overflow
I assume you're talking about the javafx.scene.shape.Shape class. If that's correct, then the documentation 1 says that you should not extend ...
Read more >WifiNetworkSuggestion.Builder - Android Developers
Specifies whether the suggestion represents a carrier merged network. ... If not set, defaults to false (i.e no app interaction required).
Read more >All Classes and Interfaces (Java SE 17 & JDK 17)
This class provides default implementations for the JFC Action interface. ... The common interface extended by all annotation interfaces.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have not given this much thought by now, but this could be done by adding a new attribute
shape
toclassDef
as well asstyle
which can also be used to apply styles to nodes. But it should use words as a value, not things likeshape:[()]
butshape:database
. What do you think?Being able to specify shape in classDef would be really helpful – it would allow specifying semantic classes of nodes and styling them separately. This would be very useful when aiming for a consistent “language” across multiple diagrams.