Questions tagged [tspan]
55 questions
2
votes
1 answer
Animating wrapped text in d3
Hmmm. Now that I've figured out how to wrap SVG text dynamically using TSPANs (see Auto line-wrapping in SVG text), trying to animate it has me stumped. I'm basing it off the Zoomable Treemap example from Mike Bostock.
My text wrapping code is…

MSC
- 3,286
- 5
- 29
- 47
1
vote
1 answer
Multiline SVG Text - Letter Spacing Issue
I am writing/animating multiline SVG text using the tspan selector. Unfortunately every line (besides the first) has the beginning letters crammed towards the front. I have tried letter spacing and kearning, neither of which has helped. I need to…

Devon
- 11
- 1
1
vote
1 answer
Highlight inside of svg
I want to highlight only the inside not all the but the follow code not working. The filter background color has fill all the node
1
vote
0 answers
SVG tspan find the pixel width and height
I have some text paragraphs in Unicode.
What I want to do is to convert these paragraphs into images.
The process flow I chose was to convert the text into SVG first and then to png.
I am using python for this and do not use any third-party library…

XYZ
- 310
- 2
- 12
1
vote
2 answers
Use Right to Left Text in an SVG Text Element Using JavaScript
I am working with a JS charting library that I did not write and I would like to add some functionality to insert HTML content in the element of an SVG graphic. The reason is that it contains a mix of RTL and LTR text:

Rob Gravelle
- 325
- 5
- 23
1
vote
2 answers
How to fix assignment error using ode45 in MatLab (line 488 of ode45 function)
I'm trying to write a script that uses ode45 in order to integrate the equations of motion of a satellite on an hyperbolic trajectory near Mars.
I need to integrate the entire passage around the planet: starting from SOI radius (576000km) and…

Giamarcus15
- 11
- 4
1
vote
1 answer
SVG: text indentation/space issue on last tspan in group of tspan elements
This code inserts white space on the last of a group of tspan elements, causing the last line of text to fall out of alignment (on the x-axis).
If you add/remove tspan elements from the group, the last line of text always exhibits this…

Crashalot
- 33,605
- 61
- 269
- 439
1
vote
1 answer
SVG: add a line-break to text without tspan
Is there a way to create a line-break on some text in an SVG text block, without using tspan's?
My client wants to be able to add content into an Advanced Custom Field editor in Wordpress, add a < br > or < p >, and it add that line-break to the…

user2115227
- 147
- 2
- 9
- 24
1
vote
0 answers
Using javascript, how do I copy svg tspan elements inside an svg text element into a different text element?
I have an svg text element with two tspan elements. It looks like this.
D
b
I have a 2nd empty text element which looks like…

Christopher Gaston
- 491
- 2
- 6
- 18
1
vote
1 answer
ng-bind-html in a svg text tag do not display tspan in firefox and IE
I can't succeed in build an svg with angularjs when tspan are load from ng-bind-html attribute, Firefox and IE do not display them.
My controler look like that :
$scope.titlenotok="svg not ok";
var content = '

Steve Giraud
- 31
- 4
1
vote
0 answers
D3js - tspan update not working on Chrome
Chrome is not rendering if I update tspan dynamically with text():
....

user1949470
- 11
- 2
1
vote
2 answers
jQuery: write html symbols in SVG tspan
I'm trying to write HTML symbols (like °) in a TSPAN element with jQuery.
In a simple SPAN it's easy:
$('#span_id').html('°');
With the TSPAN this way doesn't work, if I use
$('#tspan_id').html('°');
nothing is printed out.
With…

Max Markson
- 800
- 1
- 19
- 34
0
votes
0 answers
TCPDF - SVG - How to align encapsulated tspans in a container tspan
I'm using TCPDF 6.3 and when printing I can't get the same result as on screen for my SVG. On the screen, the nested tspans are organized natively in inline-block, so they remain well aligned and placed one after the other regardless of the value of…

Philou
- 1
- 1
0
votes
0 answers
d3js remove last tspan node
I have something similar to this
var textBox = somecontainer.append('text')
...
textBox.append('tspan').text('First ')
textBox.append('tspan').text('Second ')
textBox.append('tspan').text('Third ')
...
textBox.append('tspan').text('nth ')
Later on…

Huqe Dato
- 235
- 1
- 16
0
votes
1 answer
How do you access a tspan inside a SVG text tag?
I have imported an SVG using and I'm trying to access the innerText, because I need to change it, but when I add an id="test" to the tspan using document.getElementById('test'); yields no results whatsoever...
How can I solve this…

Munchkin
- 857
- 5
- 24
- 51