@deephaven/chart 1.22.1-alpha-pivot-builder.0 → 1.22.2-alpha-pivot-builder.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.
@@ -1,5 +1,11 @@
1
1
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
2
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3
9
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
10
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
11
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -80,7 +86,15 @@ class ChartUtils {
80
86
  var subpatterns = formatPattern.split(';');
81
87
  var matchArray = subpatterns[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\.?)(0*)(#*)(E?0*)(%?)(.*)/);
82
88
  assertNotNull(matchArray);
83
- var [, prefix, placeholderDigits, zeroDigits,, decimalDigits, optionalDecimalDigits, numberType, percentSign, suffix] = matchArray;
89
+ var _matchArray = _slicedToArray(matchArray, 10),
90
+ prefix = _matchArray[1],
91
+ placeholderDigits = _matchArray[2],
92
+ zeroDigits = _matchArray[3],
93
+ decimalDigits = _matchArray[5],
94
+ optionalDecimalDigits = _matchArray[6],
95
+ numberType = _matchArray[7],
96
+ percentSign = _matchArray[8],
97
+ suffix = _matchArray[9];
84
98
  var paddingLength = zeroDigits.replace(',', '').length;
85
99
  var isCommaSeparated = placeholderDigits.indexOf(',') >= 0 || zeroDigits.indexOf(',') >= 0;
86
100
  var comma = isCommaSeparated ? ',' : '';
@@ -111,9 +125,7 @@ class ChartUtils {
111
125
  * @param isDateType indicates if the columns is a date type
112
126
  */
113
127
  static addTickSpacing(axisFormat, axis, isDateType) {
114
- var {
115
- gapBetweenMajorTicks
116
- } = axis;
128
+ var gapBetweenMajorTicks = axis.gapBetweenMajorTicks;
117
129
  if (gapBetweenMajorTicks != null && gapBetweenMajorTicks > 0) {
118
130
  var updatedFormat = axisFormat || {};
119
131
  var tickSpacing = gapBetweenMajorTicks;
@@ -250,9 +262,7 @@ class ChartUtils {
250
262
  * @param series The series to get the chart for
251
263
  */
252
264
  static getChartForSeries(figure, series) {
253
- var {
254
- charts
255
- } = figure;
265
+ var charts = figure.charts;
256
266
  for (var i = 0; i < charts.length; i += 1) {
257
267
  var _chart = charts[i];
258
268
  for (var j = 0; j < _chart.series.length; j += 1) {
@@ -345,11 +355,10 @@ class ChartUtils {
345
355
  log.warn("Unexpected colorway format: ".concat(colorway));
346
356
  }
347
357
  static titleFromSettings(settings) {
348
- var {
349
- series,
350
- xAxis,
351
- title = "".concat((series !== null && series !== void 0 ? series : []).join(', '), " by ").concat(xAxis)
352
- } = settings;
358
+ var series = settings.series,
359
+ xAxis = settings.xAxis,
360
+ _settings$title = settings.title,
361
+ title = _settings$title === void 0 ? "".concat((series !== null && series !== void 0 ? series : []).join(', '), " by ").concat(xAxis) : _settings$title;
353
362
  return title;
354
363
  }
355
364
  static getTimeZoneDiff(calendarTimeZone, formatterTimeZone) {
@@ -417,25 +426,17 @@ class ChartUtils {
417
426
  };
418
427
  var allAxes = ChartUtils.getAllAxes(figure);
419
428
  var axisTypeMap = ChartUtils.groupArray(allAxes, 'type');
420
- var {
421
- charts
422
- } = figure;
429
+ var charts = figure.charts;
423
430
  for (var i = 0; i < charts.length; i += 1) {
424
431
  var _chart2 = charts[i];
425
432
  for (var j = 0; j < _chart2.series.length; j += 1) {
426
433
  var series = _chart2.series[j];
427
- var {
428
- sources
429
- } = series;
434
+ var sources = series.sources;
430
435
  var axisSources = sources.filter(source => source.axis);
431
436
  for (var k = 0; k < axisSources.length; k += 1) {
432
437
  var source = axisSources[k];
433
- var {
434
- axis: _axis
435
- } = source;
436
- var {
437
- type: axisType
438
- } = _axis;
438
+ var _axis = source.axis;
439
+ var axisType = _axis.type;
439
440
  var typeAxes = axisTypeMap.get(axisType);
440
441
  assertNotNull(typeAxes);
441
442
  var axisIndex = typeAxes.indexOf(_axis);
@@ -451,9 +452,7 @@ class ChartUtils {
451
452
  axisFormats.set(axisLayoutProperty, nullFormat);
452
453
  } else {
453
454
  axisFormats.set(axisLayoutProperty, axisFormat);
454
- var {
455
- businessCalendar
456
- } = _axis;
455
+ var businessCalendar = _axis.businessCalendar;
457
456
  if (businessCalendar != null) {
458
457
  axisFormat.rangebreaks = this.createRangeBreaksFromBusinessCalendar(businessCalendar, formatter);
459
458
  }
@@ -477,9 +476,7 @@ class ChartUtils {
477
476
  */
478
477
  getPlotlyChartType(plotStyle, isBusinessTime) {
479
478
  var allowWebGL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
480
- var {
481
- dh
482
- } = this;
479
+ var dh = this.dh;
483
480
  switch (plotStyle) {
484
481
  case dh.plot.SeriesPlotStyle.SCATTER:
485
482
  case dh.plot.SeriesPlotStyle.LINE:
@@ -509,9 +506,7 @@ class ChartUtils {
509
506
  * @param areShapesVisible Whether shapes are visible or not
510
507
  */
511
508
  getPlotlyChartMode(plotStyle, areLinesVisible, areShapesVisible) {
512
- var {
513
- dh
514
- } = this;
509
+ var dh = this.dh;
515
510
  var modes = new Set();
516
511
  switch (plotStyle) {
517
512
  case dh.plot.SeriesPlotStyle.SCATTER:
@@ -544,9 +539,7 @@ class ChartUtils {
544
539
  * @param sourceType The source type for the series
545
540
  */
546
541
  getPlotlyProperty(plotStyle, sourceType) {
547
- var {
548
- dh
549
- } = this;
542
+ var dh = this.dh;
550
543
  switch (plotStyle) {
551
544
  case dh.plot.SeriesPlotStyle.PIE:
552
545
  switch (sourceType) {
@@ -630,12 +623,8 @@ class ChartUtils {
630
623
  }
631
624
  getPlotlySeriesOrientation(series) {
632
625
  var _sources$;
633
- var {
634
- dh
635
- } = this;
636
- var {
637
- sources
638
- } = series;
626
+ var dh = this.dh;
627
+ var sources = series.sources;
639
628
  if (sources.length === 2 && ((_sources$ = sources[0]) === null || _sources$ === void 0 || (_sources$ = _sources$.axis) === null || _sources$ === void 0 ? void 0 : _sources$.type) === dh.plot.AxisType.Y) {
640
629
  return ChartUtils.ORIENTATION.HORIZONTAL;
641
630
  }
@@ -652,17 +641,15 @@ class ChartUtils {
652
641
  makeSeriesDataFromSeries(series, axisTypeMap, seriesVisibility) {
653
642
  var showLegend = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
654
643
  var allowWebGL = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
655
- var {
656
- name,
657
- isLinesVisible,
658
- isShapesVisible,
659
- plotStyle,
660
- lineColor,
661
- shapeColor,
662
- sources,
663
- shape,
664
- shapeSize
665
- } = series;
644
+ var name = series.name,
645
+ isLinesVisible = series.isLinesVisible,
646
+ isShapesVisible = series.isShapesVisible,
647
+ plotStyle = series.plotStyle,
648
+ lineColor = series.lineColor,
649
+ shapeColor = series.shapeColor,
650
+ sources = series.sources,
651
+ shape = series.shape,
652
+ shapeSize = series.shapeSize;
666
653
  var isBusinessTime = sources.some(source => {
667
654
  var _source$axis;
668
655
  return (_source$axis = source.axis) === null || _source$axis === void 0 ? void 0 : _source$axis.businessCalendar;
@@ -679,10 +666,8 @@ class ChartUtils {
679
666
  var seriesData = seriesDataParam;
680
667
  for (var k = 0; k < sources.length; k += 1) {
681
668
  var source = sources[k];
682
- var {
683
- axis: _axis2,
684
- type: sourceType
685
- } = source;
669
+ var _axis2 = source.axis,
670
+ sourceType = source.type;
686
671
  var dataAttributeName = this.getPlotlyProperty(plotStyle, sourceType);
687
672
  set(seriesData, dataAttributeName, []);
688
673
  var axisProperty = _axis2 != null ? this.getAxisPropertyName(_axis2.type) : null;
@@ -702,9 +687,7 @@ class ChartUtils {
702
687
  var shape = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
703
688
  var shapeSize = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
704
689
  var seriesVisibility = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
705
- var {
706
- dh
707
- } = this;
690
+ var dh = this.dh;
708
691
  var seriesData = seriesDataParam;
709
692
  // Add some empty objects so we can fill them in later with details without checking for existence
710
693
  seriesData.marker = {
@@ -763,9 +746,7 @@ class ChartUtils {
763
746
  }
764
747
  getChartType(plotStyle, isBusinessTime) {
765
748
  var allowWebGL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
766
- var {
767
- dh
768
- } = this;
749
+ var dh = this.dh;
769
750
  switch (plotStyle) {
770
751
  case dh.plot.SeriesPlotStyle.HISTOGRAM:
771
752
  // When reading data from the `Figure`, it already provides bins and values, so rather than using
@@ -781,9 +762,7 @@ class ChartUtils {
781
762
  * @param axisType The axis type to get the property name for
782
763
  */
783
764
  getAxisPropertyName(axisType) {
784
- var {
785
- dh
786
- } = this;
765
+ var dh = this.dh;
787
766
  switch (axisType) {
788
767
  case dh.plot.AxisType.X:
789
768
  return 'x';
@@ -799,9 +778,7 @@ class ChartUtils {
799
778
  * @param axisPosition The Iris AxisPosition of the axis
800
779
  */
801
780
  getAxisSide(axisPosition) {
802
- var {
803
- dh
804
- } = this;
781
+ var dh = this.dh;
805
782
  switch (axisPosition) {
806
783
  case dh.plot.AxisPosition.BOTTOM:
807
784
  return 'bottom';
@@ -839,19 +816,13 @@ class ChartUtils {
839
816
  }
840
817
  getChartBounds(figure, chart, plotWidth, plotHeight) {
841
818
  var _axisPositionMap$get;
842
- var {
843
- dh
844
- } = this;
845
- var {
846
- cols,
847
- rows
848
- } = figure;
849
- var {
850
- column,
851
- colspan,
852
- row,
853
- rowspan
854
- } = chart;
819
+ var dh = this.dh;
820
+ var cols = figure.cols,
821
+ rows = figure.rows;
822
+ var column = chart.column,
823
+ colspan = chart.colspan,
824
+ row = chart.row,
825
+ rowspan = chart.rowspan;
855
826
  var endColumn = column + colspan;
856
827
  var endRow = row + rowspan;
857
828
  var columnSize = 1 / cols;
@@ -880,9 +851,7 @@ class ChartUtils {
880
851
  return bounds;
881
852
  }
882
853
  getPlotlyDateFormat(formatter, columnType, formatPattern) {
883
- var {
884
- dh
885
- } = this;
854
+ var dh = this.dh;
886
855
  var tickformat = formatPattern == null ? undefined : formatPattern.replace('%', '%%').replace(/S{9}/g, '%9f').replace(/S{8}/g, '%8f').replace(/S{7}/g, '%7f').replace(/S{6}/g, '%6f').replace(/S{5}/g, '%5f').replace(/S{4}/g, '%4f').replace(/S{3}/g, '%3f').replace(/S{2}/g, '%2f').replace(/S{1}/g, '%1f').replace(/y{4}/g, '%Y').replace(/y{2}/g, '%y').replace(/M{4}/g, '%B').replace(/M{3}/g, '%b').replace(/M{2}/g, '%m').replace(/M{1}/g, '%-m').replace(/E{4,}/g, '%A').replace(/E{1,}/g, '%a').replace(/d{2}/g, '%d').replace(/([^%]|^)d{1}/g, '$1%-d').replace(/H{2}/g, '%H').replace(/h{2}/g, '%I').replace(/h{1}/g, '%-I').replace(/m{2}/g, '%M').replace(/s{2}/g, '%S').replace("'T'", 'T').replace(' z', ''); // timezone added as suffix if necessary
887
856
 
888
857
  var ticksuffix;
@@ -904,16 +873,10 @@ class ChartUtils {
904
873
  */
905
874
  getPlotlyAxisFormat(source) {
906
875
  var formatter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
907
- var {
908
- dh
909
- } = this;
910
- var {
911
- axis,
912
- columnType
913
- } = source;
914
- var {
915
- formatPattern
916
- } = axis;
876
+ var dh = this.dh;
877
+ var axis = source.axis,
878
+ columnType = source.columnType;
879
+ var formatPattern = axis.formatPattern;
917
880
  var axisFormat = null;
918
881
  if (TableUtils.isDateType(columnType)) {
919
882
  axisFormat = this.getPlotlyDateFormat(formatter, columnType, formatPattern);
@@ -959,9 +922,7 @@ class ChartUtils {
959
922
  bottom: 1
960
923
  };
961
924
  var axisRangeParser = arguments.length > 6 ? arguments[6] : undefined;
962
- var {
963
- dh
964
- } = this;
925
+ var dh = this.dh;
965
926
  var xAxisSize = plotWidth > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotHeight, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;
966
927
  var yAxisSize = plotHeight > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotWidth, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;
967
928
  var layout = layoutParam;
@@ -989,13 +950,14 @@ class ChartUtils {
989
950
  var layoutAxis = layout[axisLayoutProperty];
990
951
  if (layoutAxis != null) {
991
952
  this.updateLayoutAxis(layoutAxis, _axis3, chartAxisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds);
992
- var {
993
- range: _range,
994
- autorange
995
- } = layoutAxis;
953
+ var _range = layoutAxis.range,
954
+ autorange = layoutAxis.autorange;
996
955
  if (axisRangeParser != null && _range !== undefined && (autorange === undefined || autorange === false)) {
997
956
  var rangeParser = axisRangeParser(_axis3);
998
- var [rangeStart, rangeEnd] = rangeParser(_range);
957
+ var _rangeParser = rangeParser(_range),
958
+ _rangeParser2 = _slicedToArray(_rangeParser, 2),
959
+ rangeStart = _rangeParser2[0],
960
+ rangeEnd = _rangeParser2[1];
999
961
  log.debug('Setting downsample range', plotSize, rangeStart, rangeEnd);
1000
962
  _axis3.range(plotSize, rangeStart, rangeEnd);
1001
963
  } else {
@@ -1045,9 +1007,7 @@ class ChartUtils {
1045
1007
  */
1046
1008
  updateLayoutAxis(layoutAxisParam, axis, axisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds) {
1047
1009
  var _axis$label;
1048
- var {
1049
- dh
1050
- } = this;
1010
+ var dh = this.dh;
1051
1011
  var isYAxis = axis.type === dh.plot.AxisType.Y;
1052
1012
  var axisSize = isYAxis ? yAxisSize : xAxisSize;
1053
1013
  var layoutAxis = layoutAxisParam;
@@ -1101,11 +1061,9 @@ class ChartUtils {
1101
1061
  // and cannot be returned to if the user changes the range via interaction
1102
1062
  // minallowed and maxallowed can be set independently and can be returned to if the user changes
1103
1063
  // the range via interaction
1104
- var {
1105
- minRange,
1106
- maxRange,
1107
- log: logAxis
1108
- } = axis;
1064
+ var minRange = axis.minRange,
1065
+ maxRange = axis.maxRange,
1066
+ logAxis = axis.log;
1109
1067
  if (!Number.isNaN(minRange) || !Number.isNaN(maxRange)) {
1110
1068
  layoutAxis.autorangeoptions = {};
1111
1069
  if (!Number.isNaN(minRange)) {
@@ -1216,12 +1174,10 @@ class ChartUtils {
1216
1174
  */
1217
1175
  createRangeBreaksFromBusinessCalendar(businessCalendar, formatter) {
1218
1176
  var rangebreaks = [];
1219
- var {
1220
- businessPeriods,
1221
- businessDays,
1222
- holidays,
1223
- timeZone: calendarTimeZone
1224
- } = businessCalendar;
1177
+ var businessPeriods = businessCalendar.businessPeriods,
1178
+ businessDays = businessCalendar.businessDays,
1179
+ holidays = businessCalendar.holidays,
1180
+ calendarTimeZone = businessCalendar.timeZone;
1225
1181
  var typeFormatter = formatter === null || formatter === void 0 ? void 0 : formatter.getColumnTypeFormatter(BUSINESS_COLUMN_TYPE);
1226
1182
  var formatterTimeZone;
1227
1183
  if (isDateTimeColumnFormatter(typeFormatter)) {
@@ -1299,7 +1255,9 @@ class ChartUtils {
1299
1255
  var closedPeriods = ChartUtils.createClosedRangesForPartialHoliday(holiday.businessPeriods, (_calendar$businessPer = calendar === null || calendar === void 0 ? void 0 : calendar.businessPeriods) !== null && _calendar$businessPer !== void 0 ? _calendar$businessPer : []);
1300
1256
  var rangeBreaks = [];
1301
1257
  for (var i = 0; i < closedPeriods.length; i += 1) {
1302
- var [closeStart, closeEnd] = closedPeriods[i];
1258
+ var _closedPeriods$i = _slicedToArray(closedPeriods[i], 2),
1259
+ closeStart = _closedPeriods$i[0],
1260
+ closeEnd = _closedPeriods$i[1];
1303
1261
  // Skip over any periods where start and close are the same (zero hours)
1304
1262
  if (closeStart !== closeEnd) {
1305
1263
  var values = [this.adjustDateForTimeZone("".concat(dateString, " ").concat(ChartUtils.decimalToPeriod(closeStart), ":00.000000"), calendarTimeZone, formatterTimeZone)];
@@ -1340,14 +1298,10 @@ class ChartUtils {
1340
1298
  * @param settings.type The plot style for this figure
1341
1299
  */
1342
1300
  makeFigureSettings(settings, table) {
1343
- var {
1344
- dh
1345
- } = this;
1346
- var {
1347
- series,
1348
- xAxis: settingsAxis,
1349
- type
1350
- } = settings;
1301
+ var dh = this.dh;
1302
+ var series = settings.series,
1303
+ settingsAxis = settings.xAxis,
1304
+ type = settings.type;
1351
1305
  var title = ChartUtils.titleFromSettings(settings);
1352
1306
  var xAxis = {
1353
1307
  formatType: "".concat(dh.plot.AxisFormatType.NUMBER),
@@ -1388,9 +1342,7 @@ class ChartUtils {
1388
1342
  * Eg. Unwraps DateWrapper, LongWrapper objects.
1389
1343
  */
1390
1344
  unwrapValue(value, timeZone) {
1391
- var {
1392
- dh
1393
- } = this;
1345
+ var dh = this.dh;
1394
1346
  if (value != null) {
1395
1347
  if (isDateWrapper(value)) {
1396
1348
  return dh.i18n.DateTimeFormat.format(ChartUtils.DATE_FORMAT, value, timeZone);
@@ -1410,9 +1362,7 @@ class ChartUtils {
1410
1362
  */
1411
1363
  wrapValue(value, columnType) {
1412
1364
  var timeZone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
1413
- var {
1414
- dh
1415
- } = this;
1365
+ var dh = this.dh;
1416
1366
  if (TableUtils.isDateType(columnType) && typeof value === 'string') {
1417
1367
  // Need to limit the format to the actual length of the string range set in plotly
1418
1368
  // Otherwise parse will fail
@@ -1436,9 +1386,7 @@ class ChartUtils {
1436
1386
  return value;
1437
1387
  }
1438
1388
  makeLayoutAxis(type, theme) {
1439
- var {
1440
- dh
1441
- } = this;
1389
+ var dh = this.dh;
1442
1390
  var axis = {
1443
1391
  automargin: true,
1444
1392
  gridcolor: theme.gridcolor,
@@ -1487,15 +1435,13 @@ class ChartUtils {
1487
1435
  */
1488
1436
  makeDefaultTemplate(theme) {
1489
1437
  /* eslint-disable camelcase */
1490
- var {
1491
- error_band_line_color,
1492
- ohlc_increasing,
1493
- ohlc_decreasing,
1494
- title_color,
1495
- indicator_increasing,
1496
- indicator_decreasing,
1497
- indicator_gauge
1498
- } = theme;
1438
+ var error_band_line_color = theme.error_band_line_color,
1439
+ ohlc_increasing = theme.ohlc_increasing,
1440
+ ohlc_decreasing = theme.ohlc_decreasing,
1441
+ title_color = theme.title_color,
1442
+ indicator_increasing = theme.indicator_increasing,
1443
+ indicator_decreasing = theme.indicator_decreasing,
1444
+ indicator_gauge = theme.indicator_gauge;
1499
1445
  return {
1500
1446
  data: {
1501
1447
  bar: [{
@@ -1567,23 +1513,16 @@ class ChartUtils {
1567
1513
  * @param theme The theme to use for the layout
1568
1514
  */
1569
1515
  makeDefaultLayout(theme) {
1570
- var {
1571
- dh
1572
- } = this;
1573
- var {
1574
- /* Used as top level properties of `Layout` */
1575
- /* eslint-disable camelcase */
1576
- paper_bgcolor,
1577
- plot_bgcolor,
1578
- title_color,
1579
- coastline_color,
1580
- land_color,
1581
- ocean_color,
1582
- lake_color,
1583
- river_color,
1584
- map_style
1585
- /* eslint-disable camelcase */
1586
- } = theme;
1516
+ var dh = this.dh;
1517
+ var paper_bgcolor = theme.paper_bgcolor,
1518
+ plot_bgcolor = theme.plot_bgcolor,
1519
+ title_color = theme.title_color,
1520
+ coastline_color = theme.coastline_color,
1521
+ land_color = theme.land_color,
1522
+ ocean_color = theme.ocean_color,
1523
+ lake_color = theme.lake_color,
1524
+ river_color = theme.river_color,
1525
+ map_style = theme.map_style;
1587
1526
  var layout = {
1588
1527
  paper_bgcolor,
1589
1528
  plot_bgcolor,
@@ -1648,9 +1587,7 @@ class ChartUtils {
1648
1587
  * @param settings Dehydrated settings
1649
1588
  */
1650
1589
  hydrateSettings(settings) {
1651
- var {
1652
- dh
1653
- } = this;
1590
+ var dh = this.dh;
1654
1591
  return _objectSpread(_objectSpread({}, settings), {}, {
1655
1592
  type: settings.type != null ? dh.plot.SeriesPlotStyle[settings.type] : undefined
1656
1593
  });