svgmap 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/demo/es6/package-lock.json +438 -421
- package/demo/es6/package.json +2 -2
- package/dist/svgMap.js +13 -8
- package/dist/svgMap.min.js +1 -1
- package/package.json +4 -4
- package/src/js/svgMap.js +13 -8
package/demo/es6/package.json
CHANGED
package/dist/svgMap.js
CHANGED
|
@@ -57,6 +57,9 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
57
57
|
|
|
58
58
|
// Decide whether to show the flag option or not
|
|
59
59
|
hideFlag: false,
|
|
60
|
+
|
|
61
|
+
// Whether attributes with no data should be displayed
|
|
62
|
+
hideMissingData: false,
|
|
60
63
|
|
|
61
64
|
// The default text to be shown when no data is present
|
|
62
65
|
noDataText: 'No data available',
|
|
@@ -1132,14 +1135,16 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
1132
1135
|
function (key) {
|
|
1133
1136
|
var item = this.options.data.data[key];
|
|
1134
1137
|
var value = this.options.data.values[countryID][key];
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1138
|
+
if ((value !== undefined && this.options.hideMissingData === true) || this.options.hideMissingData === false) {
|
|
1139
|
+
item.floatingNumbers && (value = value.toFixed(1));
|
|
1140
|
+
item.thousandSeparator &&
|
|
1141
|
+
(value = this.numberWithCommas(value, item.thousandSeparator));
|
|
1142
|
+
value = item.format
|
|
1143
|
+
? item.format.replace('{0}', '<span>' + value + '</span>')
|
|
1144
|
+
: '<span>' + value + '</span>';
|
|
1145
|
+
tooltipContentTable +=
|
|
1146
|
+
'<tr><td>' + (item.name || '') + '</td><td>' + value + '</td></tr>';
|
|
1147
|
+
}
|
|
1143
1148
|
}.bind(this)
|
|
1144
1149
|
);
|
|
1145
1150
|
tooltipContentTable += '</table>';
|