dp-widgets-framework 1.3.7 → 1.3.8

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.esm.js CHANGED
@@ -15139,7 +15139,7 @@ function BarChart({ orientation, title, data, options, className, units, content
15139
15139
  }
15140
15140
 
15141
15141
  Chart$1.register(CategoryScale, LinearScale, BarElement, plugin_title, plugin_tooltip, plugin_legend);
15142
- function SeriesChart({ orientation, title, data, options, className, units, content }) {
15142
+ function SeriesChart({ orientation, title, data, options, className, units, content, x_axis_title, y_axis_title }) {
15143
15143
  var _a, _b;
15144
15144
  const formatValue = (value) => {
15145
15145
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
@@ -15226,12 +15226,16 @@ function SeriesChart({ orientation, title, data, options, className, units, cont
15226
15226
  },
15227
15227
  scales: {
15228
15228
  x: {
15229
+ title: {
15230
+ display: !!x_axis_title,
15231
+ text: x_axis_title,
15232
+ },
15229
15233
  ticks: { autoSkip: false, maxRotation: 45, minRotation: 0 },
15230
15234
  },
15231
15235
  y: {
15232
15236
  title: {
15233
15237
  display: true,
15234
- text: (data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : ""),
15238
+ text: y_axis_title || ((data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : "")),
15235
15239
  },
15236
15240
  beginAtZero: true,
15237
15241
  ticks: {
@@ -16597,8 +16601,9 @@ var plugin$1 = {
16597
16601
  };
16598
16602
 
16599
16603
  Chart$1.register(CategoryScale, LinearScale, PointElement, LineElement, plugin_title, plugin_tooltip, plugin_legend);
16600
- function SeriesLineChart({ orientation, title, data, options, className, units, content }) {
16604
+ function SeriesLineChart({ orientation, title, data, options, className, units, content, x_axis_title, y_axis_title }) {
16601
16605
  var _a, _b;
16606
+ console.log('x_axis_title==>', x_axis_title);
16602
16607
  const formatValue = (value) => {
16603
16608
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
16604
16609
  if (!isNaN(numValue)) {
@@ -16673,12 +16678,16 @@ function SeriesLineChart({ orientation, title, data, options, className, units,
16673
16678
  },
16674
16679
  scales: {
16675
16680
  x: {
16681
+ title: {
16682
+ display: !!x_axis_title,
16683
+ text: x_axis_title,
16684
+ },
16676
16685
  ticks: { autoSkip: true, maxTicksLimit: 8, maxRotation: 45, minRotation: 0 },
16677
16686
  },
16678
16687
  y: {
16679
16688
  title: {
16680
16689
  display: true,
16681
- text: (data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : ""),
16690
+ text: y_axis_title || ((data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : "")),
16682
16691
  },
16683
16692
  beginAtZero: true,
16684
16693
  ticks: {
@@ -38625,12 +38634,14 @@ function BarChartComponent({ orientation, barChartState, styles, appendMessage,
38625
38634
  return (jsxRuntimeExports.jsx(BarChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content }));
38626
38635
  }
38627
38636
  function SeriesBarChartComponent({ orientation, seriesBarChartState, styles, appendMessage, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout, content }) {
38628
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
38637
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
38629
38638
  const hasCalledRef = useRef(false);
38630
38639
  const labels = ((_b = (_a = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.labels) || ((_e = (_d = (_c = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _c === void 0 ? void 0 : _c.series_bar_chart_data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.labels) || [];
38631
- const series = ((_g = (_f = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.series) || ((_k = (_j = (_h = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _h === void 0 ? void 0 : _h.series_bar_chart_data) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.series) || [];
38632
- const chartTitle = ((_l = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.title) || ((_o = (_m = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _m === void 0 ? void 0 : _m.series_bar_chart_data) === null || _o === void 0 ? void 0 : _o.title) || "";
38633
- const units = ((_p = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _p === void 0 ? void 0 : _p.units) || ((_r = (_q = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _q === void 0 ? void 0 : _q.series_bar_chart_data) === null || _r === void 0 ? void 0 : _r.units) || "";
38640
+ const x_axis_title = ((_f = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _f === void 0 ? void 0 : _f.x_axis_title) || ((_h = (_g = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _g === void 0 ? void 0 : _g.series_bar_chart_data) === null || _h === void 0 ? void 0 : _h.x_axis_title) || "";
38641
+ const y_axis_title = ((_j = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _j === void 0 ? void 0 : _j.y_axis_title) || ((_l = (_k = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _k === void 0 ? void 0 : _k.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.y_axis_title) || "";
38642
+ const series = ((_o = (_m = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.series) || ((_r = (_q = (_p = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _p === void 0 ? void 0 : _p.series_bar_chart_data) === null || _q === void 0 ? void 0 : _q.data) === null || _r === void 0 ? void 0 : _r.series) || [];
38643
+ const chartTitle = ((_s = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _s === void 0 ? void 0 : _s.title) || ((_u = (_t = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _t === void 0 ? void 0 : _t.series_bar_chart_data) === null || _u === void 0 ? void 0 : _u.title) || "";
38644
+ const units = ((_v = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _v === void 0 ? void 0 : _v.units) || ((_x = (_w = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _w === void 0 ? void 0 : _w.series_bar_chart_data) === null || _x === void 0 ? void 0 : _x.units) || "";
38634
38645
  const isEmpty = labels.length === 0 || series.length === 0;
38635
38646
  const handleRefresh = async () => {
38636
38647
  if (query) {
@@ -38673,15 +38684,17 @@ function SeriesBarChartComponent({ orientation, seriesBarChartState, styles, app
38673
38684
  backgroundColor: (seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.colors) || (seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.color) || finalColors[index % finalColors.length],
38674
38685
  })),
38675
38686
  };
38676
- return (jsxRuntimeExports.jsx(SeriesChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content }));
38687
+ return (jsxRuntimeExports.jsx(SeriesChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content, x_axis_title: x_axis_title, y_axis_title: y_axis_title }));
38677
38688
  }
38678
38689
  function SeriesLineChartComponent({ orientation, seriesLineChartState, styles, appendMessage, content, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout }) {
38679
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
38690
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
38680
38691
  const hasCalledRef = useRef(false);
38681
38692
  const labels = ((_b = (_a = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.labels) || ((_e = (_d = (_c = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _c === void 0 ? void 0 : _c.series_bar_chart_data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.labels) || [];
38682
38693
  const series = ((_g = (_f = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.series) || ((_k = (_j = (_h = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _h === void 0 ? void 0 : _h.series_bar_chart_data) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.series) || [];
38683
- const chartTitle = ((_l = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.title) || ((_o = (_m = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _m === void 0 ? void 0 : _m.series_bar_chart_data) === null || _o === void 0 ? void 0 : _o.title) || "";
38684
- const units = ((_p = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _p === void 0 ? void 0 : _p.units) || ((_r = (_q = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _q === void 0 ? void 0 : _q.series_bar_chart_data) === null || _r === void 0 ? void 0 : _r.units) || "";
38694
+ const x_axis_title = ((_l = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.x_axis_title) || ((_o = (_m = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _m === void 0 ? void 0 : _m.series_bar_chart_data) === null || _o === void 0 ? void 0 : _o.x_axis_title) || "";
38695
+ const y_axis_title = ((_p = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _p === void 0 ? void 0 : _p.y_axis_title) || ((_r = (_q = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _q === void 0 ? void 0 : _q.series_bar_chart_data) === null || _r === void 0 ? void 0 : _r.y_axis_title) || "";
38696
+ const chartTitle = ((_s = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _s === void 0 ? void 0 : _s.title) || ((_u = (_t = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _t === void 0 ? void 0 : _t.series_bar_chart_data) === null || _u === void 0 ? void 0 : _u.title) || "";
38697
+ const units = ((_v = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _v === void 0 ? void 0 : _v.units) || ((_x = (_w = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _w === void 0 ? void 0 : _w.series_bar_chart_data) === null || _x === void 0 ? void 0 : _x.units) || "";
38685
38698
  const isEmpty = labels.length === 0 || series.length === 0;
38686
38699
  const handleRefresh = async () => {
38687
38700
  if (query) {
@@ -38731,7 +38744,7 @@ function SeriesLineChartComponent({ orientation, seriesLineChartState, styles, a
38731
38744
  tension: 0.1,
38732
38745
  })),
38733
38746
  };
38734
- return (jsxRuntimeExports.jsx(SeriesLineChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content }));
38747
+ return (jsxRuntimeExports.jsx(SeriesLineChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content, x_axis_title: x_axis_title, y_axis_title: y_axis_title }));
38735
38748
  }
38736
38749
  function PieChartComponent({ pieChartState, styles, appendMessage, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout, content }) {
38737
38750
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
package/dist/index.js CHANGED
@@ -15166,7 +15166,7 @@ function BarChart({ orientation, title, data, options, className, units, content
15166
15166
  }
15167
15167
 
15168
15168
  Chart$1.register(CategoryScale, LinearScale, BarElement, plugin_title, plugin_tooltip, plugin_legend);
15169
- function SeriesChart({ orientation, title, data, options, className, units, content }) {
15169
+ function SeriesChart({ orientation, title, data, options, className, units, content, x_axis_title, y_axis_title }) {
15170
15170
  var _a, _b;
15171
15171
  const formatValue = (value) => {
15172
15172
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
@@ -15253,12 +15253,16 @@ function SeriesChart({ orientation, title, data, options, className, units, cont
15253
15253
  },
15254
15254
  scales: {
15255
15255
  x: {
15256
+ title: {
15257
+ display: !!x_axis_title,
15258
+ text: x_axis_title,
15259
+ },
15256
15260
  ticks: { autoSkip: false, maxRotation: 45, minRotation: 0 },
15257
15261
  },
15258
15262
  y: {
15259
15263
  title: {
15260
15264
  display: true,
15261
- text: (data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : ""),
15265
+ text: y_axis_title || ((data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : "")),
15262
15266
  },
15263
15267
  beginAtZero: true,
15264
15268
  ticks: {
@@ -16624,8 +16628,9 @@ var plugin$1 = {
16624
16628
  };
16625
16629
 
16626
16630
  Chart$1.register(CategoryScale, LinearScale, PointElement, LineElement, plugin_title, plugin_tooltip, plugin_legend);
16627
- function SeriesLineChart({ orientation, title, data, options, className, units, content }) {
16631
+ function SeriesLineChart({ orientation, title, data, options, className, units, content, x_axis_title, y_axis_title }) {
16628
16632
  var _a, _b;
16633
+ console.log('x_axis_title==>', x_axis_title);
16629
16634
  const formatValue = (value) => {
16630
16635
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
16631
16636
  if (!isNaN(numValue)) {
@@ -16700,12 +16705,16 @@ function SeriesLineChart({ orientation, title, data, options, className, units,
16700
16705
  },
16701
16706
  scales: {
16702
16707
  x: {
16708
+ title: {
16709
+ display: !!x_axis_title,
16710
+ text: x_axis_title,
16711
+ },
16703
16712
  ticks: { autoSkip: true, maxTicksLimit: 8, maxRotation: 45, minRotation: 0 },
16704
16713
  },
16705
16714
  y: {
16706
16715
  title: {
16707
16716
  display: true,
16708
- text: (data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : ""),
16717
+ text: y_axis_title || ((data === null || data === void 0 ? void 0 : data.datasets) && ((_a = data === null || data === void 0 ? void 0 : data.datasets) === null || _a === void 0 ? void 0 : _a.length) === 1 ? (_b = data === null || data === void 0 ? void 0 : data.datasets) === null || _b === void 0 ? void 0 : _b[0].label : getAxisLabel(units !== null && units !== void 0 ? units : "")),
16709
16718
  },
16710
16719
  beginAtZero: true,
16711
16720
  ticks: {
@@ -38652,12 +38661,14 @@ function BarChartComponent({ orientation, barChartState, styles, appendMessage,
38652
38661
  return (jsxRuntimeExports.jsx(BarChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content }));
38653
38662
  }
38654
38663
  function SeriesBarChartComponent({ orientation, seriesBarChartState, styles, appendMessage, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout, content }) {
38655
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
38664
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
38656
38665
  const hasCalledRef = React.useRef(false);
38657
38666
  const labels = ((_b = (_a = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.labels) || ((_e = (_d = (_c = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _c === void 0 ? void 0 : _c.series_bar_chart_data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.labels) || [];
38658
- const series = ((_g = (_f = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.series) || ((_k = (_j = (_h = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _h === void 0 ? void 0 : _h.series_bar_chart_data) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.series) || [];
38659
- const chartTitle = ((_l = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.title) || ((_o = (_m = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _m === void 0 ? void 0 : _m.series_bar_chart_data) === null || _o === void 0 ? void 0 : _o.title) || "";
38660
- const units = ((_p = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _p === void 0 ? void 0 : _p.units) || ((_r = (_q = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _q === void 0 ? void 0 : _q.series_bar_chart_data) === null || _r === void 0 ? void 0 : _r.units) || "";
38667
+ const x_axis_title = ((_f = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _f === void 0 ? void 0 : _f.x_axis_title) || ((_h = (_g = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _g === void 0 ? void 0 : _g.series_bar_chart_data) === null || _h === void 0 ? void 0 : _h.x_axis_title) || "";
38668
+ const y_axis_title = ((_j = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _j === void 0 ? void 0 : _j.y_axis_title) || ((_l = (_k = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _k === void 0 ? void 0 : _k.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.y_axis_title) || "";
38669
+ const series = ((_o = (_m = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.series) || ((_r = (_q = (_p = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _p === void 0 ? void 0 : _p.series_bar_chart_data) === null || _q === void 0 ? void 0 : _q.data) === null || _r === void 0 ? void 0 : _r.series) || [];
38670
+ const chartTitle = ((_s = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _s === void 0 ? void 0 : _s.title) || ((_u = (_t = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _t === void 0 ? void 0 : _t.series_bar_chart_data) === null || _u === void 0 ? void 0 : _u.title) || "";
38671
+ const units = ((_v = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.series_bar_chart_data) === null || _v === void 0 ? void 0 : _v.units) || ((_x = (_w = seriesBarChartState === null || seriesBarChartState === void 0 ? void 0 : seriesBarChartState.state) === null || _w === void 0 ? void 0 : _w.series_bar_chart_data) === null || _x === void 0 ? void 0 : _x.units) || "";
38661
38672
  const isEmpty = labels.length === 0 || series.length === 0;
38662
38673
  const handleRefresh = async () => {
38663
38674
  if (query) {
@@ -38700,15 +38711,17 @@ function SeriesBarChartComponent({ orientation, seriesBarChartState, styles, app
38700
38711
  backgroundColor: (seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.colors) || (seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.color) || finalColors[index % finalColors.length],
38701
38712
  })),
38702
38713
  };
38703
- return (jsxRuntimeExports.jsx(SeriesChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content }));
38714
+ return (jsxRuntimeExports.jsx(SeriesChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content, x_axis_title: x_axis_title, y_axis_title: y_axis_title }));
38704
38715
  }
38705
38716
  function SeriesLineChartComponent({ orientation, seriesLineChartState, styles, appendMessage, content, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout }) {
38706
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
38717
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
38707
38718
  const hasCalledRef = React.useRef(false);
38708
38719
  const labels = ((_b = (_a = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.labels) || ((_e = (_d = (_c = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _c === void 0 ? void 0 : _c.series_bar_chart_data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.labels) || [];
38709
38720
  const series = ((_g = (_f = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.series) || ((_k = (_j = (_h = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _h === void 0 ? void 0 : _h.series_bar_chart_data) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.series) || [];
38710
- const chartTitle = ((_l = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.title) || ((_o = (_m = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _m === void 0 ? void 0 : _m.series_bar_chart_data) === null || _o === void 0 ? void 0 : _o.title) || "";
38711
- const units = ((_p = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _p === void 0 ? void 0 : _p.units) || ((_r = (_q = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _q === void 0 ? void 0 : _q.series_bar_chart_data) === null || _r === void 0 ? void 0 : _r.units) || "";
38721
+ const x_axis_title = ((_l = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _l === void 0 ? void 0 : _l.x_axis_title) || ((_o = (_m = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _m === void 0 ? void 0 : _m.series_bar_chart_data) === null || _o === void 0 ? void 0 : _o.x_axis_title) || "";
38722
+ const y_axis_title = ((_p = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _p === void 0 ? void 0 : _p.y_axis_title) || ((_r = (_q = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _q === void 0 ? void 0 : _q.series_bar_chart_data) === null || _r === void 0 ? void 0 : _r.y_axis_title) || "";
38723
+ const chartTitle = ((_s = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _s === void 0 ? void 0 : _s.title) || ((_u = (_t = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _t === void 0 ? void 0 : _t.series_bar_chart_data) === null || _u === void 0 ? void 0 : _u.title) || "";
38724
+ const units = ((_v = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.series_bar_chart_data) === null || _v === void 0 ? void 0 : _v.units) || ((_x = (_w = seriesLineChartState === null || seriesLineChartState === void 0 ? void 0 : seriesLineChartState.state) === null || _w === void 0 ? void 0 : _w.series_bar_chart_data) === null || _x === void 0 ? void 0 : _x.units) || "";
38712
38725
  const isEmpty = labels.length === 0 || series.length === 0;
38713
38726
  const handleRefresh = async () => {
38714
38727
  if (query) {
@@ -38758,7 +38771,7 @@ function SeriesLineChartComponent({ orientation, seriesLineChartState, styles, a
38758
38771
  tension: 0.1,
38759
38772
  })),
38760
38773
  };
38761
- return (jsxRuntimeExports.jsx(SeriesLineChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content }));
38774
+ return (jsxRuntimeExports.jsx(SeriesLineChart, { orientation: orientation, title: chartTitle, data: transformedData, units: units, content: content, x_axis_title: x_axis_title, y_axis_title: y_axis_title }));
38762
38775
  }
38763
38776
  function PieChartComponent({ pieChartState, styles, appendMessage, query, isFirstLoad, widgetBackendUrl, widgetId, startLoadingTimeout, clearLoadingTimeout, content }) {
38764
38777
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dp-widgets-framework",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"