Releases: riatelab/dicopal.js
v0.8.1
v0.8.0
-
New: Add 'Observable10' categorical palette from d3-scale-chromatic (fixes #9).
-
New: Add functionality to add custom palette, with
addPalette
, to the package (fixes #8).
Note that it allows to handle custom palettes in the same way as the built-in ones, including callinggetSequentialColors
andgetAsymmetricDivergingColors
on them, but for the latter to work on all cases (balanced, unbalanced, with central classe or not, etc.), one must have added at least 2 variations of the targeted diverging palettes, one with a central class (and at least a total of 5 colors) and one without (and at least a total of 4 colors). -
Fix
tsconfig.json
so it doesn't output unnecessary files indist
folder. -
Opt for a more compact representation of palettes (fixes #10). The minified dicopal file is now about 150 kB instead of 200 kB.
v0.7.0
-
New: Add
reverse
optional parameter togetAsymmetricDivergingColors
(Fixes #6). -
Fix
getAsymmetricDivergingColors
to return the correct number of colors whenbalanced
istrue
and 'classLeft' is less than 'classRight' and central class is false (Fixes #7). -
Add test suite, notably for
getAsymmetricDivergingColors
that tests the previously reported issues (#5, #6, #7) as well
as a few other assumptions. -
Update to rollup v4.
v0.6.4
- Fix values returned by
getAsymmetricDivergingColors
for unbalanced palettes (when requesting only one class on right or left side
and when the first declination of the original palette includes a central class) and for balanced palettes (on some case on the right side, when there is no need for interpolating). Fixes #5.
v0.6.3
v0.6.2
-
Fix values returned by
getAsymmetricDivergingColors
andgetSequentialColors
to always be hexadecimals (instead of mixed hexadecimals and RGB strings). -
Fix central class value for
getAsymmetricDivergingColors
when balanced istrue
(was sometimes included in a one-member array instead of being a single value).
v0.6.1
v0.6.0
-
Enable the creation of asymmetric diverging palettes (e.g. 3 colors for the left side and 4 colors for the right side), either
balanced (i.e. the perceptual distance between the colors is the same on both sides) or not. This is useful for creating
some choropleth maps and fixes #3. See the newgetAsymmetricDivergingColors
function. -
Enable the creation of interpolated sequential palettes with a custom number of colors (i.e. if a scheme exists only in
palette with 3-to-9 colors, it is now possible to create a palette with 12 colors). See the newgetSequentialColors
function.