@ammarkhalidfarooq/dashboard-package 0.6.49 → 0.6.50

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.cjs.js CHANGED
@@ -4254,6 +4254,7 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
4254
4254
  var categories = chartData.map(function (item) {
4255
4255
  return item.label;
4256
4256
  });
4257
+ var axisLabels = categories.length <= 1 ? categories : categories.length === 2 ? [categories[0], categories[categories.length - 1]] : [categories[0], categories[Math.floor(categories.length / 2)], categories[categories.length - 1]];
4257
4258
  var chartOptions = {
4258
4259
  chart: {
4259
4260
  type: "area",
@@ -4378,31 +4379,21 @@ var MetricSparklineCard = function MetricSparklineCard(_ref) {
4378
4379
  series: series,
4379
4380
  type: "area",
4380
4381
  height: "100%"
4381
- }), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
4382
+ }), axisLabels.length > 0 && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
4382
4383
  sx: {
4383
4384
  display: "flex",
4384
4385
  justifyContent: "space-between",
4385
4386
  mt: 0.5
4386
4387
  },
4387
- children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
4388
- sx: {
4389
- fontSize: "10px",
4390
- color: "rgba(0, 0, 0, 0.3)"
4391
- },
4392
- children: categories[0]
4393
- }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
4394
- sx: {
4395
- fontSize: "10px",
4396
- color: "rgba(0, 0, 0, 0.3)"
4397
- },
4398
- children: categories[Math.floor(categories.length / 2)]
4399
- }), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
4400
- sx: {
4401
- fontSize: "10px",
4402
- color: "rgba(0, 0, 0, 0.3)"
4403
- },
4404
- children: categories[categories.length - 1]
4405
- })]
4388
+ children: axisLabels.map(function (label, idx) {
4389
+ return /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
4390
+ sx: {
4391
+ fontSize: "10px",
4392
+ color: "rgba(0, 0, 0, 0.3)"
4393
+ },
4394
+ children: label
4395
+ }, "".concat(label, "-").concat(idx));
4396
+ })
4406
4397
  })]
4407
4398
  }), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
4408
4399
  sx: {