@hpcc-js/layout 2.47.3 → 2.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es6.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { HTMLWidget, FAChar, select, selectAll, d3Event, Platform, drag, Utility, scaleLinear, dispatch, formatLocale, formatSpecifier, format, formatPrefix, sum, Database, Palette, scaleOrdinal, SVGWidget, IconBar, Spacer, ProgressBar, ToggleButton, Text, Button, TitleBar } from '@hpcc-js/common';
2
- import { Table } from '@hpcc-js/dgrid';
2
+ import { Table } from '@hpcc-js/dgrid2';
3
3
  import { instanceOfIHighlight } from '@hpcc-js/api';
4
4
 
5
5
  function _mergeNamespaces(n, m) {
@@ -18,8 +18,8 @@ function _mergeNamespaces(n, m) {
18
18
  }
19
19
 
20
20
  var PKG_NAME = "@hpcc-js/layout";
21
- var PKG_VERSION = "2.47.3";
22
- var BUILD_VERSION = "2.102.11";
21
+ var PKG_VERSION = "2.48.0";
22
+ var BUILD_VERSION = "2.103.2";
23
23
 
24
24
  /*! *****************************************************************************
25
25
  Copyright (c) Microsoft Corporation.
@@ -3094,7 +3094,28 @@ var ChartPanel = /** @class */ (function (_super) {
3094
3094
  element.style("transform", "translate(0px,0px) scale(1)");
3095
3095
  };
3096
3096
  ChartPanel.prototype.update = function (domNode, element) {
3097
+ var _this = this;
3097
3098
  _super.prototype.update.call(this, domNode, element);
3099
+ if (this._table && this.widget_exists() && this.widget().class().indexOf("chart_XYAxis") >= 0) {
3100
+ var chart_1 = this.widget();
3101
+ this._table.columns().forEach(function (column, idx) {
3102
+ switch (idx === 0 ? chart_1.xAxisType() : chart_1.yAxisType()) {
3103
+ case "linear":
3104
+ case "log":
3105
+ case "pow":
3106
+ _this._table.columnType(column, "number");
3107
+ break;
3108
+ case "time":
3109
+ _this._table.columnType(column, "time");
3110
+ break;
3111
+ case "ordinal":
3112
+ default:
3113
+ _this._table.columnType(column, "string");
3114
+ }
3115
+ _this._table.columnPattern(column, idx === 0 ? chart_1.xAxisTypeTimePattern() : chart_1.yAxisTypeTimePattern());
3116
+ _this._table.columnFormat(column, idx === 0 ? chart_1.xAxisTickFormat() : chart_1.yAxisTickFormat());
3117
+ });
3118
+ }
3098
3119
  };
3099
3120
  ChartPanel.prototype.preUpdate = function (domNode, element) {
3100
3121
  _super.prototype.preUpdate.call(this, domNode, element);
@@ -3124,12 +3145,13 @@ var ChartPanel = /** @class */ (function (_super) {
3124
3145
  if (this._prevdataVisible !== this.dataVisible()) {
3125
3146
  this._prevdataVisible = this.dataVisible();
3126
3147
  this._toggleData.selected(this._prevdataVisible);
3148
+ this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);
3127
3149
  this._carousel.active(this._prevdataVisible ? 1 : 0);
3128
3150
  }
3129
3151
  if (this._prevlegendVisible !== this.legendVisible()) {
3130
3152
  this._prevlegendVisible = this.legendVisible();
3131
3153
  this._toggleLegend.selected(this._prevlegendVisible);
3132
- this._legend.visible(this._prevlegendVisible);
3154
+ this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);
3133
3155
  }
3134
3156
  this._legend.orientation(this.legendPosition() === "bottom" ? "horizontal" : "vertical");
3135
3157
  this.showLeft(!this.left());