pace-chart-lib 1.0.69 → 1.0.70

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.
Files changed (72) hide show
  1. package/dist/Components/Charts/ChartJS/charts/CJSAreaChart.d.ts +19 -0
  2. package/dist/Components/Charts/ChartJS/charts/CJSBubbleChart.d.ts +17 -0
  3. package/dist/Components/Charts/ChartJS/charts/CJSColumnChart.d.ts +19 -0
  4. package/dist/Components/Charts/ChartJS/charts/CJSDonutChart.d.ts +19 -0
  5. package/dist/Components/Charts/ChartJS/charts/CJSHorizontalBarChart.d.ts +18 -0
  6. package/dist/Components/Charts/ChartJS/charts/CJSLineChart.d.ts +19 -0
  7. package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackAreaChart.d.ts +17 -0
  8. package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackColumnChart.d.ts +17 -0
  9. package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackHorizontalBarChart.d.ts +17 -0
  10. package/dist/Components/Charts/ChartJS/charts/CJSNormalizedStackLineChart.d.ts +17 -0
  11. package/dist/Components/Charts/ChartJS/charts/CJSPieChart.d.ts +23 -0
  12. package/dist/Components/Charts/ChartJS/charts/CJSPolarAreaChart.d.ts +19 -0
  13. package/dist/Components/Charts/ChartJS/charts/CJSRadarChart.d.ts +16 -0
  14. package/dist/Components/Charts/ChartJS/charts/CJSScatterChart.d.ts +16 -0
  15. package/dist/Components/Charts/ChartJS/charts/CJSStackAreaChart.d.ts +15 -0
  16. package/dist/Components/Charts/ChartJS/charts/CJSStackColumnChart.d.ts +15 -0
  17. package/dist/Components/Charts/ChartJS/charts/CJSStackHorizontalBarChart.d.ts +15 -0
  18. package/dist/Components/Charts/ChartJS/charts/CJSStackLineChart.d.ts +15 -0
  19. package/dist/Components/Charts/ChartJS/core/ChartJSDataTransformer.d.ts +31 -0
  20. package/dist/Components/Charts/ChartJS/core/ChartJSOptionsMapper.d.ts +9 -0
  21. package/dist/Components/Charts/ChartJS/core/ChartJSWrapper.d.ts +27 -0
  22. package/dist/Components/Charts/ChartJS/index.d.ts +21 -0
  23. package/dist/Components/Charts/ChartsWithAxis/AreaFamily/AreaChart.d.ts +4 -0
  24. package/dist/Components/Charts/ChartsWithAxis/AreaFamily/NormalizedStackAreaChart.d.ts +4 -0
  25. package/dist/Components/Charts/ChartsWithAxis/AreaFamily/StackAreaChart.d.ts +4 -0
  26. package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisFunctions.d.ts +638 -0
  27. package/dist/Components/Charts/ChartsWithAxis/ChartsWithAxisTypes.types.d.ts +172 -0
  28. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnChart.d.ts +4 -0
  29. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/ColumnHistogramChart.d.ts +4 -0
  30. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/CustomColumnChart.d.ts +4 -0
  31. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/LayeredColumnChart.d.ts +4 -0
  32. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/NormalizedStackColumnChart.d.ts +4 -0
  33. package/dist/Components/Charts/ChartsWithAxis/ColumnFamily/StackColumnChart.d.ts +4 -0
  34. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalBarChart.d.ts +4 -0
  35. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/HorizontalHistogramChart.d.ts +4 -0
  36. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/LayeredHorizontalBarChart.d.ts +4 -0
  37. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/NormalizedStackHorizontalBarChart.d.ts +4 -0
  38. package/dist/Components/Charts/ChartsWithAxis/HorizontalBarFamily/StackHorizontalBarChart.d.ts +4 -0
  39. package/dist/Components/Charts/ChartsWithAxis/LineFamily/LineChart.d.ts +4 -0
  40. package/dist/Components/Charts/ChartsWithAxis/LineFamily/NormalizedStackLineChart.d.ts +4 -0
  41. package/dist/Components/Charts/ChartsWithAxis/LineFamily/StackLineChart.d.ts +4 -0
  42. package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/DotPlot.d.ts +4 -0
  43. package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/TornadoChart.d.ts +4 -0
  44. package/dist/Components/Charts/ChartsWithAxis/MiscellaneousChartFamily/WaterfallChart.d.ts +4 -0
  45. package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisFunctions.d.ts +96 -0
  46. package/dist/Components/Charts/ChartsWithoutAxis/ChartsWithoutAxisTypes.types.d.ts +111 -0
  47. package/dist/Components/Charts/ChartsWithoutAxis/Maps/Cordinates.d.ts +26 -0
  48. package/dist/Components/Charts/ChartsWithoutAxis/Maps/Maps.d.ts +4 -0
  49. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/BubbleChart.d.ts +4 -0
  50. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/OrganizationChart.d.ts +4 -0
  51. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ProgressChart.d.ts +3 -0
  52. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/PyramidChart.d.ts +3 -0
  53. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/RadialBarChart.d.ts +4 -0
  54. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/SankeyChart.d.ts +4 -0
  55. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/ScatterChart.d.ts +4 -0
  56. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/Speedometer.d.ts +3 -0
  57. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/VennChart.d.ts +4 -0
  58. package/dist/Components/Charts/ChartsWithoutAxis/OtherCharts/WordCloud.d.ts +4 -0
  59. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/DonutChart.d.ts +4 -0
  60. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieChart.d.ts +4 -0
  61. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieFamilyCommonFunctions.d.ts +10 -0
  62. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/PieofPieChart.d.ts +3 -0
  63. package/dist/Components/Charts/ChartsWithoutAxis/PieFamily/TreemapChart.d.ts +3 -0
  64. package/dist/Components/Charts/Core/Common.types.d.ts +410 -0
  65. package/dist/Components/Charts/Core/CommonFunctions.d.ts +250 -0
  66. package/dist/Components/Charts/Core/DefaultChartDataProperties.d.ts +66 -0
  67. package/dist/Components/Charts/Core/DefaultProperties.types.d.ts +631 -0
  68. package/dist/Services/ErrorLog.d.ts +1 -0
  69. package/dist/index.d.ts +37 -0
  70. package/dist/pace-chart-lib.es.js +74439 -0
  71. package/dist/pace-chart-lib.umd.js +58 -44
  72. package/package.json +1 -1
