@pie-lib/graphing-module 1.1.2 → 1.2.1

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/module/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_prop_types, _dll_lodash, _dll_react, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_pie_lib__render_ui, _dll_react_dom, _dll_debug, _dll_classnames, _dll_material_ui__core_styles_color_manipulator} from "../../shared-module@^1.4.15/module/index.js";
1
+ import {_dll_prop_types, _dll_react, _dll_material_ui__core_styles, _dll_material_ui__core, _dll_pie_lib__render_ui, _dll_react_dom, _dll_lodash, _dll_debug, _dll_classnames, _dll_material_ui__core_styles_color_manipulator} from "../../shared-module@^1.4.18/module/index.js";
2
2
  const PropTypes$C = _dll_prop_types;
3
3
  const BaseDomainRangeType = {
4
4
  min: PropTypes$C.number.isRequired,
@@ -816,328 +816,15 @@ var index$4 = Object.freeze({
816
816
  },
817
817
  customEvent: customEvent
818
818
  });
819
- var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
820
- function getDefaultExportFromCjs(x) {
821
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
822
- }
823
- var invariant = function (condition, format, a, b, c, d, e, f) {
824
- {
825
- if (format === undefined) {
826
- throw new Error('invariant requires an error message argument');
827
- }
828
- }
829
- if (!condition) {
830
- var error;
831
- if (format === undefined) {
832
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
833
- } else {
834
- var args = [a, b, c, d, e, f];
835
- var argIndex = 0;
836
- error = new Error(format.replace(/%s/g, function () {
837
- return args[argIndex++];
838
- }));
839
- error.name = 'Invariant Violation';
840
- }
841
- error.framesToPop = 1;
842
- throw error;
843
- }
844
- };
845
- var browser = invariant;
846
- var pointGeometry = Point$2;
847
- function Point$2(x, y) {
848
- this.x = x;
849
- this.y = y;
850
- }
851
- Point$2.prototype = {
852
- clone: function () {
853
- return new Point$2(this.x, this.y);
854
- },
855
- add: function (p) {
856
- return this.clone()._add(p);
857
- },
858
- sub: function (p) {
859
- return this.clone()._sub(p);
860
- },
861
- multByPoint: function (p) {
862
- return this.clone()._multByPoint(p);
863
- },
864
- divByPoint: function (p) {
865
- return this.clone()._divByPoint(p);
866
- },
867
- mult: function (k) {
868
- return this.clone()._mult(k);
869
- },
870
- div: function (k) {
871
- return this.clone()._div(k);
872
- },
873
- rotate: function (a) {
874
- return this.clone()._rotate(a);
875
- },
876
- rotateAround: function (a, p) {
877
- return this.clone()._rotateAround(a, p);
878
- },
879
- matMult: function (m) {
880
- return this.clone()._matMult(m);
881
- },
882
- unit: function () {
883
- return this.clone()._unit();
884
- },
885
- perp: function () {
886
- return this.clone()._perp();
887
- },
888
- round: function () {
889
- return this.clone()._round();
890
- },
891
- mag: function () {
892
- return Math.sqrt(this.x * this.x + this.y * this.y);
893
- },
894
- equals: function (other) {
895
- return this.x === other.x && this.y === other.y;
896
- },
897
- dist: function (p) {
898
- return Math.sqrt(this.distSqr(p));
899
- },
900
- distSqr: function (p) {
901
- var dx = p.x - this.x, dy = p.y - this.y;
902
- return dx * dx + dy * dy;
903
- },
904
- angle: function () {
905
- return Math.atan2(this.y, this.x);
906
- },
907
- angleTo: function (b) {
908
- return Math.atan2(this.y - b.y, this.x - b.x);
909
- },
910
- angleWith: function (b) {
911
- return this.angleWithSep(b.x, b.y);
912
- },
913
- angleWithSep: function (x, y) {
914
- return Math.atan2(this.x * y - this.y * x, this.x * x + this.y * y);
915
- },
916
- _matMult: function (m) {
917
- var x = m[0] * this.x + m[1] * this.y, y = m[2] * this.x + m[3] * this.y;
918
- this.x = x;
919
- this.y = y;
920
- return this;
921
- },
922
- _add: function (p) {
923
- this.x += p.x;
924
- this.y += p.y;
925
- return this;
926
- },
927
- _sub: function (p) {
928
- this.x -= p.x;
929
- this.y -= p.y;
930
- return this;
931
- },
932
- _mult: function (k) {
933
- this.x *= k;
934
- this.y *= k;
935
- return this;
936
- },
937
- _div: function (k) {
938
- this.x /= k;
939
- this.y /= k;
940
- return this;
941
- },
942
- _multByPoint: function (p) {
943
- this.x *= p.x;
944
- this.y *= p.y;
945
- return this;
946
- },
947
- _divByPoint: function (p) {
948
- this.x /= p.x;
949
- this.y /= p.y;
950
- return this;
951
- },
952
- _unit: function () {
953
- this._div(this.mag());
954
- return this;
955
- },
956
- _perp: function () {
957
- var y = this.y;
958
- this.y = this.x;
959
- this.x = -y;
960
- return this;
961
- },
962
- _rotate: function (angle) {
963
- var cos = Math.cos(angle), sin = Math.sin(angle), x = cos * this.x - sin * this.y, y = sin * this.x + cos * this.y;
964
- this.x = x;
965
- this.y = y;
966
- return this;
967
- },
968
- _rotateAround: function (angle, p) {
969
- var cos = Math.cos(angle), sin = Math.sin(angle), x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y), y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);
970
- this.x = x;
971
- this.y = y;
972
- return this;
973
- },
974
- _round: function () {
975
- this.x = Math.round(this.x);
976
- this.y = Math.round(this.y);
977
- return this;
978
- }
979
- };
980
- Point$2.convert = function (a) {
981
- if (a instanceof Point$2) {
982
- return a;
983
- }
984
- if (Array.isArray(a)) {
985
- return new Point$2(a[0], a[1]);
986
- }
987
- return a;
988
- };
989
- const {range: range$2} = _dll_lodash;
990
- const {head: head$1} = _dll_lodash;
991
- const {tail: tail$1} = _dll_lodash;
992
- const {isEqual: isEqual$7} = _dll_lodash;
993
- const xy$1 = (x, y) => ({
994
- x,
995
- y
996
- });
997
- const buildSizeArray$1 = (size, padding) => {
998
- padding = Number.isFinite(padding) ? Math.max(padding, 0) : 0;
999
- browser(padding < size, 'padding must be less than size');
1000
- const half = Math.round(padding * 0.5);
1001
- return [half, size - half];
1002
- };
1003
- const tickCount$1 = (min, max, step) => {
1004
- browser(min < max, 'min must be less than max');
1005
- const size = Math.abs(min - max);
1006
- return Math.round(size / step);
1007
- };
1008
- function getInterval$1(domain, ticks) {
1009
- const {min, max} = domain;
1010
- const {major, minor} = ticks;
1011
- if (min >= max) {
1012
- throw new Error(`min is > max: ${min} > ${max}`);
1013
- }
1014
- const distance = max - min;
1015
- const minorTicks = minor > 0 ? minor + 1 : 1;
1016
- const normalizedMajor = major - 1;
1017
- if (isNaN(normalizedMajor)) {
1018
- throw new Error('Tick Frequency must be 2 or higher');
1019
- }
1020
- if (normalizedMajor <= 0) {
1021
- throw new Error('Tick Frequency must be 2 or higher');
1022
- }
1023
- const divider = normalizedMajor * minorTicks;
1024
- const raw = distance / divider;
1025
- return parseFloat(Number(raw).toFixed(4));
1026
- }
1027
- const mkRange$1 = (min, max, interval) => {
1028
- const raw = range$2(min, max, interval);
1029
- raw.splice(raw.length, 1, max);
1030
- return raw;
1031
- };
1032
- function snapTo$1(min, max, interval, value) {
1033
- if (value >= max) {
1034
- return max;
1035
- }
1036
- if (value <= min) {
1037
- return min;
1038
- }
1039
- let rng = mkRange$1(min, max, interval);
1040
- rng = rng.filter(v => {
1041
- return Math.abs(value - v) <= interval;
1042
- });
1043
- return rng.length && rng.reduce((prev, curr) => {
1044
- const currentDistance = Math.abs(curr - value);
1045
- const previousDistance = Math.abs(prev - value);
1046
- return currentDistance <= previousDistance ? curr : prev;
1047
- });
1048
- }
1049
- function buildTickModel$1(domain, ticks, interval, scaleFn) {
1050
- const rng = mkRange$1(domain.min, domain.max, interval);
1051
- return rng.map((r, index) => {
1052
- const isMajor = index % (ticks.minor + 1) === 0;
1053
- return {
1054
- value: r,
1055
- major: isMajor,
1056
- x: scaleFn(r)
1057
- };
1058
- });
1059
- }
1060
- const polygonToArea$2 = points => {
1061
- const h = head$1(points);
1062
- const area = {
1063
- left: h.x,
1064
- top: h.y,
1065
- bottom: h.y,
1066
- right: h.x
1067
- };
1068
- return tail$1(points).reduce((a, p) => {
1069
- a.left = Math.min(a.left, p.x);
1070
- a.top = Math.max(a.top, p.y);
1071
- a.bottom = Math.min(a.bottom, p.y);
1072
- a.right = Math.max(a.right, p.x);
1073
- return a;
1074
- }, area);
1075
- };
1076
- const lineToArea$2 = (from, to) => {
1077
- const left = Math.min(from.x, to.x);
1078
- const top = Math.max(from.y, to.y);
1079
- const bottom = Math.min(from.y, to.y);
1080
- const right = Math.max(from.x, to.x);
1081
- return {
1082
- left,
1083
- top,
1084
- bottom,
1085
- right
1086
- };
1087
- };
1088
- const bounds$2 = (area, domain, range) => {
1089
- return {
1090
- left: domain.min - area.left,
1091
- right: Math.abs(area.right - domain.max),
1092
- top: Math.abs(area.top - range.max),
1093
- bottom: range.min - area.bottom
1094
- };
1095
- };
1096
- const point$4 = o => new pointGeometry(o.x, o.y);
1097
- const getDelta$1 = (from, to) => {
1098
- return point$4(to).sub(point$4(from));
1099
- };
1100
- const bandKey$1 = (d, index) => `${index}-${d.label || '-'}`;
1101
- const isDomainRangeEqual$1 = (graphProps, nextGraphProps) => {
1102
- return isEqual$7(graphProps.domain, nextGraphProps.domain) && isEqual$7(graphProps.range, nextGraphProps.range);
1103
- };
1104
- const findLongestWord$2 = label => {
1105
- let longestWord = (label || '').replace(/<[^>]+>/g, '').split(' ').sort((a, b) => b.length - a.length);
1106
- return longestWord[0].length;
1107
- };
1108
- const amountToIncreaseWidth$2 = longestWord => {
1109
- if (!longestWord) {
1110
- return 0;
1111
- }
1112
- return longestWord * 20;
1113
- };
1114
- var utils$1 = Object.freeze({
1115
- __proto__: null,
1116
- xy: xy$1,
1117
- buildSizeArray: buildSizeArray$1,
1118
- tickCount: tickCount$1,
1119
- getInterval: getInterval$1,
1120
- snapTo: snapTo$1,
1121
- buildTickModel: buildTickModel$1,
1122
- polygonToArea: polygonToArea$2,
1123
- lineToArea: lineToArea$2,
1124
- bounds: bounds$2,
1125
- point: point$4,
1126
- getDelta: getDelta$1,
1127
- bandKey: bandKey$1,
1128
- isDomainRangeEqual: isDomainRangeEqual$1,
1129
- findLongestWord: findLongestWord$2,
1130
- amountToIncreaseWidth: amountToIncreaseWidth$2
1131
- });
1132
819
  const React$D = _dll_react;
