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
labels
edge
nodes
bug-report
layout
excel
groups
graphml
yed
properties-mapper
edges
palette
svg
automatic-layout
swimlane
custom-properties
text
properties
error-report
pdf
group
linux
hierarchical-layout
macosx
bug
label
html
bpmn
kb
print
installation
uml
settings
family-tree
resize
color
label-placement
ui
grouping
url
yed-live
graphmlviewer
line
windows
import-excel
entity-relationship
printing
java
gedcom
background
save
arrow
flowchart
link
image
select
error
license
positioning
structure-view
font
open
icon
lines
data
search
default
arrows
tree
copy
size
graph
64-bit
diagram
neighborhood-view
feature
fit-node-to-label
description
paste
font-size
icons
xml
symbols
alignment
tooltip
custom
shape
move
selection
editing
edit
-
file-format
ubuntu
word
visio
user-defined-symbols
Categories
All categories
Feature Requests
(700)
Help
(2.9k)
Finished Features
(30)
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]
(
161k
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
...