@@ -14262,38 +14262,49 @@
14262
14262
  throw e;
14263
14263
  }
14264
14264
  };
14265
- const dataTablePreCalculation = (formatOptions, yLabel, yTitle, seriesData, dimensionList) => {
14265
+ const dataTablePreCalculation = (formatOptions, yLabel, yTitle, seriesData, dimensionList, data) => {
14266
14266
  try {
14267
+ const extraDataTableFields = data?.DataTableData ?? [];
14267
14268
  let dataTable = [];
14268
14269
  let dataTableHeight = 20;
14269
14270
  if (formatOptions.dataTableProperties && formatOptions.dataTableProperties.dataTable) {
14271
+ const dataTableData = [...seriesData, ...extraDataTableFields];
14270
14272
  formatOptions.xAxisLabel.xAxisLabelVisibility = false;
14271
- let exactAvailableWidth = yLabel + yTitle;
14272
- seriesData.forEach((data, i) => {
14273
- let tempObj = {
14274
- data: data.data.filter(
14275
- (data2) => dimensionList.includes(data2.dimension)
14276
- ),
14277
- properties: {
14278
- legend: data.properties.alias,
14279
- color: data.properties.color,
14280
- markerColor: data.properties.markerColor,
14281
- markerShape: data.properties.markerShape,
14282
- lineStyle: data.properties.lineStyle,
14283
- height: calculateDataTableObjectHeight(
14284
- data.properties.alias.includes("~$~") ? data.properties.alias.split("~$~")[1] : data.properties.alias,
14285
- exactAvailableWidth,
14286
- formatOptions
14287
- )
14288
- }
14289
- };
14290
- dataTableHeight += tempObj.properties.height;
14291
- dataTable.push(tempObj);
14273
+ const isLegendIconVisible = formatOptions.dataTableProperties.disableLegendIcon ? false : true;
14274
+ const widthToSubtract = isLegendIconVisible ? 35 : 0;
14275
+ let exactAvailableWidth = yLabel + yTitle - widthToSubtract;
14276
+ dataTableData.forEach((data2, i) => {
14277
+ if (data2?.properties?.showInDataTable ?? true) {
14278
+ let tempObj = {
14279
+ data: data2.data.filter(
14280
+ (data3) => dimensionList.includes(data3.dimension)
14281
+ ),
14282
+ properties: {
14283
+ legend: data2.properties.alias,
14284
+ color: data2.properties.color,
14285
+ markerColor: data2.properties.markerColor,
14286
+ markerShape: data2.properties.markerShape,
14287
+ lineStyle: data2.properties.lineStyle,
14288
+ height: calculateDataTableObjectHeight(
14289
+ data2.properties.alias.includes("~$~") ? data2.properties.alias.split("~$~")[1] : data2.properties.alias,
14290
+ exactAvailableWidth,
14291
+ formatOptions
14292
+ )
14293
+ }
14294
+ };
14295
+ dataTableHeight += tempObj.properties.height;
14296
+ dataTable.push(tempObj);
14297
+ }
14292
14298
  });
14293
14299
  } else {
14294
14300
  dataTableHeight = 0;
14295
14301
  dataTable = [];
14296
14302
  }
14303
+ if (dataTable.length == 0) {
14304
+ dataTableHeight = 0;
14305
+ dataTable = [];
14306
+ formatOptions.dataTableProperties.dataTable = false;
14307
+ }
14297
14308
  return { dataTable, dataTableHeight };
14298
14309
  } catch (e) {
14299
14310
  }
@@ -14336,7 +14347,7 @@
14336
14347
  ).style("text-align", "center").style("vertical-align", "middle").text("");
14337
14348
  }
14338
14349
  let legendsParentTag = temp.append("foreignObject").attr("x", -margin.left).attr("y", tableStartY + yCordinate).attr("width", margin.left).attr("height", cellHeight2);
14339
- let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "flex-start").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "nowrap").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", formatOptions.dataTableProperties.disableLegendIcon ? `2px` : `5px`).style("padding-right", `3px`).style(
14350
+ let innerdiv = legendsParentTag.append("xhtml:div").style("display", "flex").style("justify-content", "center").style("align-items", "center").attr("class", "parentClass").style("flex-wrap", "wrap").style("flex-direction", "row").style("pointer-events", "auto").style("width", cellWidth).style("height", `${cellHeight2}px`).style("padding-left", formatOptions.dataTableProperties.disableLegendIcon ? `2px` : `5px`).style("padding-right", `3px`).style(
14340
14351
  "border-width",
14341
14352
  getBorderStyle(
14342
14353
  formatOptions,
@@ -14399,7 +14410,7 @@
14399
14410
  ).style("font-style", fontStyle.includes("Italic") ? "Italic" : "").style(
14400
14411
  "text-decoration",
14401
14412
  fontStyle.includes("Underline") ? "Underline" : ""
14402
- ).style("padding-left", `5px`).style("white-space", "normal").style("overflow-wrap", "break-word").style("color", "black").style("width", "100%").style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", text).text(text);
14413
+ ).style("padding-left", `5px`).style("white-space", "normal").style("overflow-wrap", "break-word").style("color", "black").style("width", formatOptions.dataTableProperties.disableLegendIcon ? "100%" : "calc(100% - 30px)").style("font-weight", fontStyle.includes("Bold") ? "Bold" : "").attr("title", text).text(text);
14403
14414
  };
