Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
BigFatDog committed Dec 9, 2018
2 parents cad6bbb + bc7b3fb commit 9165d4d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vizart-geo",
"version": "2.0.1",
"version": "2.0.2",
"description": "VizArt: Geo",
"main": "dist/vizart-geo.js",
"module": "dist/vizart-geo.esm.js",
Expand Down
18 changes: 16 additions & 2 deletions src/choropleth/api-color.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
const apiColor = state => ({
color(colorOptions) {
state._options.color = colorOptions;
state._color = state._composers.color(colorOptions);
if (!colorOptions) {
console.warn('color opt is null, either scheme or type is required');
return;
} else if (!colorOptions.type && !colorOptions.scheme) {
console.warn('invalid color opt, either scheme or type is required');
return;
}

if (colorOptions.type) {
state._options.color.type = colorOptions.type;
}

if (colorOptions.scheme) {
state._options.color.scheme = colorOptions.scheme;
}
state._color = state._composers.color(state._options.color);

const { _svg, _options, _c } = state;
_svg
Expand Down

0 comments on commit 9165d4d

Please sign in to comment.