Comments (5)
Thanks @davelandry. I'm not sure this module is exactly what I'm looking for. The two features I'm making use of from the full D3Plus library at the moment are:
- text-wrapping within a circle (i.e knowing that the width at which text should wrap changes as the y placement of the text changes)
- automatic detection of container bounds (so I don't have to calculate those widths myself)
Here's a simple example demonstrating how I'm currently using the library.
I tried to replicate this example using this module, which you can see here.
Am I correct in presuming that to finish this example I would need to calculate the width of the circle myself for each line of text? Or am I missing something?
from d3plus-text.
This module isn't currently as fully functional as the text wrapping from the main library, but those are both features we want to incorporate. I've created specific issues for those features. Don't be shy in creating new issues 😉
from d3plus-text.
Got it. Thanks @davelandry :)
from d3plus-text.
I'm using this module in the new d3plus-shape module. Take a look at these lines for an example enter/update/exit: https://github.com/d3plus/d3plus-shape/blob/master/src/rect.js#L104-L166
The biggest change is that the container element for the new d3plus-text module should be either an <svg>
or <g>
element (and not a <text>
tag). The module itself handles creating the <text>
tag along with all of the <tspan>
lines.
from d3plus-text.
Big update today. Renamed some functions and updated the README with 2 examples: one is a generic getting started and another one shows the resize function.
Are there any other specific questions/features that anyone would like to see documented at this time? I will keep this issue open as long as there are requested examples.
from d3plus-text.
Related Issues (20)
- add support for italic labels HOT 1
- An in-range update of d3-array is breaking the build 🚨 HOT 1
- Latest changes for 0.9.36 cause text not to render
- An in-range update of d3plus-common is breaking the build 🚨 HOT 1
- detect data from pre-existing DOM elements HOT 3
- Improve wrapping behavior - break mid-word
- textSplit should not filter out all emoji unicode chars HOT 1
- textbox split property should pass through into textWrap.
- D3 and existing SVGs HOT 1
- Pipe character "|" stripped from text
- textWrap issue with overflow and long text HOT 12
- Text is not rendered in IE11 HOT 3
- Click event on wrapped text not triggering on Safari
- add macron detection to textStrip
- Docs and examples seems to be offline HOT 2
- error: transition 1 not found HOT 3
- fontExists always returning false with custom fonts HOT 1
- implement tuncateWord method
- Japanese language should be included in noSpaceRange HOT 2
- add ability to selectively turn off fontExists caching as part of TextBox HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3plus-text.