14404
14415
  let innerVerticalBorderLineWidth = formatOptions.dataTableInnerBorder.verticalBorderLineWidth;
14405
14416
  let innerHorizontalBorderLineWidth = formatOptions.dataTableInnerBorder.horizontalBorderLineWidth;
@@ -17615,7 +17626,8 @@
17615
17626
  yLabel,
17616
17627
  yTitle,
17617
17628
  seriesData,
17618
- chartJSON.dimensionList
17629
+ chartJSON.dimensionList,
17630
+ data
17619
17631
  ));
17620
17632
  initSvg$1(
17621
17633
  // for svg creation
@@ -18201,7 +18213,8 @@
18201
18213
  yLabel,
18202
18214
  yTitle,
18203
18215
  seriesData,
18204
- chartJSON.dimensionList
18216
+ chartJSON.dimensionList,
18217
+ data
18205
18218
  ));
18206
18219
  initSvg$1(
18207
18220
  // for svg creation
@@ -19324,7 +19337,8 @@
19324
19337
  yLabel,
19325
19338
  yTitle,
19326
19339
  seriesData,
19327
- chartJSON.dimensionList
19340
+ chartJSON.dimensionList,
19341
+ data
19328
19342
  ));
19329
19343
  initSvg$1(
19330
19344
  // for svg creation
@@ -19880,7 +19894,8 @@
19880
19894
  yLabel,
19881
19895
  yTitle,
19882
19896
  seriesData,
19883
- chartJSON.dimensionList
19897
+ chartJSON.dimensionList,
19898
+ data
19884
19899
  ));
