Skip to content

Thanks to @Legion4444 for this contribution that makes all methods chainable! Details in #24

Also upgraded dependencies to the latest versions.

Enjoy!

Assets 2
Feb 6, 2018

@curran curran released this Aug 16, 2017 · 7 commits to master since this release

  • ES6 Fix makes this library work well with Webpack (#19)
  • Changed default interpolateResolution from 200 to 800 based on observation that 200 is not enough usually.
Assets 2

@curran curran released this Aug 3, 2017 · 14 commits to master since this release

Use Interpolation #16

Before (in Refugees StreamGraph):
image

After:
image

Before (in test/smallN.html):
image

After:
image

Assets 2

@curran curran released this Aug 3, 2017 · 28 commits to master since this release

Guarantee Labels are Inside Areas #14.

There was an issue where when the gaps between data points was large, the labels were not always ending up inside the area.

Before:
image

After:
image

Assets 2
1.0

@curran curran released this Jul 29, 2017 · 33 commits to master since this release

  • API change - function now returns an object with a toString method that generates an SVG transform.
  • Accessors #6
  • Padding #8
  • Algorithm improvements:
    • Compute maxHeight #9
    • Break inner test loop as soon as we know the rectangle will not fit
  • Expose number of iterations and raw coordinates in result
Assets 2

@curran curran released this Jul 29, 2017 · 59 commits to master since this release

Break out of the inner test loop as soon as we know the rectangle will not fit.

Assets 2

@curran curran released this Jul 27, 2017 · 67 commits to master since this release

This version uses the Bisection Method to search for the largest size label, using fewer iterations than before, and achieving more accurate results.

Now the algorithm uses a tolerance for accuracy of the height of the label bounding box in pixels, which is by default 0.01. Using this tolerance, the bisection method takes around 18 iterations on average to find a solution, as compared to on average around 100 with the previous linear search method, which was only accurate to a tolerance of 1.

Assets 2

@curran curran released this Jul 27, 2017 · 72 commits to master since this release

image

The algorithm is not efficient (linear scan of possible sizes), and the results are not precise (integer height increments are searched only), but it's basically working.

Assets 2
You can’t perform that action at this time.