Skip to content

Commit

Permalink
compiles v0.9.20
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Aug 19, 2017
1 parent 01030ed commit dfe5ec2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[width]: 700
[height]: 75

# Wrapping SVG Text with TextBox
# Wrapping SVG Text

Without a doubt, the most commonly requested part of the [d3plus-text](https://github.com/d3plus/d3plus-text) module is [textBox](http://d3plus.org/docs/#TextBox), which is used for intelligently wrapping SVG text. At it's core, it accepts an array of data points containing `"text"` keys and adds them to the page using a set of defaults. Here is a data array containing 3 different sentences to be wrapped:

Expand All @@ -24,4 +24,4 @@ new d3plus.TextBox()
.render();
```

While [textBox](http://d3plus.org/docs/#TextBox) comes with some helpful defaults, this example shows how any of the methods can be overridden with static values or accessor functions. For more information on how the [textSplit](#textSplit) function splits strings, specifically in languages that don't use spaces, check out [this blog post](https://blog.datawheel.us/english-is-not-chinese-69b43959bb47).
While [textBox](http://d3plus.org/docs/#TextBox) comes with some helpful defaults, this example shows how any of the methods can be overridden with static values or accessor functions. For more information on how the [textSplit](http://d3plus.org/docs/#textSplit) function splits strings, specifically in languages that don't use spaces, check out [this blog post](https://blog.datawheel.us/english-is-not-chinese-69b43959bb47).
2 changes: 1 addition & 1 deletion example/resizing-text.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[width]: 450
[height]: 100

# Text Wrapping Dynamic Font Resizing to Fit Container
# Resizing Text to Fill Container

A useful method when using text to label shapes (like in a [tree map](http://d3plus.org/examples/d3plus-hierarchy/getting-started/)) is the [fontResize](http://d3plus.org/docs/#TextBox.fontResize) method of the [textBox](http://d3plus.org/docs/#TextBox) class. When set to `true`, the text will attempt to scale up or down it's font-size to best fit the containing shape.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3plus-text",
"version": "0.9.19",
"version": "0.9.20",
"description": "A smart SVG text box with line wrapping and automatic font size scaling.",
"main": "build/d3plus-text.js",
"jsnext:main": "index",
Expand Down

0 comments on commit dfe5ec2

Please sign in to comment.