19885
19900
  initSvg$1(
19886
19901
  // for svg creation
@@ -20619,7 +20634,8 @@
20619
20634
  yLabel,
20620
20635
  yTitle,
20621
20636
  seriesData,
20622
- chartJSON.dimensionList
20637
+ chartJSON.dimensionList,
20638
+ data
20623
20639
  ));
20624
20640
  initSvg$1(
20625
20641
  // for svg creation
@@ -22462,7 +22478,8 @@
22462
22478
  yLabel,
22463
22479
  yTitle,
22464
22480
  seriesData,
22465
- chartJSON.dimensionList
22481
+ chartJSON.dimensionList,
22482
+ data
22466
22483
  ));
22467
22484
  initSvg$1(
22468
22485
  // for svg creation
@@ -23036,7 +23053,8 @@
23036
23053
  yLabel,
23037
23054
  yTitle,
23038
23055
  seriesData,
23039
- chartJSON.dimensionList
23056
+ chartJSON.dimensionList,
23057
+ data
23040
23058
  ));
23041
23059
  initSvg$1(
23042
23060
  // for svg creation
@@ -23615,7 +23633,8 @@
23615
23633
  yLabel,
23616
23634
  yTitle,
23617
23635
  seriesData,
23618
- chartJSON.dimensionList
23636
+ chartJSON.dimensionList,
23637
+ data
23619
23638
  ));
23620
23639
  initSvg$1(
23621
23640
  // for svg creation
@@ -27133,7 +27152,8 @@
27133
27152
  yLabel,
27134
27153
  yTitle,
27135
27154
  seriesData,
27136
- chartJSON.dimensionList
27155
+ chartJSON.dimensionList,
27156
+ data
27137
27157
  ));
27138
27158
  initSvg$1(
27139
27159
  // for svg creation
@@ -27728,7 +27748,8 @@
27728
27748
  yLabel,
27729
27749
  yTitle,
27730
27750
  seriesData,
27731
- chartJSON.dimensionList
27751
+ chartJSON.dimensionList,
27752
+ data
27732
27753
  ));
27733
27754
  initSvg$1(
27734
27755
  // for svg creation
@@ -28326,7 +28347,8 @@
28326
28347
  yLabel,
28327
28348
  yTitle,
28328
28349
  seriesData,
28329
- chartJSON.dimensionList
28350
+ chartJSON.dimensionList,
28351
+ data
28330
28352
  ));
28331
28353
  initSvg$1(
28332
28354
  // for svg creation
@@ -56857,14 +56879,6 @@
56857
56879
  chartJSON
56858
56880
  ));
56859
56881
  setSVGContainer(margin);
56860
- ({ dataTable, dataTableHeight } = dataTablePreCalculation(
56861
- // calculations for data tables
56862
- formatOptions,
56863
- yLabel,
56864
- yTitle,
56865
- seriesData,
56866
- chartJSON.dimensionList
56867
- ));
56868
56882
  initSvg$1(
56869
56883
  // for svg creation
56870
56884
  svg,
@@ -57150,7 +57164,7 @@
57150
57164
  customYaxisMaxValue,
57151
57165
  barChart,
57152
57166
  innerWidth2
57153
- ).customTickValue ?? (dataTableHeight > 0 ? (innerWidth2 - dataTableHeight) / 30 : innerWidth2 / 30)
57167
+ ).customTickValue ?? innerWidth2 / 30
57154
57168
  ).tickPadding(8).tickSizeOuter(0);
57155
57169
  };
57156
57170
  const getChartType = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pace-chart-lib",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "A simple React + Vite + TS UI library with a Button using custom fonts via SCSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",