Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 40 million developers.Sign up
- 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.
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.
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.
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.