Add multi-line label support
See original GitHub issueProject idea: This project would entail the implementation of multiline labels in Cytoscape.js. This would allow for manual breaking of lines using the newline character (i.e. \n
), or autobreaking based on some maximum line length.
Copied from later in the thread, as this is very important to note:
I’m going to note in this ticket, as it should have been mentioned here explicitly before, that the want for multiline labels itself is very likely indicative of design issues: If you find yourself thinking “Gee, I wish I could wrap these labels”, then you should consider that your labels themselves are too long.
Labels are meant to label elements, not to fully describe them. Long labels are – more often than not – bad UI. They clutter the graph and distract the user from the real content, the visual representation of the graph data.
It’s near trivial to clip labels with “…” and show more information elsewhere (e.g. a qtip, a panel, etc.). This, combined with time constraints and performance considerations, has made me hesitant to implement multiline labels.
Issue Analytics
- State:
- Created 10 years ago
- Comments:27 (15 by maintainers)
Top GitHub Comments
Use
\n
I’m going to note in this ticket, as it should have been mentioned here explicitly before, that the want for multiline labels itself is very likely indicative of design issues: If you find yourself thinking “Gee, I wish I could wrap these labels”, then you should consider that your labels themselves are too long.
Labels are meant to label elements, not to fully describe them. Long labels are – more often than not – bad UI. They clutter the graph and distract the user from the real content, the visual representation of the graph data.
It’s near trivial to clip labels with “…” and show more information elsewhere (e.g. a qtip, a panel, etc.). This, combined with time constraints and performance considerations, has made me hesitant to implement multiline labels.