@axdspub/axiom-charts 1.0.2 → 1.0.6
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/library/Libraries/axiom/index.js +89 -339
- package/library/Libraries/axiom/index.js.map +1 -1
- package/library/axiom-charts.d.ts +3 -2
- package/library/browser.js +198 -594
- package/library/browser.js.map +1 -1
- package/library/cjs.js +198 -594
- package/library/cjs.js.map +1 -1
- package/library/{index.js → index.esm.js} +199 -595
- package/library/index.esm.js.map +1 -0
- package/package.json +146 -146
- package/rollup.config.mjs +17 -5
- package/stats.html +4949 -0
- package/library/index.js.map +0 -1
|
@@ -259,20 +259,14 @@ class PlotRoot extends RequestItem {
|
|
|
259
259
|
/** Detect free variable `global` from Node.js. */
|
|
260
260
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
261
261
|
|
|
262
|
-
var freeGlobal$1 = freeGlobal;
|
|
263
|
-
|
|
264
262
|
/** Detect free variable `self`. */
|
|
265
263
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
266
264
|
|
|
267
265
|
/** Used as a reference to the global object. */
|
|
268
|
-
var root = freeGlobal
|
|
269
|
-
|
|
270
|
-
var root$1 = root;
|
|
266
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
271
267
|
|
|
272
268
|
/** Built-in value references. */
|
|
273
|
-
var Symbol = root
|
|
274
|
-
|
|
275
|
-
var Symbol$1 = Symbol;
|
|
269
|
+
var Symbol = root.Symbol;
|
|
276
270
|
|
|
277
271
|
/** Used for built-in method references. */
|
|
278
272
|
var objectProto$c = Object.prototype;
|
|
@@ -288,7 +282,7 @@ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
|
|
|
288
282
|
var nativeObjectToString$1 = objectProto$c.toString;
|
|
289
283
|
|
|
290
284
|
/** Built-in value references. */
|
|
291
|
-
var symToStringTag$1 = Symbol
|
|
285
|
+
var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
|
|
292
286
|
|
|
293
287
|
/**
|
|
294
288
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
@@ -343,7 +337,7 @@ var nullTag = '[object Null]',
|
|
|
343
337
|
undefinedTag = '[object Undefined]';
|
|
344
338
|
|
|
345
339
|
/** Built-in value references. */
|
|
346
|
-
var symToStringTag = Symbol
|
|
340
|
+
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
347
341
|
|
|
348
342
|
/**
|
|
349
343
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
@@ -459,13 +453,8 @@ function arrayMap(array, iteratee) {
|
|
|
459
453
|
*/
|
|
460
454
|
var isArray = Array.isArray;
|
|
461
455
|
|
|
462
|
-
var isArray$1 = isArray;
|
|
463
|
-
|
|
464
|
-
/** Used as references for various `Number` constants. */
|
|
465
|
-
var INFINITY$1 = 1 / 0;
|
|
466
|
-
|
|
467
456
|
/** Used to convert symbols to primitives and strings. */
|
|
468
|
-
var symbolProto$1 = Symbol
|
|
457
|
+
var symbolProto$1 = Symbol ? Symbol.prototype : undefined,
|
|
469
458
|
symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
|
|
470
459
|
|
|
471
460
|
/**
|
|
@@ -481,7 +470,7 @@ function baseToString(value) {
|
|
|
481
470
|
if (typeof value == 'string') {
|
|
482
471
|
return value;
|
|
483
472
|
}
|
|
484
|
-
if (isArray
|
|
473
|
+
if (isArray(value)) {
|
|
485
474
|
// Recursively convert values (susceptible to call stack limits).
|
|
486
475
|
return arrayMap(value, baseToString) + '';
|
|
487
476
|
}
|
|
@@ -489,7 +478,7 @@ function baseToString(value) {
|
|
|
489
478
|
return symbolToString ? symbolToString.call(value) : '';
|
|
490
479
|
}
|
|
491
480
|
var result = (value + '');
|
|
492
|
-
return (result == '0' && (1 / value) == -
|
|
481
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
493
482
|
}
|
|
494
483
|
|
|
495
484
|
/** Used to match a single whitespace character. */
|
|
@@ -669,13 +658,11 @@ function isFunction(value) {
|
|
|
669
658
|
}
|
|
670
659
|
|
|
671
660
|
/** Used to detect overreaching core-js shims. */
|
|
672
|
-
var coreJsData = root
|
|
673
|
-
|
|
674
|
-
var coreJsData$1 = coreJsData;
|
|
661
|
+
var coreJsData = root['__core-js_shared__'];
|
|
675
662
|
|
|
676
663
|
/** Used to detect methods masquerading as native. */
|
|
677
664
|
var maskSrcKey = (function() {
|
|
678
|
-
var uid = /[^.]+$/.exec(coreJsData
|
|
665
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
679
666
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
680
667
|
}());
|
|
681
668
|
|
|
@@ -782,9 +769,7 @@ function getNative(object, key) {
|
|
|
782
769
|
}
|
|
783
770
|
|
|
784
771
|
/* Built-in method references that are verified to be native. */
|
|
785
|
-
var WeakMap = getNative(root
|
|
786
|
-
|
|
787
|
-
var WeakMap$1 = WeakMap;
|
|
772
|
+
var WeakMap = getNative(root, 'WeakMap');
|
|
788
773
|
|
|
789
774
|
var defineProperty = (function() {
|
|
790
775
|
try {
|
|
@@ -794,8 +779,6 @@ var defineProperty = (function() {
|
|
|
794
779
|
} catch (e) {}
|
|
795
780
|
}());
|
|
796
781
|
|
|
797
|
-
var defineProperty$1 = defineProperty;
|
|
798
|
-
|
|
799
782
|
/** Used as references for various `Number` constants. */
|
|
800
783
|
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
801
784
|
|
|
@@ -830,8 +813,8 @@ function isIndex(value, length) {
|
|
|
830
813
|
* @param {*} value The value to assign.
|
|
831
814
|
*/
|
|
832
815
|
function baseAssignValue(object, key, value) {
|
|
833
|
-
if (key == '__proto__' && defineProperty
|
|
834
|
-
defineProperty
|
|
816
|
+
if (key == '__proto__' && defineProperty) {
|
|
817
|
+
defineProperty(object, key, {
|
|
835
818
|
'configurable': true,
|
|
836
819
|
'enumerable': true,
|
|
837
820
|
'value': value,
|
|
@@ -1023,8 +1006,6 @@ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsAr
|
|
|
1023
1006
|
!propertyIsEnumerable$1.call(value, 'callee');
|
|
1024
1007
|
};
|
|
1025
1008
|
|
|
1026
|
-
var isArguments$1 = isArguments;
|
|
1027
|
-
|
|
1028
1009
|
/**
|
|
1029
1010
|
* This method returns `false`.
|
|
1030
1011
|
*
|
|
@@ -1052,7 +1033,7 @@ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !modu
|
|
|
1052
1033
|
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
1053
1034
|
|
|
1054
1035
|
/** Built-in value references. */
|
|
1055
|
-
var Buffer = moduleExports$1 ? root
|
|
1036
|
+
var Buffer = moduleExports$1 ? root.Buffer : undefined;
|
|
1056
1037
|
|
|
1057
1038
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1058
1039
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
@@ -1076,8 +1057,6 @@ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
|
1076
1057
|
*/
|
|
1077
1058
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1078
1059
|
|
|
1079
|
-
var isBuffer$1 = isBuffer;
|
|
1080
|
-
|
|
1081
1060
|
/** `Object#toString` result references. */
|
|
1082
1061
|
var argsTag$1 = '[object Arguments]',
|
|
1083
1062
|
arrayTag$1 = '[object Array]',
|
|
@@ -1156,7 +1135,7 @@ var freeModule = freeExports && typeof module == 'object' && module && !module.n
|
|
|
1156
1135
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1157
1136
|
|
|
1158
1137
|
/** Detect free variable `process` from Node.js. */
|
|
1159
|
-
var freeProcess = moduleExports && freeGlobal
|
|
1138
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
1160
1139
|
|
|
1161
1140
|
/** Used to access faster Node.js helpers. */
|
|
1162
1141
|
var nodeUtil = (function() {
|
|
@@ -1173,10 +1152,8 @@ var nodeUtil = (function() {
|
|
|
1173
1152
|
} catch (e) {}
|
|
1174
1153
|
}());
|
|
1175
1154
|
|
|
1176
|
-
var nodeUtil$1 = nodeUtil;
|
|
1177
|
-
|
|
1178
1155
|
/* Node.js helper references. */
|
|
1179
|
-
var nodeIsTypedArray = nodeUtil
|
|
1156
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
1180
1157
|
|
|
1181
1158
|
/**
|
|
1182
1159
|
* Checks if `value` is classified as a typed array.
|
|
@@ -1197,8 +1174,6 @@ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
|
1197
1174
|
*/
|
|
1198
1175
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1199
1176
|
|
|
1200
|
-
var isTypedArray$1 = isTypedArray;
|
|
1201
|
-
|
|
1202
1177
|
/** Used for built-in method references. */
|
|
1203
1178
|
var objectProto$7 = Object.prototype;
|
|
1204
1179
|
|
|
@@ -1214,16 +1189,16 @@ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
|
1214
1189
|
* @returns {Array} Returns the array of property names.
|
|
1215
1190
|
*/
|
|
1216
1191
|
function arrayLikeKeys(value, inherited) {
|
|
1217
|
-
var isArr = isArray
|
|
1218
|
-
isArg = !isArr && isArguments
|
|
1219
|
-
isBuff = !isArr && !isArg && isBuffer
|
|
1220
|
-
isType = !isArr && !isArg && !isBuff && isTypedArray
|
|
1192
|
+
var isArr = isArray(value),
|
|
1193
|
+
isArg = !isArr && isArguments(value),
|
|
1194
|
+
isBuff = !isArr && !isArg && isBuffer(value),
|
|
1195
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
1221
1196
|
skipIndexes = isArr || isArg || isBuff || isType,
|
|
1222
1197
|
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
1223
1198
|
length = result.length;
|
|
1224
1199
|
|
|
1225
1200
|
for (var key in value) {
|
|
1226
|
-
if ((
|
|
1201
|
+
if ((hasOwnProperty$6.call(value, key)) &&
|
|
1227
1202
|
!(skipIndexes && (
|
|
1228
1203
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1229
1204
|
key == 'length' ||
|
|
@@ -1257,8 +1232,6 @@ function overArg(func, transform) {
|
|
|
1257
1232
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1258
1233
|
var nativeKeys = overArg(Object.keys, Object);
|
|
1259
1234
|
|
|
1260
|
-
var nativeKeys$1 = nativeKeys;
|
|
1261
|
-
|
|
1262
1235
|
/** Used for built-in method references. */
|
|
1263
1236
|
var objectProto$6 = Object.prototype;
|
|
1264
1237
|
|
|
@@ -1274,7 +1247,7 @@ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
|
1274
1247
|
*/
|
|
1275
1248
|
function baseKeys(object) {
|
|
1276
1249
|
if (!isPrototype(object)) {
|
|
1277
|
-
return nativeKeys
|
|
1250
|
+
return nativeKeys(object);
|
|
1278
1251
|
}
|
|
1279
1252
|
var result = [];
|
|
1280
1253
|
for (var key in Object(object)) {
|
|
@@ -1330,7 +1303,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
|
1330
1303
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1331
1304
|
*/
|
|
1332
1305
|
function isKey(value, object) {
|
|
1333
|
-
if (isArray
|
|
1306
|
+
if (isArray(value)) {
|
|
1334
1307
|
return false;
|
|
1335
1308
|
}
|
|
1336
1309
|
var type = typeof value;
|
|
@@ -1345,8 +1318,6 @@ function isKey(value, object) {
|
|
|
1345
1318
|
/* Built-in method references that are verified to be native. */
|
|
1346
1319
|
var nativeCreate = getNative(Object, 'create');
|
|
1347
1320
|
|
|
1348
|
-
var nativeCreate$1 = nativeCreate;
|
|
1349
|
-
|
|
1350
1321
|
/**
|
|
1351
1322
|
* Removes all key-value entries from the hash.
|
|
1352
1323
|
*
|
|
@@ -1355,7 +1326,7 @@ var nativeCreate$1 = nativeCreate;
|
|
|
1355
1326
|
* @memberOf Hash
|
|
1356
1327
|
*/
|
|
1357
1328
|
function hashClear() {
|
|
1358
|
-
this.__data__ = nativeCreate
|
|
1329
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
1359
1330
|
this.size = 0;
|
|
1360
1331
|
}
|
|
1361
1332
|
|
|
@@ -1395,7 +1366,7 @@ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
|
1395
1366
|
*/
|
|
1396
1367
|
function hashGet(key) {
|
|
1397
1368
|
var data = this.__data__;
|
|
1398
|
-
if (nativeCreate
|
|
1369
|
+
if (nativeCreate) {
|
|
1399
1370
|
var result = data[key];
|
|
1400
1371
|
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
1401
1372
|
}
|
|
@@ -1419,7 +1390,7 @@ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
|
1419
1390
|
*/
|
|
1420
1391
|
function hashHas(key) {
|
|
1421
1392
|
var data = this.__data__;
|
|
1422
|
-
return nativeCreate
|
|
1393
|
+
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
|
|
1423
1394
|
}
|
|
1424
1395
|
|
|
1425
1396
|
/** Used to stand-in for `undefined` hash values. */
|
|
@@ -1438,7 +1409,7 @@ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
|
1438
1409
|
function hashSet(key, value) {
|
|
1439
1410
|
var data = this.__data__;
|
|
1440
1411
|
this.size += this.has(key) ? 0 : 1;
|
|
1441
|
-
data[key] = (nativeCreate
|
|
1412
|
+
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
1442
1413
|
return this;
|
|
1443
1414
|
}
|
|
1444
1415
|
|
|
@@ -1607,9 +1578,7 @@ ListCache.prototype.has = listCacheHas;
|
|
|
1607
1578
|
ListCache.prototype.set = listCacheSet;
|
|
1608
1579
|
|
|
1609
1580
|
/* Built-in method references that are verified to be native. */
|
|
1610
|
-
var Map = getNative(root
|
|
1611
|
-
|
|
1612
|
-
var Map$1 = Map;
|
|
1581
|
+
var Map = getNative(root, 'Map');
|
|
1613
1582
|
|
|
1614
1583
|
/**
|
|
1615
1584
|
* Removes all key-value entries from the map.
|
|
@@ -1622,7 +1591,7 @@ function mapCacheClear() {
|
|
|
1622
1591
|
this.size = 0;
|
|
1623
1592
|
this.__data__ = {
|
|
1624
1593
|
'hash': new Hash,
|
|
1625
|
-
'map': new (Map
|
|
1594
|
+
'map': new (Map || ListCache),
|
|
1626
1595
|
'string': new Hash
|
|
1627
1596
|
};
|
|
1628
1597
|
}
|
|
@@ -1858,8 +1827,6 @@ var stringToPath = memoizeCapped(function(string) {
|
|
|
1858
1827
|
return result;
|
|
1859
1828
|
});
|
|
1860
1829
|
|
|
1861
|
-
var stringToPath$1 = stringToPath;
|
|
1862
|
-
|
|
1863
1830
|
/**
|
|
1864
1831
|
* Converts `value` to a string. An empty string is returned for `null`
|
|
1865
1832
|
* and `undefined` values. The sign of `-0` is preserved.
|
|
@@ -1894,15 +1861,12 @@ function toString(value) {
|
|
|
1894
1861
|
* @returns {Array} Returns the cast property path array.
|
|
1895
1862
|
*/
|
|
1896
1863
|
function castPath(value, object) {
|
|
1897
|
-
if (isArray
|
|
1864
|
+
if (isArray(value)) {
|
|
1898
1865
|
return value;
|
|
1899
1866
|
}
|
|
1900
|
-
return isKey(value, object) ? [value] : stringToPath
|
|
1867
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
1901
1868
|
}
|
|
1902
1869
|
|
|
1903
|
-
/** Used as references for various `Number` constants. */
|
|
1904
|
-
var INFINITY = 1 / 0;
|
|
1905
|
-
|
|
1906
1870
|
/**
|
|
1907
1871
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
1908
1872
|
*
|
|
@@ -1915,7 +1879,7 @@ function toKey(value) {
|
|
|
1915
1879
|
return value;
|
|
1916
1880
|
}
|
|
1917
1881
|
var result = (value + '');
|
|
1918
|
-
return (result == '0' && (1 / value) == -
|
|
1882
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
1919
1883
|
}
|
|
1920
1884
|
|
|
1921
1885
|
/**
|
|
@@ -2059,7 +2023,7 @@ function stackSet(key, value) {
|
|
|
2059
2023
|
var data = this.__data__;
|
|
2060
2024
|
if (data instanceof ListCache) {
|
|
2061
2025
|
var pairs = data.__data__;
|
|
2062
|
-
if (!Map
|
|
2026
|
+
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
2063
2027
|
pairs.push([key, value]);
|
|
2064
2028
|
this.size = ++data.size;
|
|
2065
2029
|
return this;
|
|
@@ -2162,8 +2126,6 @@ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
|
2162
2126
|
});
|
|
2163
2127
|
};
|
|
2164
2128
|
|
|
2165
|
-
var getSymbols$1 = getSymbols;
|
|
2166
|
-
|
|
2167
2129
|
/**
|
|
2168
2130
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
2169
2131
|
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
@@ -2177,7 +2139,7 @@ var getSymbols$1 = getSymbols;
|
|
|
2177
2139
|
*/
|
|
2178
2140
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
2179
2141
|
var result = keysFunc(object);
|
|
2180
|
-
return isArray
|
|
2142
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
2181
2143
|
}
|
|
2182
2144
|
|
|
2183
2145
|
/**
|
|
@@ -2188,23 +2150,17 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
|
2188
2150
|
* @returns {Array} Returns the array of property names and symbols.
|
|
2189
2151
|
*/
|
|
2190
2152
|
function getAllKeys(object) {
|
|
2191
|
-
return baseGetAllKeys(object, keys, getSymbols
|
|
2153
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
2192
2154
|
}
|
|
2193
2155
|
|
|
2194
2156
|
/* Built-in method references that are verified to be native. */
|
|
2195
|
-
var DataView = getNative(root
|
|
2196
|
-
|
|
2197
|
-
var DataView$1 = DataView;
|
|
2157
|
+
var DataView = getNative(root, 'DataView');
|
|
2198
2158
|
|
|
2199
2159
|
/* Built-in method references that are verified to be native. */
|
|
2200
|
-
var Promise$1 = getNative(root
|
|
2201
|
-
|
|
2202
|
-
var Promise$2 = Promise$1;
|
|
2160
|
+
var Promise$1 = getNative(root, 'Promise');
|
|
2203
2161
|
|
|
2204
2162
|
/* Built-in method references that are verified to be native. */
|
|
2205
|
-
var Set = getNative(root
|
|
2206
|
-
|
|
2207
|
-
var Set$1 = Set;
|
|
2163
|
+
var Set = getNative(root, 'Set');
|
|
2208
2164
|
|
|
2209
2165
|
/** `Object#toString` result references. */
|
|
2210
2166
|
var mapTag$1 = '[object Map]',
|
|
@@ -2216,11 +2172,11 @@ var mapTag$1 = '[object Map]',
|
|
|
2216
2172
|
var dataViewTag$1 = '[object DataView]';
|
|
2217
2173
|
|
|
2218
2174
|
/** Used to detect maps, sets, and weakmaps. */
|
|
2219
|
-
var dataViewCtorString = toSource(DataView
|
|
2220
|
-
mapCtorString = toSource(Map
|
|
2221
|
-
promiseCtorString = toSource(Promise$
|
|
2222
|
-
setCtorString = toSource(Set
|
|
2223
|
-
weakMapCtorString = toSource(WeakMap
|
|
2175
|
+
var dataViewCtorString = toSource(DataView),
|
|
2176
|
+
mapCtorString = toSource(Map),
|
|
2177
|
+
promiseCtorString = toSource(Promise$1),
|
|
2178
|
+
setCtorString = toSource(Set),
|
|
2179
|
+
weakMapCtorString = toSource(WeakMap);
|
|
2224
2180
|
|
|
2225
2181
|
/**
|
|
2226
2182
|
* Gets the `toStringTag` of `value`.
|
|
@@ -2232,11 +2188,11 @@ var dataViewCtorString = toSource(DataView$1),
|
|
|
2232
2188
|
var getTag = baseGetTag;
|
|
2233
2189
|
|
|
2234
2190
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
2235
|
-
if ((DataView
|
|
2236
|
-
(Map
|
|
2237
|
-
(Promise$
|
|
2238
|
-
(Set
|
|
2239
|
-
(WeakMap
|
|
2191
|
+
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$1) ||
|
|
2192
|
+
(Map && getTag(new Map) != mapTag$1) ||
|
|
2193
|
+
(Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
|
|
2194
|
+
(Set && getTag(new Set) != setTag$1) ||
|
|
2195
|
+
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
2240
2196
|
getTag = function(value) {
|
|
2241
2197
|
var result = baseGetTag(value),
|
|
2242
2198
|
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
@@ -2255,12 +2211,8 @@ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$1)
|
|
|
2255
2211
|
};
|
|
2256
2212
|
}
|
|
2257
2213
|
|
|
2258
|
-
var getTag$1 = getTag;
|
|
2259
|
-
|
|
2260
2214
|
/** Built-in value references. */
|
|
2261
|
-
var Uint8Array = root
|
|
2262
|
-
|
|
2263
|
-
var Uint8Array$1 = Uint8Array;
|
|
2215
|
+
var Uint8Array = root.Uint8Array;
|
|
2264
2216
|
|
|
2265
2217
|
/** Used to stand-in for `undefined` hash values. */
|
|
2266
2218
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
@@ -2481,7 +2433,7 @@ var arrayBufferTag = '[object ArrayBuffer]',
|
|
|
2481
2433
|
dataViewTag = '[object DataView]';
|
|
2482
2434
|
|
|
2483
2435
|
/** Used to convert symbols to primitives and strings. */
|
|
2484
|
-
var symbolProto = Symbol
|
|
2436
|
+
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
2485
2437
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
2486
2438
|
|
|
2487
2439
|
/**
|
|
@@ -2513,7 +2465,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
|
2513
2465
|
|
|
2514
2466
|
case arrayBufferTag:
|
|
2515
2467
|
if ((object.byteLength != other.byteLength) ||
|
|
2516
|
-
!equalFunc(new Uint8Array
|
|
2468
|
+
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
|
2517
2469
|
return false;
|
|
2518
2470
|
}
|
|
2519
2471
|
return true;
|
|
@@ -2682,10 +2634,10 @@ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
|
2682
2634
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
2683
2635
|
*/
|
|
2684
2636
|
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
2685
|
-
var objIsArr = isArray
|
|
2686
|
-
othIsArr = isArray
|
|
2687
|
-
objTag = objIsArr ? arrayTag : getTag
|
|
2688
|
-
othTag = othIsArr ? arrayTag : getTag
|
|
2637
|
+
var objIsArr = isArray(object),
|
|
2638
|
+
othIsArr = isArray(other),
|
|
2639
|
+
objTag = objIsArr ? arrayTag : getTag(object),
|
|
2640
|
+
othTag = othIsArr ? arrayTag : getTag(other);
|
|
2689
2641
|
|
|
2690
2642
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
2691
2643
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
@@ -2694,8 +2646,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
2694
2646
|
othIsObj = othTag == objectTag,
|
|
2695
2647
|
isSameTag = objTag == othTag;
|
|
2696
2648
|
|
|
2697
|
-
if (isSameTag && isBuffer
|
|
2698
|
-
if (!isBuffer
|
|
2649
|
+
if (isSameTag && isBuffer(object)) {
|
|
2650
|
+
if (!isBuffer(other)) {
|
|
2699
2651
|
return false;
|
|
2700
2652
|
}
|
|
2701
2653
|
objIsArr = true;
|
|
@@ -2703,7 +2655,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
2703
2655
|
}
|
|
2704
2656
|
if (isSameTag && !objIsObj) {
|
|
2705
2657
|
stack || (stack = new Stack);
|
|
2706
|
-
return (objIsArr || isTypedArray
|
|
2658
|
+
return (objIsArr || isTypedArray(object))
|
|
2707
2659
|
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
|
2708
2660
|
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
2709
2661
|
}
|
|
@@ -2766,8 +2718,7 @@ var COMPARE_PARTIAL_FLAG$1 = 1,
|
|
|
2766
2718
|
*/
|
|
2767
2719
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
2768
2720
|
var index = matchData.length,
|
|
2769
|
-
length = index
|
|
2770
|
-
noCustomizer = !customizer;
|
|
2721
|
+
length = index;
|
|
2771
2722
|
|
|
2772
2723
|
if (object == null) {
|
|
2773
2724
|
return !length;
|
|
@@ -2775,7 +2726,7 @@ function baseIsMatch(object, source, matchData, customizer) {
|
|
|
2775
2726
|
object = Object(object);
|
|
2776
2727
|
while (index--) {
|
|
2777
2728
|
var data = matchData[index];
|
|
2778
|
-
if ((
|
|
2729
|
+
if ((data[2])
|
|
2779
2730
|
? data[1] !== object[data[0]]
|
|
2780
2731
|
: !(data[0] in object)
|
|
2781
2732
|
) {
|
|
@@ -2788,15 +2739,13 @@ function baseIsMatch(object, source, matchData, customizer) {
|
|
|
2788
2739
|
objValue = object[key],
|
|
2789
2740
|
srcValue = data[1];
|
|
2790
2741
|
|
|
2791
|
-
if (
|
|
2742
|
+
if (data[2]) {
|
|
2792
2743
|
if (objValue === undefined && !(key in object)) {
|
|
2793
2744
|
return false;
|
|
2794
2745
|
}
|
|
2795
2746
|
} else {
|
|
2796
2747
|
var stack = new Stack;
|
|
2797
|
-
|
|
2798
|
-
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
2799
|
-
}
|
|
2748
|
+
var result;
|
|
2800
2749
|
if (!(result === undefined
|
|
2801
2750
|
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)
|
|
2802
2751
|
: result
|
|
@@ -2916,7 +2865,7 @@ function hasPath(object, path, hasFunc) {
|
|
|
2916
2865
|
}
|
|
2917
2866
|
length = object == null ? 0 : object.length;
|
|
2918
2867
|
return !!length && isLength(length) && isIndex(key, length) &&
|
|
2919
|
-
(isArray
|
|
2868
|
+
(isArray(object) || isArguments(object));
|
|
2920
2869
|
}
|
|
2921
2870
|
|
|
2922
2871
|
/**
|
|
@@ -3042,7 +2991,7 @@ function baseIteratee(value) {
|
|
|
3042
2991
|
return identity;
|
|
3043
2992
|
}
|
|
3044
2993
|
if (typeof value == 'object') {
|
|
3045
|
-
return isArray
|
|
2994
|
+
return isArray(value)
|
|
3046
2995
|
? baseMatchesProperty(value[0], value[1])
|
|
3047
2996
|
: baseMatches(value);
|
|
3048
2997
|
}
|
|
@@ -3085,7 +3034,7 @@ function createBaseFor(fromRight) {
|
|
|
3085
3034
|
length = props.length;
|
|
3086
3035
|
|
|
3087
3036
|
while (length--) {
|
|
3088
|
-
var key = props[
|
|
3037
|
+
var key = props[++index];
|
|
3089
3038
|
if (iteratee(iterable[key], key, iterable) === false) {
|
|
3090
3039
|
break;
|
|
3091
3040
|
}
|
|
@@ -3107,8 +3056,6 @@ function createBaseFor(fromRight) {
|
|
|
3107
3056
|
*/
|
|
3108
3057
|
var baseFor = createBaseFor();
|
|
3109
3058
|
|
|
3110
|
-
var baseFor$1 = baseFor;
|
|
3111
|
-
|
|
3112
3059
|
/**
|
|
3113
3060
|
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
3114
3061
|
*
|
|
@@ -3118,7 +3065,7 @@ var baseFor$1 = baseFor;
|
|
|
3118
3065
|
* @returns {Object} Returns `object`.
|
|
3119
3066
|
*/
|
|
3120
3067
|
function baseForOwn(object, iteratee) {
|
|
3121
|
-
return object && baseFor
|
|
3068
|
+
return object && baseFor(object, iteratee, keys);
|
|
3122
3069
|
}
|
|
3123
3070
|
|
|
3124
3071
|
/**
|
|
@@ -3138,10 +3085,10 @@ function createBaseEach(eachFunc, fromRight) {
|
|
|
3138
3085
|
return eachFunc(collection, iteratee);
|
|
3139
3086
|
}
|
|
3140
3087
|
var length = collection.length,
|
|
3141
|
-
index =
|
|
3088
|
+
index = -1,
|
|
3142
3089
|
iterable = Object(collection);
|
|
3143
3090
|
|
|
3144
|
-
while ((
|
|
3091
|
+
while ((++index < length)) {
|
|
3145
3092
|
if (iteratee(iterable[index], index, iterable) === false) {
|
|
3146
3093
|
break;
|
|
3147
3094
|
}
|
|
@@ -3160,8 +3107,6 @@ function createBaseEach(eachFunc, fromRight) {
|
|
|
3160
3107
|
*/
|
|
3161
3108
|
var baseEach = createBaseEach(baseForOwn);
|
|
3162
3109
|
|
|
3163
|
-
var baseEach$1 = baseEach;
|
|
3164
|
-
|
|
3165
3110
|
/**
|
|
3166
3111
|
* Aggregates elements of `collection` on `accumulator` with keys transformed
|
|
3167
3112
|
* by `iteratee` and values set by `setter`.
|
|
@@ -3174,7 +3119,7 @@ var baseEach$1 = baseEach;
|
|
|
3174
3119
|
* @returns {Function} Returns `accumulator`.
|
|
3175
3120
|
*/
|
|
3176
3121
|
function baseAggregator(collection, setter, iteratee, accumulator) {
|
|
3177
|
-
baseEach
|
|
3122
|
+
baseEach(collection, function(value, key, collection) {
|
|
3178
3123
|
setter(accumulator, value, iteratee(value), collection);
|
|
3179
3124
|
});
|
|
3180
3125
|
return accumulator;
|
|
@@ -3190,7 +3135,7 @@ function baseAggregator(collection, setter, iteratee, accumulator) {
|
|
|
3190
3135
|
*/
|
|
3191
3136
|
function createAggregator(setter, initializer) {
|
|
3192
3137
|
return function(collection, iteratee) {
|
|
3193
|
-
var func = isArray
|
|
3138
|
+
var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
|
3194
3139
|
accumulator = initializer ? initializer() : {};
|
|
3195
3140
|
|
|
3196
3141
|
return func(collection, setter, baseIteratee(iteratee), accumulator);
|
|
@@ -3214,11 +3159,9 @@ function createAggregator(setter, initializer) {
|
|
|
3214
3159
|
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
3215
3160
|
*/
|
|
3216
3161
|
var now = function() {
|
|
3217
|
-
return root
|
|
3162
|
+
return root.Date.now();
|
|
3218
3163
|
};
|
|
3219
3164
|
|
|
3220
|
-
var now$1 = now;
|
|
3221
|
-
|
|
3222
3165
|
/** Error message constants. */
|
|
3223
3166
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
3224
3167
|
|
|
@@ -3344,7 +3287,7 @@ function debounce(func, wait, options) {
|
|
|
3344
3287
|
}
|
|
3345
3288
|
|
|
3346
3289
|
function timerExpired() {
|
|
3347
|
-
var time = now
|
|
3290
|
+
var time = now();
|
|
3348
3291
|
if (shouldInvoke(time)) {
|
|
3349
3292
|
return trailingEdge(time);
|
|
3350
3293
|
}
|
|
@@ -3373,11 +3316,11 @@ function debounce(func, wait, options) {
|
|
|
3373
3316
|
}
|
|
3374
3317
|
|
|
3375
3318
|
function flush() {
|
|
3376
|
-
return timerId === undefined ? result : trailingEdge(now
|
|
3319
|
+
return timerId === undefined ? result : trailingEdge(now());
|
|
3377
3320
|
}
|
|
3378
3321
|
|
|
3379
3322
|
function debounced() {
|
|
3380
|
-
var time = now
|
|
3323
|
+
var time = now(),
|
|
3381
3324
|
isInvoking = shouldInvoke(time);
|
|
3382
3325
|
|
|
3383
3326
|
lastArgs = arguments;
|
|
@@ -3442,8 +3385,6 @@ var groupBy = createAggregator(function(result, value, key) {
|
|
|
3442
3385
|
}
|
|
3443
3386
|
});
|
|
3444
3387
|
|
|
3445
|
-
var groupBy$1 = groupBy;
|
|
3446
|
-
|
|
3447
3388
|
class ChartRoot {
|
|
3448
3389
|
constructor(props) {
|
|
3449
3390
|
this.plots = props.plots.map(p => (Object.assign({}, p)));
|
|
@@ -3554,7 +3495,7 @@ class ChartRoot {
|
|
|
3554
3495
|
return param;
|
|
3555
3496
|
}
|
|
3556
3497
|
getPlotImplementationGroups(plots, axis) {
|
|
3557
|
-
const groups = groupBy
|
|
3498
|
+
const groups = groupBy(plots, p => {
|
|
3558
3499
|
const param = this.getDimensionAxisParam(p, axis);
|
|
3559
3500
|
return `${param}${this.reversePlotAxis(p, axis) ? '.reverse' : ''}`;
|
|
3560
3501
|
});
|
|
@@ -4172,206 +4113,6 @@ class AxiomScatter extends AxiomPlotRoot {
|
|
|
4172
4113
|
}
|
|
4173
4114
|
}
|
|
4174
4115
|
|
|
4175
|
-
let AxiomBar$1 = class AxiomBar extends AxiomPlotRoot {
|
|
4176
|
-
constructor(props) {
|
|
4177
|
-
super(props);
|
|
4178
|
-
this.legendHeight = 12;
|
|
4179
|
-
this.legendPaddingTop = 8;
|
|
4180
|
-
const chart = this.chart;
|
|
4181
|
-
const chartElements = chart.getChartElements();
|
|
4182
|
-
if ((chartElements === null || chartElements === void 0 ? void 0 : chartElements.svg) !== undefined) {
|
|
4183
|
-
chartElements.svg.style('z-index', 20);
|
|
4184
|
-
// TODO find better way ^. Doing this so that svg can get events.
|
|
4185
|
-
}
|
|
4186
|
-
}
|
|
4187
|
-
draw() {
|
|
4188
|
-
const _super = Object.create(null, {
|
|
4189
|
-
onLegendReady: { get: () => super.onLegendReady }
|
|
4190
|
-
});
|
|
4191
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4192
|
-
var _a, _b, _c, _d, _e;
|
|
4193
|
-
const dataResponse = yield this.getData();
|
|
4194
|
-
const parsedData = (_a = dataResponse === null || dataResponse === void 0 ? void 0 : dataResponse.parsed) === null || _a === void 0 ? void 0 : _a.data;
|
|
4195
|
-
if (parsedData === undefined)
|
|
4196
|
-
return;
|
|
4197
|
-
const xAccessor = this.getAccessorAtAxis('x');
|
|
4198
|
-
const yAccessor = (_b = dataResponse.parsed) === null || _b === void 0 ? void 0 : _b.accessors.y;
|
|
4199
|
-
if (xAccessor === undefined || yAccessor === undefined)
|
|
4200
|
-
return;
|
|
4201
|
-
const y2Accessor = (_c = dataResponse.parsed) === null || _c === void 0 ? void 0 : _c.accessors.y2;
|
|
4202
|
-
const yGroups = this.dimensions;
|
|
4203
|
-
const yKey = yGroups.y.property;
|
|
4204
|
-
const yLabel = yGroups.y.label;
|
|
4205
|
-
const y2Key = this.dimensions.y2.property;
|
|
4206
|
-
const y2Label = this.dimensions.y2.label;
|
|
4207
|
-
const chart = this.chart;
|
|
4208
|
-
const chartElements = chart.getChartElements();
|
|
4209
|
-
if (chartElements === undefined || chartElements.svg === null || yKey === undefined || yLabel === undefined)
|
|
4210
|
-
return undefined;
|
|
4211
|
-
if (chartElements.svg.select('g') !== undefined)
|
|
4212
|
-
chartElements.svg.select('g').remove();
|
|
4213
|
-
let { height } = chart.settings;
|
|
4214
|
-
let width = chart.getWidth();
|
|
4215
|
-
width = Number(width);
|
|
4216
|
-
height = Number(height);
|
|
4217
|
-
const oneOrZero = y2Key === undefined ? 0 : 1; // Used to add in space for y2 if exists.
|
|
4218
|
-
const xAxisHeight = 48; // HOW TO GET DYNAMICALLY?
|
|
4219
|
-
const yAxisWidth = 36; // HOW TO GET DYNAMICALLY?
|
|
4220
|
-
const y2AxisWidth = yAxisWidth * oneOrZero;
|
|
4221
|
-
const chartPaddingTop = 4;
|
|
4222
|
-
const yLabelWidth = 24;
|
|
4223
|
-
const y1TotalWidth = yAxisWidth + yLabelWidth;
|
|
4224
|
-
const y2LabelWidth = yLabelWidth * oneOrZero;
|
|
4225
|
-
const y2TotalWidth = y2AxisWidth * oneOrZero + y2LabelWidth;
|
|
4226
|
-
const plotHeight = height - xAxisHeight - this.legendHeight - this.legendPaddingTop - chartPaddingTop;
|
|
4227
|
-
const plotWidth = width - yAxisWidth - yLabelWidth - y2TotalWidth;
|
|
4228
|
-
const plotXStart = width - plotWidth - y2TotalWidth;
|
|
4229
|
-
const plotXEnd = width - y2TotalWidth;
|
|
4230
|
-
const groups = parsedData.map(d => xAccessor(d));
|
|
4231
|
-
const subgroups = [yKey];
|
|
4232
|
-
if (y2Key !== undefined && y2Accessor !== undefined)
|
|
4233
|
-
subgroups.push(y2Key);
|
|
4234
|
-
// Colors
|
|
4235
|
-
const fillColors = (_e = (_d = this.style) === null || _d === void 0 ? void 0 : _d.colors) !== null && _e !== void 0 ? _e : d3.schemeTableau10;
|
|
4236
|
-
const color = d3.scaleOrdinal(fillColors).domain(subgroups);
|
|
4237
|
-
const svg = chartElements.svg;
|
|
4238
|
-
const g = svg.insert('g');
|
|
4239
|
-
const x = this.getXScale(plotXStart, plotXEnd, groups);
|
|
4240
|
-
const y = this.getYScale(plotHeight, chartPaddingTop, parsedData, yAccessor);
|
|
4241
|
-
const y2 = this.getY2Scale(plotHeight, chartPaddingTop, parsedData, y2Accessor);
|
|
4242
|
-
const subgroupScales = this.getSubgroupScales(yKey, y, y2Key, y2);
|
|
4243
|
-
const xSubgroup = d3.scaleBand()
|
|
4244
|
-
.domain(subgroups)
|
|
4245
|
-
.range([0, x.bandwidth()])
|
|
4246
|
-
.padding(0.05);
|
|
4247
|
-
// Make Bar Groups
|
|
4248
|
-
g.append('g')
|
|
4249
|
-
.attr('width', plotWidth)
|
|
4250
|
-
.attr('height', plotHeight)
|
|
4251
|
-
.selectAll('g')
|
|
4252
|
-
.data(parsedData)
|
|
4253
|
-
.enter()
|
|
4254
|
-
.append('g')
|
|
4255
|
-
.attr('transform', d => `translate(${Number(x(xAccessor(d)))}, 0)`)
|
|
4256
|
-
.selectAll('rect')
|
|
4257
|
-
.data(d => Object.keys(this.dimensions).filter(key => key !== 'x').map((key) => {
|
|
4258
|
-
var _a, _b, _c, _d, _e;
|
|
4259
|
-
return {
|
|
4260
|
-
label: (_a = this.dimensions[key].label) !== null && _a !== void 0 ? _a : key,
|
|
4261
|
-
key: (_b = this.dimensions[key].property) !== null && _b !== void 0 ? _b : '',
|
|
4262
|
-
x: d[(_d = (_c = this.dimensions.x) === null || _c === void 0 ? void 0 : _c.property) !== null && _d !== void 0 ? _d : 'x'],
|
|
4263
|
-
value: d[(_e = this.dimensions[key].property) !== null && _e !== void 0 ? _e : '']
|
|
4264
|
-
};
|
|
4265
|
-
}))
|
|
4266
|
-
.enter()
|
|
4267
|
-
.append('rect')
|
|
4268
|
-
.attr('x', d => Number(xSubgroup(d.key)))
|
|
4269
|
-
.attr('y', d => Number(subgroupScales[d.key](d.value)))
|
|
4270
|
-
.attr('width', xSubgroup.bandwidth())
|
|
4271
|
-
.attr('height', d => plotHeight - Number(subgroupScales[d.key](d.value)))
|
|
4272
|
-
.attr('fill', d => color(d.key))
|
|
4273
|
-
.classed('bar', true)
|
|
4274
|
-
.on('mouseover', (event, data) => { this.onMouseScrub(event, data); })
|
|
4275
|
-
.on('mousemove', (event, data) => { this.onMouseScrub(event, data); })
|
|
4276
|
-
.on('mouseleave', () => { this.onScrubEnd(); });
|
|
4277
|
-
// X Axis
|
|
4278
|
-
const xAxis = g.append('g')
|
|
4279
|
-
.attr('transform', `translate(0, ${plotHeight})`)
|
|
4280
|
-
.call(d3.axisBottom(x));
|
|
4281
|
-
// X Labels
|
|
4282
|
-
xAxis.selectAll('text')
|
|
4283
|
-
.attr('text-anchor', 'end')
|
|
4284
|
-
.attr('transform', 'rotate(-45)translate(-10, 0)');
|
|
4285
|
-
// Y Axis
|
|
4286
|
-
g.append('g')
|
|
4287
|
-
.call(d3.axisLeft(y))
|
|
4288
|
-
.attr('transform', `translate(${y1TotalWidth}, 0)`);
|
|
4289
|
-
if (y2 !== undefined) {
|
|
4290
|
-
// Y2 Axis
|
|
4291
|
-
g.append('g')
|
|
4292
|
-
.call(d3.axisRight(y2))
|
|
4293
|
-
.attr('transform', `translate(${width - y2TotalWidth}, 0)`);
|
|
4294
|
-
}
|
|
4295
|
-
// Y Label
|
|
4296
|
-
g.append('text')
|
|
4297
|
-
.attr('text-anchor', 'middle')
|
|
4298
|
-
.attr('transform', 'rotate(-90)')
|
|
4299
|
-
.attr('x', -1 * plotHeight / 2)
|
|
4300
|
-
.attr('y', yLabelWidth)
|
|
4301
|
-
.attr('font-weight', 800)
|
|
4302
|
-
.text(yLabel);
|
|
4303
|
-
if (y2Label !== undefined) {
|
|
4304
|
-
// Y2 Label
|
|
4305
|
-
g.append('text')
|
|
4306
|
-
.attr('text-anchor', 'middle')
|
|
4307
|
-
.attr('transform', 'rotate(90)')
|
|
4308
|
-
.attr('x', 1 * plotHeight / 2)
|
|
4309
|
-
.attr('y', -1 * (width - y2LabelWidth))
|
|
4310
|
-
.attr('font-weight', 800)
|
|
4311
|
-
.text(y2Label);
|
|
4312
|
-
}
|
|
4313
|
-
_super.onLegendReady.call(this, Object.keys(this.dimensions).filter(key => key !== 'x').map(key => {
|
|
4314
|
-
var _a, _b;
|
|
4315
|
-
return ({
|
|
4316
|
-
id: key,
|
|
4317
|
-
label: (_a = this.dimensions[key].label) !== null && _a !== void 0 ? _a : key,
|
|
4318
|
-
style: { backgroundColor: this.dimensions[key].property === undefined ? '' : color((_b = this.dimensions[key].property) !== null && _b !== void 0 ? _b : '') }
|
|
4319
|
-
});
|
|
4320
|
-
}));
|
|
4321
|
-
});
|
|
4322
|
-
}
|
|
4323
|
-
onMouseScrub(event, data) {
|
|
4324
|
-
if (this.chart.onPlotScrub === undefined)
|
|
4325
|
-
return;
|
|
4326
|
-
this.onScrub({
|
|
4327
|
-
x: {
|
|
4328
|
-
position: event.offsetX,
|
|
4329
|
-
value: data.x
|
|
4330
|
-
},
|
|
4331
|
-
y: {
|
|
4332
|
-
position: event.offsetY,
|
|
4333
|
-
value: data.value
|
|
4334
|
-
}
|
|
4335
|
-
});
|
|
4336
|
-
}
|
|
4337
|
-
getXScale(plotXStart, plotXEnd, groups) {
|
|
4338
|
-
return d3.scaleBand()
|
|
4339
|
-
.domain(groups)
|
|
4340
|
-
.range([plotXStart, plotXEnd])
|
|
4341
|
-
.padding(0.25);
|
|
4342
|
-
}
|
|
4343
|
-
getYScale(plotHeight, chartPaddingTop, data, yAccessor) {
|
|
4344
|
-
return d3.scaleLinear()
|
|
4345
|
-
.domain([
|
|
4346
|
-
0,
|
|
4347
|
-
Number(d3.max(data, d => yAccessor(d)))
|
|
4348
|
-
])
|
|
4349
|
-
.range([plotHeight, chartPaddingTop]);
|
|
4350
|
-
}
|
|
4351
|
-
getY2Scale(plotHeight, chartPaddingTop, data, y2Accessor) {
|
|
4352
|
-
if (y2Accessor === undefined)
|
|
4353
|
-
return undefined;
|
|
4354
|
-
return this.getYScale(plotHeight, chartPaddingTop, data, y2Accessor);
|
|
4355
|
-
}
|
|
4356
|
-
/**
|
|
4357
|
-
*
|
|
4358
|
-
* Returns a map from Y key to Y scale. E.g.
|
|
4359
|
-
* {
|
|
4360
|
-
* "frequency": Y,
|
|
4361
|
-
* "proportion": Y2
|
|
4362
|
-
* }
|
|
4363
|
-
*/
|
|
4364
|
-
getSubgroupScales(yKey, y, y2Key, y2) {
|
|
4365
|
-
const subgroupScales = {
|
|
4366
|
-
[yKey]: y
|
|
4367
|
-
};
|
|
4368
|
-
if (y2Key !== undefined && y2 !== undefined) {
|
|
4369
|
-
subgroupScales[y2Key] = y2;
|
|
4370
|
-
}
|
|
4371
|
-
return subgroupScales;
|
|
4372
|
-
}
|
|
4373
|
-
};
|
|
4374
|
-
|
|
4375
4116
|
class AxiomBar extends AxiomPlotRoot {
|
|
4376
4117
|
getMaxAccessorAtAxis(axis) {
|
|
4377
4118
|
const axisAccessors = this.getDomainAccessorsAtAxis(axis);
|
|
@@ -4429,6 +4170,9 @@ class AxiomBar extends AxiomPlotRoot {
|
|
|
4429
4170
|
if (ctx === null) {
|
|
4430
4171
|
return undefined;
|
|
4431
4172
|
}
|
|
4173
|
+
if (ctx === null) {
|
|
4174
|
+
return undefined;
|
|
4175
|
+
}
|
|
4432
4176
|
const xAxisScale = (_j = (_h = this === null || this === void 0 ? void 0 : this.axes) === null || _h === void 0 ? void 0 : _h.x) === null || _j === void 0 ? void 0 : _j.scale;
|
|
4433
4177
|
const yAxisScale = (_l = (_k = this === null || this === void 0 ? void 0 : this.axes) === null || _k === void 0 ? void 0 : _k.y) === null || _l === void 0 ? void 0 : _l.scale;
|
|
4434
4178
|
if (xAxisScale === undefined ||
|
|
@@ -4449,6 +4193,10 @@ class AxiomBar extends AxiomPlotRoot {
|
|
|
4449
4193
|
return p === undefined ? 0 : (p + offset);
|
|
4450
4194
|
};
|
|
4451
4195
|
};
|
|
4196
|
+
ctx.save();
|
|
4197
|
+
ctx.beginPath();
|
|
4198
|
+
ctx.rect(this.chart.settings.margin.left, this.chart.settings.margin.top, xScale.range()[1], yScale.range()[0]);
|
|
4199
|
+
ctx.clip();
|
|
4452
4200
|
const defaultColor = style.fill !== undefined ? style.fill : '#EDEDED';
|
|
4453
4201
|
ctx.fillStyle = defaultColor;
|
|
4454
4202
|
const rect = {};
|
|
@@ -4505,6 +4253,7 @@ class AxiomBar extends AxiomPlotRoot {
|
|
|
4505
4253
|
const y0 = rect.y0(row);
|
|
4506
4254
|
const y1 = rect.y1(row);
|
|
4507
4255
|
if (isDefined(row) && y0 !== undefined && y1 !== undefined) {
|
|
4256
|
+
// make sure bar doesn't go outside of chart area
|
|
4508
4257
|
const xVal = rect.x(row) - defaultSize / 2;
|
|
4509
4258
|
// add per feature style option
|
|
4510
4259
|
// ctx.fillStyle = i % 2 === 0 ? '#FF0000' : '#006699'
|
|
@@ -4540,15 +4289,13 @@ const chartTypes = {
|
|
|
4540
4289
|
Line: AxiomLine,
|
|
4541
4290
|
Area: AxiomArea,
|
|
4542
4291
|
Scatter: AxiomScatter,
|
|
4543
|
-
Bar: AxiomBar
|
|
4544
|
-
CategoricalBar: AxiomBar$1
|
|
4545
|
-
};
|
|
4292
|
+
Bar: AxiomBar};
|
|
4546
4293
|
|
|
4547
4294
|
function styleInject(css, ref) {
|
|
4548
4295
|
if ( ref === void 0 ) ref = {};
|
|
4549
4296
|
var insertAt = ref.insertAt;
|
|
4550
4297
|
|
|
4551
|
-
if (
|
|
4298
|
+
if (typeof document === 'undefined') { return; }
|
|
4552
4299
|
|
|
4553
4300
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
4554
4301
|
var style = document.createElement('style');
|
|
@@ -4579,6 +4326,9 @@ class AxiomChart extends ChartRoot {
|
|
|
4579
4326
|
if (axisSettings.ticks !== undefined) {
|
|
4580
4327
|
axis.ticks(axisSettings.ticks);
|
|
4581
4328
|
}
|
|
4329
|
+
if (axisSettings.tickValues !== undefined) {
|
|
4330
|
+
axis.tickValues(axisSettings.tickValues);
|
|
4331
|
+
}
|
|
4582
4332
|
if (axisSettings.tickFormat !== undefined) {
|
|
4583
4333
|
axis.tickFormat(axisSettings.tickFormat);
|
|
4584
4334
|
}
|
|
@@ -5513,7 +5263,7 @@ class AxiomRadialChart extends AxiomChart {
|
|
|
5513
5263
|
const tickFormat = d3Scale.tickFormat();
|
|
5514
5264
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5515
5265
|
// @ts-expect-error
|
|
5516
|
-
const
|
|
5266
|
+
const tickValues = (_c = (_b = (_a = this.settings.axes) === null || _a === void 0 ? void 0 : _a.x) === null || _b === void 0 ? void 0 : _b.tickValues) !== null && _c !== void 0 ? _c : d3Scale.ticks().map(tickFormat);
|
|
5517
5267
|
const rotateOffset = -90;
|
|
5518
5268
|
const getRotate = (index, len) => {
|
|
5519
5269
|
const r = (index * 360 / len);
|
|
@@ -5526,7 +5276,7 @@ class AxiomRadialChart extends AxiomChart {
|
|
|
5526
5276
|
.attr('transform', `translate(${offset.x},${offset.y}) rotate(${rotateOffset})`)
|
|
5527
5277
|
.attr('text-anchor', 'left')
|
|
5528
5278
|
.call(g => g.selectAll('g')
|
|
5529
|
-
.data(
|
|
5279
|
+
.data(tickValues)
|
|
5530
5280
|
.join('g')
|
|
5531
5281
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5532
5282
|
// @ts-expect-error
|