Comparing version 1.5.6 to 1.5.7
import Content from './Content'; | ||
export default class extends Content { | ||
setData(group: any, data?: any): void; | ||
} |
@@ -14,2 +14,4 @@ "use strict"; | ||
var Content_1 = require("./Content"); | ||
var d3 = require("d3"); | ||
var _ = require("lodash"); | ||
var default_1 = /** @class */ (function (_super) { | ||
@@ -20,4 +22,16 @@ __extends(default_1, _super); | ||
} | ||
default_1.prototype.setData = function (group, data) { | ||
//@ts-ignore | ||
var scaleClass = d3.scaleQuantile().domain(d3.extent(data, function (item) { return item['value']; })).range(['_vc_map_c0', '_vc_map_c1', '_vc_map_c2', '_vc_map_c3', '_vc_map_c4']); | ||
group.selectAll('g._item path').attr('class', function (d) { | ||
var tmp = _.find(data, { name: d.properties.name }); | ||
if (tmp) { | ||
var c = scaleClass(tmp['value']); | ||
return c; | ||
} | ||
return ''; | ||
}); | ||
}; | ||
return default_1; | ||
}(Content_1.default)); | ||
exports.default = default_1; |
@@ -182,3 +182,3 @@ "use strict"; | ||
this.colors = new Colors_1.default(this.Builder, this.Projection, this.props); | ||
this.colors.setData(this.AreaGroup); | ||
this.colors.setData(this.AreaGroup, this.props.colors); | ||
} | ||
@@ -185,0 +185,0 @@ if (_.has(this.props, 'points')) { |
{ | ||
"name": "vap", | ||
"version": "1.5.6", | ||
"version": "1.5.7", | ||
"description": "vap", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
299836
7759