Login
Register
Feature Requests
Questions
Unanswered
Tags
Ask a Question
yEd Home page
Welcome to yEd Q&A!
Here you can ask
questions
and receive answers from other members of the community and yEd developers. And you can tell us your most wanted
feature requests
.
Most popular tags
import
node
export
edge
labels
nodes
bug-report
layout
excel
groups
graphml
yed
edges
palette
properties-mapper
automatic-layout
svg
swimlane
text
custom-properties
properties
error-report
group
pdf
linux
hierarchical-layout
macosx
label
bpmn
html
bug
kb
print
installation
uml
settings
ui
url
label-placement
graphmlviewer
resize
grouping
printing
color
line
save
windows
entity-relationship
background
java
gedcom
link
license
yed-live
positioning
arrow
flowchart
image
open
family-tree
font
error
tree
copy
graph
icon
default
arrows
select
size
64-bit
structure-view
lines
diagram
description
data
search
feature
neighborhood-view
paste
tooltip
xml
shape
move
selection
edit
fit-node-to-label
file-format
icons
visio
custom
editing
gui
menu
symbols
import-excel
font-size
ubuntu
word
alignment
Categories
All categories
Feature Requests
(644)
Help
(2.6k)
Finished Features
(29)
How to truncate edge label
0
votes
I have a number of edge labels that have multiple lines of text. I would like to be able to just display the first line. Right now, it would seem, I can either show everything or hide the label altogether.
edge-label
truncate
asked
Mar 23, 2015
in
Help
by
SKAh
(
130
points)
recategorized
Mar 24, 2015
by
thomas.behr
Your comment on this question:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
1
Answer
+1
vote
Create a custom text property for edges ("Edit" -> "Manage Custom Properties") that stores the complete text. See
Properties of Graph Elements
in the
yEd Manual
for additional information.
Create a property mapping ("Edit" -> "Properties Mapper") that transforms your custom text property into edge label text. (See
Mapping Custom Properties to Visual Properties
in the
yEd Manual
for additional information.)
To extract only the first line from your text property, use "Regular Expression" as "Conversion" type with "Pattern" value "(?s)(.*?)\n.*" and "Replacement" value "$1" (both without the quotes):
(This assumes plain text, extracting the first line from HTML formatted text is much more complicated.)
answered
Mar 24, 2015
by
thomas.behr
[yWorks]
(
138k
points)
edited
Mar 24, 2015
by
thomas.behr
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
Legal Disclosure
|
Privacy Policy
...