Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Flowchart node size or emphasis #3183

Open
pineapplemachine opened this issue Jun 28, 2022 · 6 comments
Open

Feature request: Flowchart node size or emphasis #3183

pineapplemachine opened this issue Jun 28, 2022 · 6 comments
Assignees

Comments

@pineapplemachine
Copy link

Is your feature request related to a problem? Please describe.

Problem: There is no documented way to make some flowchart nodes more visually emphasized than others. Applying height styling results in misaligned arrows and misaligned text. Applying font-size or font-weight styling results in misaligned text, and truncated text when the larger text exceeds the size of the node shape.

Describe the solution you'd like

Ideally, every node would accept a percentage size factor that scales both the shape and the font by that amount, perhaps as a class style.

Practically, charts should probably just be more responsive to changes in height and font styling.

Or at the very least, a flag to make certain nodes emphasized would go a long way. These nodes should be roughly 150% the height and font size of other nodes.

Describe alternatives you've considered

Current styling options cannot effectively achieve this.

Additional context

image

graph TD
    A[Very Important Node]:::em1 --> B
    B[Less Important Node] --> C[Another Important Node]:::em2
    D[Also Important Node]:::em3 --> B
    C --> E[Important Node Redux]:::em4
    classDef em1 font-size:20px
    classDef em2 height:75px
    classDef em3 font-weight:bold
    classDef em4 font-size:20px,height:75px,font-weight:bold

Potentially related issues:

#3032
#2139
#1540
#1250

@pineapplemachine pineapplemachine added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Jun 28, 2022
@knsv
Copy link
Collaborator

knsv commented Aug 20, 2022

Good idea! I think it needs to be done before the styling but it could be done!

@knsv knsv removed the Status: Triage Needs to be verified, categorized, etc label Aug 20, 2022
@octokatherine
Copy link

I also am wanting to make the font size of a node bigger but am having issues with text being truncated

@pranavm2109
Copy link

pranavm2109 commented Nov 11, 2024

Hi, I ( @pranavm2109 ), and my teammates @Shahir47 , @nghtlinh would like to work on this issue!

@pranavm2109
Copy link

Quick clarification: if the font-size is set to 2em, then the box height dynamically readjusts itself, without having the need to introduce any additional emphasis parameter like the one that is requested. For instance, in the example code, if the height attribute for em4 in classDef em4 font-size:20px,height:75px,font-weight:bold is removed, then the box resizes itself without any truncation of text. So, could you please clarify the problem?

@pineapplemachine
Copy link
Author

Quick clarification: if the font-size is set to 2em, then the box height dynamically readjusts itself, without having the need to introduce any additional emphasis parameter like the one that is requested. For instance, in the example code, if the height attribute for em4 in classDef em4 font-size:20px,height:75px,font-weight:bold is removed, then the box resizes itself without any truncation of text. So, could you please clarify the problem?

The layout behavior seems to have changed since I originally created the issue. The layout is drastically different now than the previously shared screenshot in more ways than this. I haven't been following this project and I have no idea, I'm just here because I still follow this one issue, but it certainly looks like this was already fixed at some point in the last year and a half:

image

@pranavm2109
Copy link

@jgreywolf It seems like according to @pineapplemachine , this issue has been resolved somewhere in the last year and a half. If that is the case, could this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants