dp-widgets-framework 1.3.0 → 1.3.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/dist/index.esm.js CHANGED
@@ -15040,7 +15040,6 @@ const Pie = /* #__PURE__ */ createTypedChart('pie', PieController);
15040
15040
 
15041
15041
  Chart$1.register(CategoryScale, LinearScale, BarElement, plugin_title, plugin_tooltip, plugin_legend);
15042
15042
  function BarChart({ orientation, title, data, options, className, units, content }) {
15043
- var _a;
15044
15043
  const formatValue = (value) => {
15045
15044
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15046
15045
  if (units === '$' && !isNaN(numValue)) {
@@ -15070,7 +15069,7 @@ function BarChart({ orientation, title, data, options, className, units, content
15070
15069
  position: "bottom"
15071
15070
  },
15072
15071
  datalabels: {
15073
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15072
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15074
15073
  color: "white",
15075
15074
  font: { size: 12 },
15076
15075
  formatter: (value) => value,
@@ -15119,7 +15118,6 @@ function BarChart({ orientation, title, data, options, className, units, content
15119
15118
 
15120
15119
  Chart$1.register(CategoryScale, LinearScale, BarElement, plugin_title, plugin_tooltip, plugin_legend);
15121
15120
  function SeriesChart({ orientation, title, data, options, className, units, content }) {
15122
- var _a;
15123
15121
  const formatValue = (value) => {
15124
15122
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15125
15123
  if (units === '$' && !isNaN(numValue)) {
@@ -15149,7 +15147,7 @@ function SeriesChart({ orientation, title, data, options, className, units, cont
15149
15147
  position: "bottom"
15150
15148
  },
15151
15149
  datalabels: {
15152
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15150
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15153
15151
  color: "white",
15154
15152
  font: { size: 12 },
15155
15153
  formatter: (value) => value,
@@ -15194,7 +15192,6 @@ function SeriesChart({ orientation, title, data, options, className, units, cont
15194
15192
 
15195
15193
  Chart$1.register(CategoryScale, LinearScale, PointElement, LineElement, plugin_title, plugin_tooltip, plugin_legend);
15196
15194
  function SeriesLineChart({ orientation, title, data, options, className, units, content }) {
15197
- var _a;
15198
15195
  const formatValue = (value) => {
15199
15196
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15200
15197
  if (units === '$' && !isNaN(numValue)) {
@@ -15223,7 +15220,7 @@ function SeriesLineChart({ orientation, title, data, options, className, units,
15223
15220
  position: "bottom"
15224
15221
  },
15225
15222
  datalabels: {
15226
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15223
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15227
15224
  color: "#0F172A",
15228
15225
  font: { size: 12 },
15229
15226
  offset: 6,
@@ -15280,7 +15277,6 @@ function SeriesLineChart({ orientation, title, data, options, className, units,
15280
15277
 
15281
15278
  Chart$1.register(ArcElement, plugin_tooltip, plugin_legend);
15282
15279
  const PieChart = (props) => {
15283
- var _a;
15284
15280
  const { data, title, options, units, content } = props;
15285
15281
  const formatValue = (value) => {
15286
15282
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
@@ -15301,7 +15297,7 @@ const PieChart = (props) => {
15301
15297
  position: "bottom",
15302
15298
  },
15303
15299
  datalabels: {
15304
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15300
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15305
15301
  color: "white",
15306
15302
  font: { size: 12 },
15307
15303
  formatter: (value) => value,
@@ -15338,7 +15334,6 @@ const PieChart = (props) => {
15338
15334
 
15339
15335
  Chart$1.register(CategoryScale, LinearScale, PointElement, LineElement, plugin_title, plugin_tooltip, plugin_legend);
15340
15336
  function LineChart({ title, data, options, className, units, content }) {
15341
- var _a;
15342
15337
  const formatValue = (value) => {
15343
15338
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15344
15339
  if (units === '$' && !isNaN(numValue)) {
@@ -15367,7 +15362,7 @@ function LineChart({ title, data, options, className, units, content }) {
15367
15362
  position: "bottom"
15368
15363
  },
15369
15364
  datalabels: {
15370
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15365
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15371
15366
  color: "#0F172A",
15372
15367
  font: { size: 12 },
15373
15368
  offset: 6,
package/dist/index.js CHANGED
@@ -15067,7 +15067,6 @@ const Pie = /* #__PURE__ */ createTypedChart('pie', PieController);
15067
15067
 
15068
15068
  Chart$1.register(CategoryScale, LinearScale, BarElement, plugin_title, plugin_tooltip, plugin_legend);
15069
15069
  function BarChart({ orientation, title, data, options, className, units, content }) {
15070
- var _a;
15071
15070
  const formatValue = (value) => {
15072
15071
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15073
15072
  if (units === '$' && !isNaN(numValue)) {
@@ -15097,7 +15096,7 @@ function BarChart({ orientation, title, data, options, className, units, content
15097
15096
  position: "bottom"
15098
15097
  },
15099
15098
  datalabels: {
15100
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15099
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15101
15100
  color: "white",
15102
15101
  font: { size: 12 },
15103
15102
  formatter: (value) => value,
@@ -15146,7 +15145,6 @@ function BarChart({ orientation, title, data, options, className, units, content
15146
15145
 
15147
15146
  Chart$1.register(CategoryScale, LinearScale, BarElement, plugin_title, plugin_tooltip, plugin_legend);
15148
15147
  function SeriesChart({ orientation, title, data, options, className, units, content }) {
15149
- var _a;
15150
15148
  const formatValue = (value) => {
15151
15149
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15152
15150
  if (units === '$' && !isNaN(numValue)) {
@@ -15176,7 +15174,7 @@ function SeriesChart({ orientation, title, data, options, className, units, cont
15176
15174
  position: "bottom"
15177
15175
  },
15178
15176
  datalabels: {
15179
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15177
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15180
15178
  color: "white",
15181
15179
  font: { size: 12 },
15182
15180
  formatter: (value) => value,
@@ -15221,7 +15219,6 @@ function SeriesChart({ orientation, title, data, options, className, units, cont
15221
15219
 
15222
15220
  Chart$1.register(CategoryScale, LinearScale, PointElement, LineElement, plugin_title, plugin_tooltip, plugin_legend);
15223
15221
  function SeriesLineChart({ orientation, title, data, options, className, units, content }) {
15224
- var _a;
15225
15222
  const formatValue = (value) => {
15226
15223
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15227
15224
  if (units === '$' && !isNaN(numValue)) {
@@ -15250,7 +15247,7 @@ function SeriesLineChart({ orientation, title, data, options, className, units,
15250
15247
  position: "bottom"
15251
15248
  },
15252
15249
  datalabels: {
15253
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15250
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15254
15251
  color: "#0F172A",
15255
15252
  font: { size: 12 },
15256
15253
  offset: 6,
@@ -15307,7 +15304,6 @@ function SeriesLineChart({ orientation, title, data, options, className, units,
15307
15304
 
15308
15305
  Chart$1.register(ArcElement, plugin_tooltip, plugin_legend);
15309
15306
  const PieChart = (props) => {
15310
- var _a;
15311
15307
  const { data, title, options, units, content } = props;
15312
15308
  const formatValue = (value) => {
15313
15309
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
@@ -15328,7 +15324,7 @@ const PieChart = (props) => {
15328
15324
  position: "bottom",
15329
15325
  },
15330
15326
  datalabels: {
15331
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15327
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15332
15328
  color: "white",
15333
15329
  font: { size: 12 },
15334
15330
  formatter: (value) => value,
@@ -15365,7 +15361,6 @@ const PieChart = (props) => {
15365
15361
 
15366
15362
  Chart$1.register(CategoryScale, LinearScale, PointElement, LineElement, plugin_title, plugin_tooltip, plugin_legend);
15367
15363
  function LineChart({ title, data, options, className, units, content }) {
15368
- var _a;
15369
15364
  const formatValue = (value) => {
15370
15365
  const numValue = typeof value === 'string' ? parseFloat(value) : value;
15371
15366
  if (units === '$' && !isNaN(numValue)) {
@@ -15394,7 +15389,7 @@ function LineChart({ title, data, options, className, units, content }) {
15394
15389
  position: "bottom"
15395
15390
  },
15396
15391
  datalabels: {
15397
- display: (_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false,
15392
+ display: (context) => { var _a; return context.dataset.data[context.dataIndex] !== null && ((_a = content === null || content === void 0 ? void 0 : content.showLabels) !== null && _a !== void 0 ? _a : false); },
15398
15393
  color: "#0F172A",
15399
15394
  font: { size: 12 },
15400
15395
  offset: 6,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dp-widgets-framework",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"