1133
820
  const {withStyles: withStyles$k} = _dll_material_ui__core_styles;
1134
821
  const {Typography: Typography} = _dll_material_ui__core;
1135
822
  const PropTypes$B = _dll_prop_types;
1136
- const {color: color$g} = _dll_pie_lib__render_ui;
823
+ const {color: color$h} = _dll_pie_lib__render_ui;
1137
824
  const _jsxFileName$v = "/home/circleci/repo/packages/plot/src/root.jsx";
1138
825
  const GraphTitle = withStyles$k(theme => ({
1139
826
  title: {
1140
- color: color$g.text(),
827
+ color: color$h.text(),
1141
828
  textAlign: 'center',
1142
829
  paddingTop: theme.spacing.unit * 2,
1143
830
  fontSize: theme.typography.fontSize + 6
@@ -1152,7 +839,7 @@ const GraphTitle = withStyles$k(theme => ({
1152
839
  __self: undefined,
1153
840
  __source: {
1154
841
  fileName: _jsxFileName$v,
1155
- lineNumber: 19
842
+ lineNumber: 18
1156
843
  }
1157
844
  }));
1158
845
  class Root$1 extends React$D.Component {
@@ -1167,8 +854,7 @@ class Root$1 extends React$D.Component {
1167
854
  graphProps: GraphPropsType.isRequired,
1168
855
  onMouseMove: PropTypes$B.func,
1169
856
  classes: PropTypes$B.object.isRequired,
1170
- rootRef: PropTypes$B.func,
1171
- paddingLeft: PropTypes$B.number
857
+ rootRef: PropTypes$B.func
1172
858
  };
1173
859
  }
1174
860
  __init() {
@@ -1197,13 +883,12 @@ class Root$1 extends React$D.Component {
1197
883
  g.on('mousemove', null);
1198
884
  }
1199
885
  render() {
1200
- const {graphProps, children, classes, title, rootRef, paddingLeft} = this.props;
1201
- const {size, domain} = graphProps;
1202
- const padding = 50;
1203
- const longestWord = findLongestWord$2(domain.axisLabel);
1204
- const increaseWidth = amountToIncreaseWidth$2(longestWord);
1205
- const finalWidth = size.width + padding * 2 + increaseWidth;
1206
- const finalHeight = size.height + padding * 2;
886
+ const {graphProps, children, classes, title, rootRef} = this.props;
887
+ const {size: {width = 500, height = 500}, domain, range} = graphProps;
888
+ const topPadding = 50;
889
+ const leftPadding = topPadding + 10;
890
+ const finalWidth = width + leftPadding * 2 + (domain.padding || 0) * 2;
891
+ const finalHeight = height + topPadding * 2 + (range.padding || 0) * 2;
1207
892
  return React$D.createElement('div', {
1208
893
  className: classes.root,
1209
894
  __self: this,
@@ -1235,7 +920,7 @@ class Root$1 extends React$D.Component {
1235
920
  }
1236
921
  },
1237
922
  className: classes.graphBox,
1238
- transform: `translate(${paddingLeft || padding}, ${padding})`,
923
+ transform: `translate(${leftPadding}, ${topPadding})`,
1239
924
  __self: this,
1240
925
  __source: {
1241
926
  fileName: _jsxFileName$v,
@@ -1247,9 +932,9 @@ class Root$1 extends React$D.Component {
1247
932
  Root$1.__initStatic();
1248
933
  const styles$8 = () => ({
1249
934
  root: {
1250
- border: `solid 1px ${color$g.primaryLight()}`,
1251
- color: color$g.text(),
1252
- backgroundColor: color$g.background()
935
+ border: `solid 1px ${color$h.primaryLight()}`,
936
+ color: color$h.text(),
937
+ backgroundColor: color$h.background()
1253
938
  },
1254
939
  svg: {},
1255
940
  graphBox: {
@@ -1258,6 +943,10 @@ const styles$8 = () => ({
1258
943
  }
1259
944
  });
1260
945
  var Root$2 = withStyles$k(styles$8)(Root$1);
946
+ var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
947
+ function getDefaultExportFromCjs(x) {
948
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
949
+ }
1261
950
  var reactDraggable = {
1262
951
  exports: {}
1263
952
  };
@@ -2615,6 +2304,315 @@ class LocalDraggable extends Draggable {
2615
2304
  });
2616
2305
  }
2617
2306
  }
2307
+ var invariant = function (condition, format, a, b, c, d, e, f) {
2308
+ {
2309
+ if (format === undefined) {
2310
+ throw new Error('invariant requires an error message argument');
2311
+ }
2312
+ }
2313
+ if (!condition) {
2314
+ var error;
2315
+ if (format === undefined) {
2316
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
2317
+ } else {
2318
+ var args = [a, b, c, d, e, f];
2319
+ var argIndex = 0;
2320
+ error = new Error(format.replace(/%s/g, function () {
2321
+ return args[argIndex++];
2322
+ }));
2323
+ error.name = 'Invariant Violation';
2324
+ }
2325
+ error.framesToPop = 1;
2326
+ throw error;
2327
+ }
2328
+ };
2329
+ var browser = invariant;
2330
+ var pointGeometry = Point$2;
2331
+ function Point$2(x, y) {
2332
+ this.x = x;
2333
+ this.y = y;
2334
+ }
2335
+ Point$2.prototype = {
2336
+ clone: function () {
2337
+ return new Point$2(this.x, this.y);
2338
+ },
2339
+ add: function (p) {
2340
+ return this.clone()._add(p);
2341
+ },
2342
+ sub: function (p) {
2343
+ return this.clone()._sub(p);
2344
+ },
2345
+ multByPoint: function (p) {
2346
+ return this.clone()._multByPoint(p);
2347
+ },
2348
+ divByPoint: function (p) {
2349
+ return this.clone()._divByPoint(p);
2350
+ },
2351
+ mult: function (k) {
2352
+ return this.clone()._mult(k);
2353
+ },
2354
+ div: function (k) {
2355
+ return this.clone()._div(k);
2356
+ },
2357
+ rotate: function (a) {
2358
+ return this.clone()._rotate(a);
2359
+ },
2360
+ rotateAround: function (a, p) {
2361
+ return this.clone()._rotateAround(a, p);
2362
+ },
2363
+ matMult: function (m) {
2364
+ return this.clone()._matMult(m);
2365
+ },
2366
+ unit: function () {
2367
+ return this.clone()._unit();
2368
+ },
2369
+ perp: function () {
2370
+ return this.clone()._perp();
2371
+ },
2372
+ round: function () {
2373
+ return this.clone()._round();
2374
+ },
2375
+ mag: function () {
2376
+ return Math.sqrt(this.x * this.x + this.y * this.y);
2377
+ },
2378
+ equals: function (other) {
2379
+ return this.x === other.x && this.y === other.y;
2380
+ },
2381
+ dist: function (p) {
2382
+ return Math.sqrt(this.distSqr(p));
2383
+ },
2384
+ distSqr: function (p) {
2385
+ var dx = p.x - this.x, dy = p.y - this.y;
2386
+ return dx * dx + dy * dy;
2387
+ },
2388
+ angle: function () {
2389
+ return Math.atan2(this.y, this.x);
2390
+ },
2391
+ angleTo: function (b) {
2392
+ return Math.atan2(this.y - b.y, this.x - b.x);
2393
+ },
2394
+ angleWith: function (b) {
2395
+ return this.angleWithSep(b.x, b.y);
2396
+ },
2397
+ angleWithSep: function (x, y) {
2398
+ return Math.atan2(this.x * y - this.y * x, this.x * x + this.y * y);
2399
+ },
2400
+ _matMult: function (m) {
2401
+ var x = m[0] * this.x + m[1] * this.y, y = m[2] * this.x + m[3] * this.y;
2402
+ this.x = x;
2403
+ this.y = y;
2404
+ return this;
2405
+ },
2406
+ _add: function (p) {
2407
+ this.x += p.x;
2408
+ this.y += p.y;
2409
+ return this;
2410
+ },
2411
+ _sub: function (p) {
2412
+ this.x -= p.x;
2413
+ this.y -= p.y;
2414
+ return this;
2415
+ },
2416
+ _mult: function (k) {
2417
+ this.x *= k;
2418
+ this.y *= k;
2419
+ return this;
2420
+ },
2421
+ _div: function (k) {
2422
+ this.x /= k;
2423
+ this.y /= k;
2424
+ return this;
2425
+ },
2426
+ _multByPoint: function (p) {
2427
+ this.x *= p.x;
2428
+ this.y *= p.y;
2429
+ return this;
2430
+ },
2431
+ _divByPoint: function (p) {
2432
+ this.x /= p.x;
2433
+ this.y /= p.y;
2434
+ return this;
2435
+ },
2436
+ _unit: function () {
2437
+ this._div(this.mag());
2438
+ return this;
2439
+ },
2440
+ _perp: function () {
2441
+ var y = this.y;
2442
+ this.y = this.x;
2443
+ this.x = -y;
2444
+ return this;
2445
+ },
2446
+ _rotate: function (angle) {
2447
+ var cos = Math.cos(angle), sin = Math.sin(angle), x = cos * this.x - sin * this.y, y = sin * this.x + cos * this.y;
2448
+ this.x = x;
2449
+ this.y = y;
2450
+ return this;
2451
+ },
2452
+ _rotateAround: function (angle, p) {
2453
+ var cos = Math.cos(angle), sin = Math.sin(angle), x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y), y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);
2454
+ this.x = x;
2455
+ this.y = y;
2456
+ return this;
2457
+ },
2458
+ _round: function () {
2459
+ this.x = Math.round(this.x);
2460
+ this.y = Math.round(this.y);
2461
+ return this;
2462
+ }
2463
+ };
2464
+ Point$2.convert = function (a) {
2465
+ if (a instanceof Point$2) {
2466
+ return a;
2467
+ }
2468
+ if (Array.isArray(a)) {
2469
+ return new Point$2(a[0], a[1]);
2470
+ }
2471
+ return a;
2472
+ };
2473
+ const {range: range$2} = _dll_lodash;
2474
+ const {head: head$1} = _dll_lodash;
2475
+ const {tail: tail$1} = _dll_lodash;
2476
+ const {isEqual: isEqual$7} = _dll_lodash;
2477
+ const xy$1 = (x, y) => ({
2478
+ x,
2479
+ y
2480
+ });
2481
+ const buildSizeArray$1 = (size, padding) => {
2482
+ padding = Number.isFinite(padding) ? Math.max(padding, 0) : 0;
2483
+ browser(padding < size, 'padding must be less than size');
2484
+ const half = Math.round(padding * 0.5);
2485
+ return [half, size - half];
2486
+ };
2487
+ const tickCount$1 = (min, max, step) => {
2488
+ browser(min < max, 'min must be less than max');
2489
+ const size = Math.abs(min - max);
2490
+ return Math.round(size / step);
2491
+ };
2492
+ function getInterval$1(domain, ticks) {
2493
+ const {min, max} = domain;
2494
+ const {major, minor} = ticks;
2495
+ if (min >= max) {
2496
+ throw new Error(`min is > max: ${min} > ${max}`);
2497
+ }
2498
+ const distance = max - min;
2499
+ const minorTicks = minor > 0 ? minor + 1 : 1;
2500
+ const normalizedMajor = major - 1;
2501
+ if (isNaN(normalizedMajor)) {
2502
+ throw new Error('Tick Frequency must be 2 or higher');
2503
+ }
2504
+ if (normalizedMajor <= 0) {
2505
+ throw new Error('Tick Frequency must be 2 or higher');
2506
+ }
2507
+ const divider = normalizedMajor * minorTicks;
2508
+ const raw = distance / divider;
2509
+ return parseFloat(Number(raw).toFixed(4));
2510
+ }
2511
+ const mkRange$1 = (min, max, interval) => {
2512
+ const raw = range$2(min, max, interval);
2513
+ raw.splice(raw.length, 1, max);
2514
+ return raw;
2515
+ };
2516
+ function snapTo$1(min, max, interval, value) {
2517
+ if (value >= max) {
2518
+ return max;
2519
+ }
2520
+ if (value <= min) {
2521
+ return min;
2522
+ }
2523
+ let rng = mkRange$1(min, max, interval);
2524
+ rng = rng.filter(v => {
2525
+ return Math.abs(value - v) <= interval;
2526
+ });
2527
+ return rng.length && rng.reduce((prev, curr) => {
2528
+ const currentDistance = Math.abs(curr - value);
2529
+ const previousDistance = Math.abs(prev - value);
2530
+ return currentDistance <= previousDistance ? curr : prev;
2531
+ });
2532
+ }
2533
+ function buildTickModel$1(domain, ticks, interval, scaleFn) {
2534
+ const rng = mkRange$1(domain.min, domain.max, interval);
2535
+ return rng.map((r, index) => {
2536
+ const isMajor = index % (ticks.minor + 1) === 0;
2537
+ return {
2538
+ value: r,
2539
+ major: isMajor,
2540
+ x: scaleFn(r)
2541
+ };
2542
+ });
2543
+ }
2544
+ const polygonToArea$2 = points => {
2545
+ const h = head$1(points);
2546
+ const area = {
2547
+ left: h.x,
2548
+ top: h.y,
2549
+ bottom: h.y,
2550
+ right: h.x
2551
+ };
2552
+ return tail$1(points).reduce((a, p) => {
2553
+ a.left = Math.min(a.left, p.x);
2554
+ a.top = Math.max(a.top, p.y);
2555
+ a.bottom = Math.min(a.bottom, p.y);
2556
+ a.right = Math.max(a.right, p.x);
2557
+ return a;
2558
+ }, area);
2559
+ };
2560
+ const lineToArea$2 = (from, to) => {
2561
+ const left = Math.min(from.x, to.x);
2562
+ const top = Math.max(from.y, to.y);
2563
+ const bottom = Math.min(from.y, to.y);
2564
+ const right = Math.max(from.x, to.x);
2565
+ return {
2566
+ left,
2567
+ top,
2568
+ bottom,
2569
+ right
2570
+ };
2571
+ };
2572
+ const bounds$2 = (area, domain, range) => {
2573
+ return {
2574
+ left: domain.min - area.left,
2575
+ right: Math.abs(area.right - domain.max),
2576
+ top: Math.abs(area.top - range.max),
2577
+ bottom: range.min - area.bottom
2578
+ };
2579
+ };
2580
+ const point$4 = o => new pointGeometry(o.x, o.y);
2581
+ const getDelta$1 = (from, to) => {
2582
+ return point$4(to).sub(point$4(from));
2583
+ };
2584
+ const bandKey$1 = (d, index) => `${index}-${d.label || '-'}`;
2585
+ const isDomainRangeEqual$1 = (graphProps, nextGraphProps) => {
2586
+ return isEqual$7(graphProps.domain, nextGraphProps.domain) && isEqual$7(graphProps.range, nextGraphProps.range);
2587
+ };
2588
+ const findLongestWord$2 = label => {
2589
+ let longestWord = (label || '').replace(/<[^>]+>/g, '').split(' ').sort((a, b) => b.length - a.length);
2590
+ return longestWord[0].length;
2591
+ };
2592
+ const amountToIncreaseWidth$2 = longestWord => {
2593
+ if (!longestWord) {
2594
+ return 0;
2595
+ }
2596
+ return longestWord * 20;
2597
+ };
2598
+ var utils$1 = Object.freeze({
2599
+ __proto__: null,
2600
+ xy: xy$1,
2601
+ buildSizeArray: buildSizeArray$1,
2602
+ tickCount: tickCount$1,
2603
+ getInterval: getInterval$1,
2604
+ snapTo: snapTo$1,
2605
+ buildTickModel: buildTickModel$1,
2606
+ polygonToArea: polygonToArea$2,
2607
+ lineToArea: lineToArea$2,
2608
+ bounds: bounds$2,
2609
+ point: point$4,
2610
+ getDelta: getDelta$1,
2611
+ bandKey: bandKey$1,
2612
+ isDomainRangeEqual: isDomainRangeEqual$1,
2613
+ findLongestWord: findLongestWord$2,
2614
+ amountToIncreaseWidth: amountToIncreaseWidth$2
2615
+ });
2618
2616
  const React$C = _dll_react;
2619
2617
  const PropTypes$A = _dll_prop_types;
2620
2618
  const debug$9 = _dll_debug;
@@ -3569,7 +3567,7 @@ var named = {
3569
3567
  yellow: 0xffff00,
3570
3568
  yellowgreen: 0x9acd32
3571
3569
  };
3572
- define(Color, color$f, {
3570
+ define(Color, color$g, {
3573
3571
  copy: function (channels) {
3574
3572
  return Object.assign(new this.constructor(), this, channels);
3575
3573
  },
@@ -3591,7 +3589,7 @@ function color_formatHsl() {
3591
3589
  function color_formatRgb() {
3592
3590
  return this.rgb().formatRgb();
3593
3591
  }
3594
- function color$f(format) {
3592
+ function color$g(format) {
3595
3593
  var m, l;
3596
3594
  format = (format + "").trim().toLowerCase();
3597
3595
  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) : null) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
@@ -3604,7 +3602,7 @@ function rgba(r, g, b, a) {
3604
3602
  return new Rgb(r, g, b, a);
3605
3603
  }
3606
3604
  function rgbConvert(o) {
3607
- if (!(o instanceof Color)) o = color$f(o);
3605
+ if (!(o instanceof Color)) o = color$g(o);
3608
3606
  if (!o) return new Rgb();
3609
3607
  o = o.rgb();
3610
3608
  return new Rgb(o.r, o.g, o.b, o.opacity);
@@ -3656,7 +3654,7 @@ function hsla(h, s, l, a) {
3656
3654
  }
3657
3655
  function hslConvert(o) {
3658
3656
  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
3659
- if (!(o instanceof Color)) o = color$f(o);
3657
+ if (!(o instanceof Color)) o = color$g(o);
3660
3658
  if (!o) return new Hsl();
3661
3659
  if (o instanceof Hsl) return o;
3662
3660
  o = o.rgb();
@@ -3831,7 +3829,7 @@ function string(a, b) {
3831
3829
  }
3832
3830
  function interpolateValue(a, b) {
3833
3831
  var t = typeof b, c;
3834
- return b == null || t === "boolean" ? constant$2(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color$f(b)) ? (b = c, rgb) : string : b instanceof color$f ? rgb : b instanceof Date ? date$1 : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b);
3832
+ return b == null || t === "boolean" ? constant$2(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color$g(b)) ? (b = c, rgb) : string : b instanceof color$g ? rgb : b instanceof Date ? date$1 : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b);
3835
3833
  }
3836
3834
  function interpolateRound(a, b) {
3837
3835
  return (a = +a, b = +b, function (t) {
@@ -5559,13 +5557,11 @@ const createSnapMinAndMax = ({min, max, step}) => {
5559
5557
  const create = (domain, range, size, getRootNode) => {
5560
5558
  browser(domain.min < domain.max, 'domain: min must be less than max');
5561
5559
  browser(range.min < range.max, 'range: min must be less than max');
5562
- const widthArray = buildSizeArray$1(size.width, domain.padding);
5563
- const heightArray = buildSizeArray$1(size.height, range.padding);
5564
5560
  const domainMinMax = createSnapMinAndMax(domain);
5565
5561
  const rangeMinMax = createSnapMinAndMax(range);
5566
5562
  const scale = {
5567
- x: linear().domain([domain.min, domain.max]).range(widthArray),
5568
- y: linear().domain([range.max, range.min]).range(heightArray)
5563
+ x: linear().domain([domain.min, domain.max]).range([0, size.width]),
5564
+ y: linear().domain([range.max, range.min]).range([0, size.height])
5569
5565
  };
5570
5566
  const snap = {
5571
5567
  x: snapTo$1.bind(null, domainMinMax.min, domainMinMax.max, domainMinMax.step),
@@ -5593,7 +5589,7 @@ var index$2 = Object.freeze({
5593
5589
  const React$B = _dll_react;
5594
5590
  const PropTypes$z = _dll_prop_types;
5595
5591
  const {withStyles: withStyles$j} = _dll_material_ui__core_styles;
5596
- const {color: color$e} = _dll_pie_lib__render_ui;
5592
+ const {color: color$f} = _dll_pie_lib__render_ui;
5597
5593
  const {Readable: Readable$1} = _dll_pie_lib__render_ui;
5598
5594
  const _jsxFileName$t = "/home/circleci/repo/packages/graphing/src/labels.jsx";
5599
5595
  const rotations = {
@@ -5640,9 +5636,11 @@ class RawLabel extends React$B.Component {
5640
5636
  }
5641
5637
  render() {
5642
5638
  const {text, side, graphProps, classes} = this.props;
5643
- const {size} = graphProps;
5644
- const transform = getTransform(side, size.width, size.height);
5645
- const width = side === 'left' || side === 'right' ? size.height : size.width;
5639
+ const {size, domain, range} = graphProps;
5640
+ const totalHeight = (size.height || 500) + (range.padding || 0) * 2;
5641
+ const totalWidth = (size.width || 500) + (domain.padding || 0) * 2;
5642
+ const transform = getTransform(side, totalWidth, totalHeight);
5643
+ const width = side === 'left' || side === 'right' ? totalHeight : totalWidth;
5646
5644
  const height = 36;
5647
5645
  const y = getY(side, height);
5648
5646
  return React$B.createElement('foreignObject', {
@@ -5655,14 +5653,14 @@ class RawLabel extends React$B.Component {
5655
5653
  __self: this,
5656
5654
  __source: {
5657
5655
  fileName: _jsxFileName$t,
5658
- lineNumber: 63
5656
+ lineNumber: 64
5659
5657
  }
5660
5658
  }, React$B.createElement(Readable$1, {
5661
5659
  false: true,
5662
5660
  __self: this,
5663
5661
  __source: {
5664
5662
  fileName: _jsxFileName$t,
5665
- lineNumber: 71
5663
+ lineNumber: 72
5666
5664
  }
5667
5665
  }, React$B.createElement('div', {
5668
5666
  dangerouslySetInnerHTML: {
@@ -5672,7 +5670,7 @@ class RawLabel extends React$B.Component {
5672
5670
  __self: this,
5673
5671
  __source: {
5674
5672
  fileName: _jsxFileName$t,
5675
- lineNumber: 72
5673
+ lineNumber: 73
5676
5674
  }
5677
5675
  })));
5678
5676
  }
@@ -5680,7 +5678,7 @@ class RawLabel extends React$B.Component {
5680
5678
  RawLabel.__initStatic();
5681
5679
  const Label = withStyles$j(theme => ({
5682
5680
  label: {
5683
- fill: color$e.secondary()
5681
+ fill: color$f.secondary()
5684
5682
  },
5685
5683
  axisLabel: {
5686
5684
  fontSize: theme.typography.fontSize,
@@ -5711,7 +5709,7 @@ class Labels extends React$B.Component {
5711
5709
  __self: this,
5712
5710
  __source: {
5713
5711
  fileName: _jsxFileName$t,
5714
- lineNumber: 108
5712
+ lineNumber: 111
5715
5713
  }
5716
5714
  }, value && value.left && React$B.createElement(Label, {
5717
5715
  key: "left",
@@ -5721,7 +5719,7 @@ class Labels extends React$B.Component {
5721
5719
  __self: this,
5722
5720
  __source: {
5723
5721
  fileName: _jsxFileName$t,
5724
- lineNumber: 110
5722
+ lineNumber: 113
5725
5723
  }
5726
5724
  }), value && value.top && React$B.createElement(Label, {
5727
5725
  key: "top",
@@ -5731,7 +5729,7 @@ class Labels extends React$B.Component {
5731
5729
  __self: this,
5732
5730
  __source: {
5733
5731
  fileName: _jsxFileName$t,
5734
- lineNumber: 113
5732
+ lineNumber: 116
5735
5733
  }
5736
5734
  }), value && value.bottom && React$B.createElement(Label, {
5737
5735
  key: "bottom",
@@ -5741,7 +5739,7 @@ class Labels extends React$B.Component {
5741
5739
  __self: this,
5742
5740
  __source: {
5743
5741
  fileName: _jsxFileName$t,
5744
- lineNumber: 116
5742
+ lineNumber: 119
5745
5743
  }
5746
5744
  }), value && value.right && React$B.createElement(Label, {
5747
5745
  key: "right",
@@ -5751,7 +5749,7 @@ class Labels extends React$B.Component {
5751
5749
  __self: this,
5752
5750
  __source: {
5753
5751
  fileName: _jsxFileName$t,
5754
- lineNumber: 119
5752
+ lineNumber: 122
5755
5753
  }
5756
5754
  }));
5757
5755
  }
@@ -8531,7 +8529,7 @@ const isDuplicatedMark = (mark, marks, oldMark) => {
8531
8529
  const React$v = _dll_react;
8532
8530
  const PropTypes$t = _dll_prop_types;
8533
8531
  const {withStyles: withStyles$h} = _dll_material_ui__core;
8534
- const {color: color$d} = _dll_pie_lib__render_ui;
8532
+ const {color: color$e} = _dll_pie_lib__render_ui;
8535
8533
  const {Readable: Readable} = _dll_pie_lib__render_ui;
8536
8534
  const _jsxFileName$r = "/home/circleci/repo/packages/graphing/src/axis/axes.jsx";
8537
8535
  const AxisPropTypes = {
@@ -8548,16 +8546,16 @@ const AxisDefaultProps = {
8548
8546
  };
8549
8547
  const axisStyles = theme => ({
8550
8548
  line: {
8551
- stroke: color$d.primary(),
8549
+ stroke: color$e.primary(),
8552
8550
  strokeWidth: 5
8553
8551
  },
8554
8552
  arrow: {
8555
- fill: color$d.primary()
8553
+ fill: color$e.primary()
8556
8554
  },
8557
8555
  tick: {
8558
- fill: color$d.primary(),
8556
+ fill: color$e.primary(),
8559
8557
  '& > line': {
8560
- stroke: color$d.primary()
8558
+ stroke: color$e.primary()
8561
8559
  }
8562
8560
  },
8563
8561
  labelFontSize: {
@@ -8722,11 +8720,11 @@ class RawYAxis extends React$v.Component {
8722
8720
  tickClassName: classes.tick,
8723
8721
  tickFormat: customTickFormat,
8724
8722
  tickLabelProps: value => {
8725
- const digits = value.toLocaleString().length || 1;
8723
+ let digits = value.toLocaleString().replace(/[.-]/g, '').length || 1;
8726
8724
  return {
8727
8725
  ...tickLabelStyles,
8728
8726
  dy: 4,
8729
- dx: -4 - digits * 8,
8727
+ dx: -10 - digits * 9,
8730
8728
  'data-pie-readable': false
8731
8729
  };
8732
8730
  },
@@ -8747,7 +8745,7 @@ class RawYAxis extends React$v.Component {
8747
8745
  __self: this,
8748
8746
  __source: {
8749
8747
  fileName: _jsxFileName$r,
8750
- lineNumber: 213
8748
+ lineNumber: 214
8751
8749
  }
8752
8750
  }), includeArrows && includeArrows.up && React$v.createElement(Arrow$3, {
8753
8751
  direction: "up",
@@ -8758,7 +8756,7 @@ class RawYAxis extends React$v.Component {
8758
8756
  __self: this,
8759
8757
  __source: {
8760
8758
  fileName: _jsxFileName$r,
8761
- lineNumber: 216
8759
+ lineNumber: 217
8762
8760
  }
8763
8761
  }), range.axisLabel && React$v.createElement('foreignObject', {
8764
8762
  x: scale.x(0) - necessaryWidth / 2,
@@ -8768,14 +8766,14 @@ class RawYAxis extends React$v.Component {
8768
8766
  __self: this,
8769
8767
  __source: {
8770
8768
  fileName: _jsxFileName$r,
8771
- lineNumber: 219
8769
+ lineNumber: 220
8772
8770
  }
8773
8771
  }, React$v.createElement(Readable, {
8774
8772
  false: true,
8775
8773
  __self: this,
8776
8774
  __source: {
8777
8775
  fileName: _jsxFileName$r,
8778
- lineNumber: 225
8776
+ lineNumber: 226
8779
8777
  }
8780
8778
  }, React$v.createElement('div', {
8781
8779
  dangerouslySetInnerHTML: {
@@ -8785,7 +8783,7 @@ class RawYAxis extends React$v.Component {
8785
8783
  __self: this,
8786
8784
  __source: {
8787
8785
  fileName: _jsxFileName$r,
8788
- lineNumber: 226
8786
+ lineNumber: 227
8789
8787
  }
8790
8788
  }))));
8791
8789
  }
@@ -8859,7 +8857,7 @@ class Axes extends React$v.Component {
8859
8857
  __self: this,
8860
8858
  __source: {
8861
8859
  fileName: _jsxFileName$r,
8862
- lineNumber: 307
8860
+ lineNumber: 308
8863
8861
  }
8864
8862
  }, range.min <= 0 ? React$v.createElement(XAxis, {
8865
8863
  ...this.props,
@@ -8870,7 +8868,7 @@ class Axes extends React$v.Component {
8870
8868
  __self: this,
8871
8869
  __source: {
8872
8870
  fileName: _jsxFileName$r,
8873
- lineNumber: 309
8871
+ lineNumber: 310
8874
8872
  }
8875
8873
  }) : null, domain.min <= 0 ? React$v.createElement(YAxis, {
8876
8874
  ...this.props,
@@ -8880,7 +8878,7 @@ class Axes extends React$v.Component {
8880
8878
  __self: this,
8881
8879
  __source: {
8882
8880
  fileName: _jsxFileName$r,
8883
- lineNumber: 318
8881
+ lineNumber: 319
8884
8882
  }
8885
8883
  }) : null);
8886
8884
  }
@@ -9069,12 +9067,18 @@ function Grid$2(_ref) {
9069
9067
  }
9070
9068
  const React$t = _dll_react;
9071
9069
  const PropTypes$r = _dll_prop_types;
9070
+ const {color: color$d} = _dll_pie_lib__render_ui;
9072
9071
  const {withStyles: withStyles$g} = _dll_material_ui__core_styles;
9073
9072
  const _jsxFileName$q = "/home/circleci/repo/packages/graphing/src/grid.jsx";
9074
9073
  class Grid extends React$t.Component {
9074
+ constructor(...args) {
9075
+ super(...args);
9076
+ Grid.prototype.__init.call(this);
9077
+ }
9075
9078
  static __initStatic() {
9076
9079
  this.propTypes = {
9077
9080
  disabled: PropTypes$r.bool,
9081
+ disabledAdditionalGrid: PropTypes$r.bool,
9078
9082
  classes: PropTypes$r.object.isRequired,
9079
9083
  graphProps: GraphPropsType.isRequired
9080
9084
  };
@@ -9084,26 +9088,80 @@ class Grid extends React$t.Component {
9084
9088
  const {graphProps: nextGraphProps} = nextProps;
9085
9089
  return !isDomainRangeEqual$1(graphProps, nextGraphProps);
9086
9090
  }
9091
+ __init() {
9092
+ this.getAdditionalGridProps = (rowTickValues, columnTickValues) => {
9093
+ const {graphProps: {scale, size: {width, height}, domain, range}} = this.props;
9094
+ const rowTickLabelValues = getTickValues({
9095
+ ...range,
9096
+ step: range.labelStep
9097
+ }).filter(value => rowTickValues.includes(value));
9098
+ const columnTickLabelValues = getTickValues({
9099
+ ...domain,
9100
+ step: domain.labelStep
9101
+ }).filter(value => columnTickValues.includes(value));
9102
+ const minValueLength = rowTickLabelValues.length && Math.min(...rowTickLabelValues).toString().replace(/[.-]/g, '').length || 1;
9103
+ const maxValueLength = rowTickLabelValues.length && Math.max(...rowTickLabelValues).toString().replace(/[.-]/g, '').length || 1;
9104
+ const rowLabelLength = Math.max(minValueLength, maxValueLength) * 9 + 22;
9105
+ const horizontalDistanceToZero = scale.x(0);
9106
+ const verticalDistanceToZero = scale.y(0);
9107
+ const columnLabelLength = 28;
9108
+ const rowStrokeDasharray = `${horizontalDistanceToZero - rowLabelLength} ${rowLabelLength} ${width}`;
9109
+ const columnStrokeDasharray = `${verticalDistanceToZero} ${columnLabelLength} ${height}`;
9110
+ const displayAdditionalGrid = domain.labelStep > 0 && range.labelStep > 0 && rowTickLabelValues && columnTickLabelValues && rowTickLabelValues.length > 1 && columnTickLabelValues.length > 1 && (rowTickLabelValues.length !== rowTickValues.length || columnTickLabelValues.length !== columnTickValues.length);
9111
+ const filteredColumnValues = columnTickLabelValues.filter(value => value >= 0 || horizontalDistanceToZero - scale.x(value) > rowLabelLength);
9112
+ const filteredRowValues = rowTickLabelValues.filter(value => value >= 0 || scale.y(value) - verticalDistanceToZero > columnLabelLength);
9113
+ return {
9114
+ rowTickLabelValues: filteredRowValues,
9115
+ columnTickLabelValues: filteredColumnValues,
9116
+ rowStrokeDasharray,
9117
+ columnStrokeDasharray,
9118
+ displayAdditionalGrid
9119
+ };
9120
+ };
9121
+ }
9087
9122
  render() {
9088
9123
  const {classes, graphProps} = this.props;
9089
- const {scale, size, domain, range} = graphProps;
9124
+ const {scale, size: {height, width}, domain, range} = graphProps;
9090
9125
  const rowTickValues = getTickValues(range);
9091
- const columnTicksValues = getTickValues(domain);
9092
- return React$t.createElement(Grid$2, {
9126
+ const columnTickValues = getTickValues(domain);
9127
+ const {rowTickLabelValues, columnTickLabelValues, rowStrokeDasharray, columnStrokeDasharray, displayAdditionalGrid} = this.getAdditionalGridProps(rowTickValues, columnTickValues);
9128
+ return React$t.createElement(React$t.Fragment, null, React$t.createElement(Grid$2, {
9093
9129
  innerRef: r => this.grid = r,
9094
9130
  xScale: scale.x,
9095
9131
  yScale: scale.y,
9096
- width: size.width,
9097
- height: size.height,
9132
+ width: width,
9133
+ height: height,
9098
9134
  className: classes.grid,
9099
9135
  rowTickValues: rowTickValues,
9100
- columnTickValues: columnTicksValues,
9136
+ columnTickValues: columnTickValues,
9101
9137
  __self: this,
9102
9138
  __source: {
9103
9139
  fileName: _jsxFileName$q,
9104
- lineNumber: 28
9140
+ lineNumber: 109
9105
9141
  }
9106
- });
9142
+ }), displayAdditionalGrid && React$t.createElement(React$t.Fragment, null, React$t.createElement(Rows, {
9143
+ scale: scale.y,
9144
+ width: width,
9145
+ tickValues: rowTickLabelValues,
9146
+ stroke: color$d.primary(),
9147
+ strokeDasharray: rowStrokeDasharray,
9148
+ __self: this,
9149
+ __source: {
9150
+ fileName: _jsxFileName$q,
9151
+ lineNumber: 121
9152
+ }
9153
+ }), React$t.createElement(Columns, {
9154
+ scale: scale.x,
9155
+ height: height,
9156
+ tickValues: columnTickLabelValues,
9157
+ stroke: color$d.primary(),
9158
+ strokeDasharray: columnStrokeDasharray,
9159
+ __self: this,
9160
+ __source: {
9161
+ fileName: _jsxFileName$q,
9162
+ lineNumber: 128
9163
+ }
9164
+ })));
9107
9165
  }
9108
9166
  }
9109
9167
  Grid.__initStatic();
@@ -9338,7 +9396,6 @@ class Graph extends React$r.Component {
9338
9396
  currentTool
9339
9397
  });
9340
9398
  return React$r.createElement(Root$2, {
9341
- paddingLeft: 60,
9342
9399
  rootRef: r => this.rootNode = r,
9343
9400
  title: title,
9344
9401
  ...common,
@@ -9347,12 +9404,27 @@ class Graph extends React$r.Component {
9347
9404
  fileName: _jsxFileName$o,
9348
9405
  lineNumber: 168
9349
9406
  }
9407
+ }, React$r.createElement(Labels, {
9408
+ value: labels,
9409
+ ...common,
9410
+ __self: this,
9411
+ __source: {
9412
+ fileName: _jsxFileName$o,
9413
+ lineNumber: 169
9414
+ }
9415
+ }), React$r.createElement('g', {
9416
+ transform: `translate(${domain.padding}, ${range.padding})`,
9417
+ __self: this,
9418
+ __source: {
9419
+ fileName: _jsxFileName$o,
9420
+ lineNumber: 170
9421
+ }
9350
9422
  }, React$r.createElement(Grid$1, {
9351
9423
  ...common,
9352
9424
  __self: this,
9353
9425
  __source: {
9354
9426
  fileName: _jsxFileName$o,
9355
- lineNumber: 175
9427
+ lineNumber: 171
9356
9428
  }
9357
9429
  }), React$r.createElement(Axes, {
9358
9430
  ...axesSettings,
@@ -9360,7 +9432,7 @@ class Graph extends React$r.Component {
9360
9432
  __self: this,
9361
9433
  __source: {
9362
9434
  fileName: _jsxFileName$o,
9363
- lineNumber: 176
9435
+ lineNumber: 172
9364
9436
  }
9365
9437
  }), React$r.createElement(Bg, {
9366
9438
  ...size,
@@ -9369,22 +9441,14 @@ class Graph extends React$r.Component {
9369
9441
  __self: this,
9370
9442
  __source: {
9371
9443
  fileName: _jsxFileName$o,
9372
- lineNumber: 177
9373
- }
9374
- }), React$r.createElement(Labels, {
9375
- value: labels,
9376
- ...common,
9377
- __self: this,
9378
- __source: {
9379
- fileName: _jsxFileName$o,
9380
- lineNumber: 178
9444
+ lineNumber: 173
9381
9445
  }
9382
9446
  }), React$r.createElement('mask', {
9383
9447
  id: "myMask",
9384
9448
  __self: this,
9385
9449
  __source: {
9386
9450
  fileName: _jsxFileName$o,
9387
- lineNumber: 179
9451
+ lineNumber: 174
9388
9452
  }
9389
9453
  }, React$r.createElement('rect', {
9390
9454
  ...maskSize,
@@ -9392,7 +9456,7 @@ class Graph extends React$r.Component {
9392
9456
  __self: this,
9393
9457
  __source: {
9394
9458
  fileName: _jsxFileName$o,
9395
- lineNumber: 180
9459
+ lineNumber: 175
9396
9460
  }
9397
9461
  }), " "), React$r.createElement('g', {
9398
9462
  id: "marks",
@@ -9400,7 +9464,7 @@ class Graph extends React$r.Component {
9400
9464
  __self: this,
9401
9465
  __source: {
9402
9466
  fileName: _jsxFileName$o,
9403
- lineNumber: 183
9467
+ lineNumber: 178
9404
9468
  }
9405
9469
  }, (backgroundMarks || []).map((m, index) => {
9406
9470
  const Component = this.getComponent(m);
@@ -9417,7 +9481,7 @@ class Graph extends React$r.Component {
9417
9481
  __self: this,
9418
9482
  __source: {
9419
9483
  fileName: _jsxFileName$o,
9420
- lineNumber: 189
9484
+ lineNumber: 184
9421
9485
  }
9422
9486
  });
9423
9487
  }), marks.map((m, index) => {
@@ -9438,7 +9502,7 @@ class Graph extends React$r.Component {
9438
9502
  __self: this,
9439
9503
  __source: {
9440
9504
  fileName: _jsxFileName$o,
9441
- lineNumber: 203
9505
+ lineNumber: 198
9442
9506
  }
9443
9507
  });
9444
9508
  }), React$r.createElement('foreignObject', {
@@ -9452,9 +9516,9 @@ class Graph extends React$r.Component {
9452
9516
  __self: this,
9453
9517
  __source: {
9454
9518
  fileName: _jsxFileName$o,
9455
- lineNumber: 219
9519
+ lineNumber: 214
9456
9520
  }
9457
- })));
9521
+ }))));
9458
9522
  }
9459
9523
  }
9460
9524
  Graph.__initStatic();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-module",
3
- "version": "1.1.2",
3
+ "version": "1.2.1",
4
4
  "mappings": {
5
5
  "@pie-lib/plot": "_dll_pie_lib__plot",
6
6
  "@pie-lib/graphing": "_dll_pie_lib__graphing",
@@ -10,10 +10,10 @@
10
10
  "versionInfo": {
11
11
  "data": {
12
12
  "@pie-lib/plot": {
13
- "version": "2.1.10"
13
+ "version": "2.2.0"
14
14
  },
15
15
  "@pie-lib/graphing": {
16
- "version": "2.5.1"
16
+ "version": "2.6.0"
17
17
  },
18
18
  "d3-scale": {
19
19
  "version": "2.2.2"
@@ -22,12 +22,12 @@
22
22
  "version": "1.4.2"
23
23
  }
24
24
  },
25
- "hash": "257c0fdefc46812abe6844a784d85894ed0f9b14"
25
+ "hash": "ce2eb74aa5c7e6b92e4dcff82ca7614a2ab181aa"
26
26
  },
27
27
  "modules": [
28
28
  {
29
29
  "name": "@pie-lib/shared-module",
30
- "version": "^1.4.15"
30
+ "version": "^1.4.18"
31
31
  }
32
32
  ],
33
33
  "isLocal": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-module",
3
- "version": "1.1.2",
3
+ "version": "1.2.1",
4
4
  "module": "module/index.js",
5
5
  "repository": "pie-framework/pie-lib",
6
6
  "publishConfig": {