@databrainhq/plugin 0.7.20 → 0.7.22

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 (31) hide show
  1. package/dist/components/ChartModal/ChartConfig.d.ts +2 -1
  2. package/dist/components/ChartModal/ChartModalOptions.d.ts +2 -1
  3. package/dist/components/Charts/AreaChart.d.ts +1 -1
  4. package/dist/components/Charts/BarChart.d.ts +4 -2
  5. package/dist/components/Charts/BoxPlot.d.ts +1 -1
  6. package/dist/components/Charts/BubbleChart.d.ts +1 -1
  7. package/dist/components/Charts/ComboChart.d.ts +1 -1
  8. package/dist/components/Charts/DoughnutChart.d.ts +1 -1
  9. package/dist/components/Charts/FunnelChart.d.ts +1 -1
  10. package/dist/components/Charts/GaugeChart.d.ts +1 -1
  11. package/dist/components/Charts/Histogram.d.ts +1 -1
  12. package/dist/components/Charts/LineChart.d.ts +4 -3
  13. package/dist/components/Charts/PieChart.d.ts +1 -1
  14. package/dist/components/Charts/RowChart.d.ts +1 -1
  15. package/dist/components/Charts/SankeyChart.d.ts +1 -1
  16. package/dist/components/Charts/ScatterChart.d.ts +1 -1
  17. package/dist/components/Charts/StackedBarChart.d.ts +1 -1
  18. package/dist/components/Charts/SteppedAreaChart.d.ts +1 -1
  19. package/dist/components/Charts/WaterfallChart.d.ts +1 -1
  20. package/dist/components/MetricChart/ChartImageDownloadButton.d.ts +10 -0
  21. package/dist/components/MetricChart/MetricChart.d.ts +4 -2
  22. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
  23. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +2 -1
  24. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +2 -1
  25. package/dist/components/Select/index.d.ts +1 -1
  26. package/dist/index.es.js +427 -399
  27. package/dist/index.umd.js +52 -52
  28. package/dist/style.css +1 -1
  29. package/dist/types/metricCreate.d.ts +1 -0
  30. package/dist/utils/handleSaveChartImage.d.ts +3 -0
  31. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -4139,6 +4139,42 @@ function useForm(props = {}) {
4139
4139
  _formControl.current.formState = getProxyFormState(formState, control._proxyFormState);
4140
4140
  return _formControl.current;
4141
4141
  }
4142
+ const chartOptions = "_chartOptions_ltlvy_1";
4143
+ const chartOption = "_chartOption_ltlvy_1";
4144
+ const chartOptionBtn = "_chartOptionBtn_ltlvy_13";
4145
+ const chartOptionText = "_chartOptionText_ltlvy_19";
4146
+ const chartOptionBtnSelected = "_chartOptionBtnSelected_ltlvy_25";
4147
+ const container$f = "_container_ltlvy_31";
4148
+ const field$1 = "_field_ltlvy_37";
4149
+ const fieldText = "_fieldText_ltlvy_43";
4150
+ const selectFieldContainer = "_selectFieldContainer_ltlvy_49";
4151
+ const selectField = "_selectField_ltlvy_49";
4152
+ const doneBtn = "_doneBtn_ltlvy_61";
4153
+ const measureText = "_measureText_ltlvy_67";
4154
+ const singleValueMeasure = "_singleValueMeasure_ltlvy_73";
4155
+ const plus = "_plus_ltlvy_79";
4156
+ const plusIcon = "_plusIcon_ltlvy_85";
4157
+ const form$3 = "_form_ltlvy_91";
4158
+ const chartType = "_chartType_ltlvy_97";
4159
+ var styles$A = {
4160
+ chartOptions,
4161
+ chartOption,
4162
+ chartOptionBtn,
4163
+ chartOptionText,
4164
+ chartOptionBtnSelected,
4165
+ container: container$f,
4166
+ field: field$1,
4167
+ fieldText,
4168
+ selectFieldContainer,
4169
+ selectField,
4170
+ doneBtn,
4171
+ measureText,
4172
+ singleValueMeasure,
4173
+ plus,
4174
+ plusIcon,
4175
+ form: form$3,
4176
+ chartType
4177
+ };
4142
4178
  const e$3 = typeof window == "undefined" || typeof document == "undefined";
4143
4179
  let s$5 = e$3 ? useEffect : useLayoutEffect;
4144
4180
  function s$4(e2) {
@@ -4902,37 +4938,37 @@ let xe = "div", ne = S.RenderStrategy, re = C$2(function(e2, s2) {
4902
4938
  let n2 = useContext(F) !== null, m2 = s() !== null;
4903
4939
  return React__default.createElement(React__default.Fragment, null, !n2 && m2 ? React__default.createElement(q, { ref: s$12, ...e2 }) : React__default.createElement(re, { ref: s$12, ...e2 }));
4904
4940
  }), We = Object.assign(q, { Child: Pe, Root: q });
4905
- const listBoxButton = "_listBoxButton_1mdwz_5";
4906
- const selectedOptionText = "_selectedOptionText_1mdwz_17";
4907
- const transitionDiv = "_transitionDiv_1mdwz_21";
4908
- const listboxButtonWrapper = "_listboxButtonWrapper_1mdwz_25";
4909
- const arrowicon = "_arrowicon_1mdwz_28";
4910
- const leave$1 = "_leave_1mdwz_31";
4911
- const leaveFrom$1 = "_leaveFrom_1mdwz_34";
4912
- const leaveTo$1 = "_leaveTo_1mdwz_37";
4913
- const notAvailable = "_notAvailable_1mdwz_40";
4914
- const option$1 = "_option_1mdwz_43";
4915
- const activeOption = "_activeOption_1mdwz_46";
4916
- const optionSelected = "_optionSelected_1mdwz_49";
4917
- const inactiveOption = "_inactiveOption_1mdwz_52";
4918
- const optionLabel = "_optionLabel_1mdwz_55";
4919
- const optionSubLabel = "_optionSubLabel_1mdwz_58";
4920
- const selectedLabel = "_selectedLabel_1mdwz_61";
4921
- const nonselectedLabel = "_nonselectedLabel_1mdwz_64";
4922
- const check = "_check_1mdwz_67";
4923
- const checkActive = "_checkActive_1mdwz_70";
4924
- const checkInactive = "_checkInactive_1mdwz_73";
4925
- const checkIcon$1 = "_checkIcon_1mdwz_76";
4926
- const checkIconSelected = "_checkIconSelected_1mdwz_79";
4927
- const checkIconUnselected = "_checkIconUnselected_1mdwz_82";
4928
- const loadMore$1 = "_loadMore_1mdwz_85";
4929
- const selectedList = "_selectedList_1mdwz_88";
4930
- const selectedListItem = "_selectedListItem_1mdwz_91";
4941
+ const listBoxButton = "_listBoxButton_1xd0l_5";
4942
+ const selectedOptionText = "_selectedOptionText_1xd0l_17";
4943
+ const transitionDiv = "_transitionDiv_1xd0l_21";
4944
+ const listboxButtonWrapper = "_listboxButtonWrapper_1xd0l_25";
4945
+ const arrowicon = "_arrowicon_1xd0l_28";
4946
+ const leave$1 = "_leave_1xd0l_31";
4947
+ const leaveFrom$1 = "_leaveFrom_1xd0l_34";
4948
+ const leaveTo$1 = "_leaveTo_1xd0l_37";
4949
+ const notAvailable = "_notAvailable_1xd0l_40";
4950
+ const option$1 = "_option_1xd0l_43";
4951
+ const activeOption = "_activeOption_1xd0l_46";
4952
+ const optionSelected = "_optionSelected_1xd0l_49";
4953
+ const inactiveOption = "_inactiveOption_1xd0l_52";
4954
+ const optionLabel = "_optionLabel_1xd0l_55";
4955
+ const optionSubLabel = "_optionSubLabel_1xd0l_58";
4956
+ const selectedLabel = "_selectedLabel_1xd0l_61";
4957
+ const nonselectedLabel = "_nonselectedLabel_1xd0l_64";
4958
+ const check = "_check_1xd0l_67";
4959
+ const checkActive = "_checkActive_1xd0l_70";
4960
+ const checkInactive = "_checkInactive_1xd0l_73";
4961
+ const checkIcon$1 = "_checkIcon_1xd0l_76";
4962
+ const checkIconSelected = "_checkIconSelected_1xd0l_79";
4963
+ const checkIconUnselected = "_checkIconUnselected_1xd0l_82";
4964
+ const loadMore$1 = "_loadMore_1xd0l_85";
4965
+ const selectedList = "_selectedList_1xd0l_88";
4966
+ const selectedListItem = "_selectedListItem_1xd0l_91";
4931
4967
  var style$1 = {
4932
- "listBox-label": "_listBox-label_1mdwz_1",
4933
- "listBoxButton-container": "_listBoxButton-container_1mdwz_5",
4968
+ "listBox-label": "_listBox-label_1xd0l_1",
4969
+ "listBoxButton-container": "_listBoxButton-container_1xd0l_5",
4934
4970
  listBoxButton,
4935
- "listBox-option": "_listBox-option_1mdwz_13",
4971
+ "listBox-option": "_listBox-option_1xd0l_13",
4936
4972
  selectedOptionText,
4937
4973
  transitionDiv,
4938
4974
  listboxButtonWrapper,
@@ -4962,7 +4998,7 @@ var style$1 = {
4962
4998
  const primary = "_primary_18yak_1";
4963
4999
  const secondary = "_secondary_18yak_5";
4964
5000
  const tertiary = "_tertiary_18yak_10";
4965
- var styles$A = {
5001
+ var styles$z = {
4966
5002
  primary,
4967
5003
  secondary,
4968
5004
  tertiary,
@@ -4996,14 +5032,14 @@ const Text = ({
4996
5032
  }) => {
4997
5033
  const Tag = variants[variant];
4998
5034
  return /* @__PURE__ */ jsx(Tag, {
4999
- className: classnames(styleClass === "custom" ? null : `${styles$A[styleClass]}`, className),
5035
+ className: classnames(styleClass === "custom" ? null : `${styles$z[styleClass]}`, className),
5000
5036
  onClick,
5001
5037
  style: style2,
5002
5038
  children: children2
5003
5039
  });
5004
5040
  };
5005
5041
  const search$1 = "_search_1klck_1";
5006
- var styles$z = {
5042
+ var styles$y = {
5007
5043
  "searchTab-container": "_searchTab-container_1klck_1",
5008
5044
  "searchTab-input": "_searchTab-input_1klck_5",
5009
5045
  search: search$1
@@ -5035,13 +5071,13 @@ const SearchTab = ({
5035
5071
  setSearchKeyword(keyword == null ? void 0 : keyword.toLowerCase());
5036
5072
  }, [setSearchKeyword, watch, keyword]);
5037
5073
  return /* @__PURE__ */ jsxs("div", {
5038
- className: `${styles$z["searchTab-container"]} ${className}`,
5074
+ className: `${styles$y["searchTab-container"]} ${className}`,
5039
5075
  children: [/* @__PURE__ */ jsx("input", {
5040
5076
  placeholder: "Search",
5041
5077
  ...register2("searchKeyword"),
5042
- className: styles$z["searchTab-input"]
5078
+ className: styles$y["searchTab-input"]
5043
5079
  }), /* @__PURE__ */ jsx("div", {
5044
- className: styles$z.search,
5080
+ className: styles$y.search,
5045
5081
  children: /* @__PURE__ */ jsx(iconoirSearch, {
5046
5082
  color: "#C7C7C7",
5047
5083
  width: "30px",
@@ -5181,9 +5217,7 @@ const Select = ({
5181
5217
  const HookSelect = ({
5182
5218
  control,
5183
5219
  name,
5184
- options: options2,
5185
- label: label2,
5186
- defaultValue: defaultValue2
5220
+ ...rest
5187
5221
  }) => {
5188
5222
  return /* @__PURE__ */ jsx(Controller, {
5189
5223
  control,
@@ -5194,11 +5228,9 @@ const HookSelect = ({
5194
5228
  value
5195
5229
  }
5196
5230
  }) => /* @__PURE__ */ jsx(Select, {
5231
+ ...rest,
5197
5232
  onChange,
5198
- value,
5199
- label: label2,
5200
- options: options2,
5201
- defaultValue: defaultValue2
5233
+ value
5202
5234
  })
5203
5235
  });
5204
5236
  };
@@ -5333,7 +5365,7 @@ const MultiSelect = ({
5333
5365
  onClick,
5334
5366
  children: [/* @__PURE__ */ jsx("span", {
5335
5367
  className: style$1.selectedOptionText,
5336
- children: placeHolder || "Choose charts from list"
5368
+ children: placeHolder || "Choose options from list"
5337
5369
  }), /* @__PURE__ */ jsx("span", {
5338
5370
  className: style$1.listBoxButton,
5339
5371
  children: /* @__PURE__ */ jsx(mdiChevronDown, {
@@ -5358,15 +5390,12 @@ const MultiSelect = ({
5358
5390
  className: ({
5359
5391
  selected,
5360
5392
  active
5361
- }) => `${style$1.option} ${selected || active ? style$1.optionSelected : ""}`,
5393
+ }) => classnames(selected ? style$1.optionSelected : "", active ? style$1.activeOption : "", style$1.option),
5362
5394
  value: option2.value,
5363
5395
  children: ({
5364
5396
  selected
5365
5397
  }) => /* @__PURE__ */ jsxs(Fragment, {
5366
5398
  children: [/* @__PURE__ */ jsx("span", {
5367
- className: `${style$1.optionLabel}`,
5368
- children: option2.label
5369
- }), /* @__PURE__ */ jsx("span", {
5370
5399
  className: style$1.check,
5371
5400
  children: selected ? /* @__PURE__ */ jsx("div", {
5372
5401
  className: style$1.checkIconSelected,
@@ -5376,6 +5405,9 @@ const MultiSelect = ({
5376
5405
  }) : /* @__PURE__ */ jsx("div", {
5377
5406
  className: style$1.checkIconUnselected
5378
5407
  })
5408
+ }), /* @__PURE__ */ jsx("span", {
5409
+ className: `${style$1.optionLabel}`,
5410
+ children: option2.label
5379
5411
  })]
5380
5412
  })
5381
5413
  }, option2.value)), limit <= options2.length && /* @__PURE__ */ jsx(Button, {
@@ -5428,50 +5460,6 @@ const HookMultiSelect = ({
5428
5460
  })
5429
5461
  });
5430
5462
  };
5431
- const SelectField = ({
5432
- value,
5433
- options: options2,
5434
- control
5435
- }) => {
5436
- const [yAxisValue, setYAxisValue] = useState("");
5437
- return /* @__PURE__ */ jsx(HookSelect, {
5438
- control,
5439
- label: "",
5440
- options: options2,
5441
- onChange: setYAxisValue,
5442
- name: yAxisValue ? yAxisValue : value
5443
- });
5444
- };
5445
- const chartOptions = "_chartOptions_yt3j5_1";
5446
- const chartOption = "_chartOption_yt3j5_1";
5447
- const chartOptionBtn = "_chartOptionBtn_yt3j5_13";
5448
- const chartOptionText = "_chartOptionText_yt3j5_19";
5449
- const container$f = "_container_yt3j5_25";
5450
- const field$1 = "_field_yt3j5_31";
5451
- const fieldText = "_fieldText_yt3j5_37";
5452
- const doneBtn = "_doneBtn_yt3j5_43";
5453
- const measureText = "_measureText_yt3j5_49";
5454
- const singleValueMeasure = "_singleValueMeasure_yt3j5_55";
5455
- const plus = "_plus_yt3j5_61";
5456
- const plusIcon = "_plusIcon_yt3j5_67";
5457
- const form$3 = "_form_yt3j5_73";
5458
- const chartType = "_chartType_yt3j5_79";
5459
- var styles$y = {
5460
- chartOptions,
5461
- chartOption,
5462
- chartOptionBtn,
5463
- chartOptionText,
5464
- container: container$f,
5465
- field: field$1,
5466
- fieldText,
5467
- doneBtn,
5468
- measureText,
5469
- singleValueMeasure,
5470
- plus,
5471
- plusIcon,
5472
- form: form$3,
5473
- chartType
5474
- };
5475
5463
  const SOMETHING_WENT_WRONG = "something went wrong, please try again";
5476
5464
  const CHART_TYPES = {
5477
5465
  line: "line",
@@ -5523,29 +5511,11 @@ const DESTINATIONS = {
5523
5511
  BigQuery: "BigQuery",
5524
5512
  Postges: "Postgres"
5525
5513
  };
5526
- const akarIconsCirclePlus = (props) => /* @__PURE__ */ jsx("svg", {
5527
- viewBox: "0 0 24 24",
5528
- width: "1.2em",
5529
- height: "1.2em",
5530
- ...props,
5531
- children: /* @__PURE__ */ jsxs("g", {
5532
- fill: "none",
5533
- stroke: "currentColor",
5534
- strokeWidth: 2,
5535
- children: [/* @__PURE__ */ jsx("path", {
5536
- strokeLinecap: "round",
5537
- d: "M12 8v4m0 0v4m0-4h4m-4 0H8"
5538
- }), /* @__PURE__ */ jsx("circle", {
5539
- cx: 12,
5540
- cy: 12,
5541
- r: 10
5542
- })]
5543
- })
5544
- });
5545
5514
  const ChartConfig = ({
5546
5515
  data: data2,
5547
5516
  setXAxis,
5548
5517
  xAxis,
5518
+ yAxisList,
5549
5519
  setYAxisList,
5550
5520
  chartType: chartType2,
5551
5521
  setStep,
@@ -5565,29 +5535,22 @@ const ChartConfig = ({
5565
5535
  value: "NONE",
5566
5536
  label: "NONE"
5567
5537
  });
5568
- const [selectField, setSelectField] = useState([options2 == null ? void 0 : options2[0]]);
5569
5538
  const [source, setSource] = useState("");
5570
5539
  const [target, setTarget] = useState("");
5571
5540
  const [values, setValues] = useState("");
5572
- const [count2, setCount] = useState(1);
5573
- const [showAddButton, setShowAddButton] = useState("show");
5574
- const addSelectField = () => {
5575
- if (count2 < (options2 == null ? void 0 : options2.length)) {
5576
- const val = [...selectField, options2[count2]];
5577
- setSelectField(val);
5578
- if (count2 === options2.length - 1) {
5579
- setShowAddButton("hidden");
5580
- }
5581
- }
5582
- setCount(count2 + 1);
5583
- };
5584
5541
  const {
5585
5542
  handleSubmit,
5586
- control
5543
+ control,
5544
+ setValue
5587
5545
  } = useForm();
5588
- const onSubmitOptions = (yAxisdata) => {
5589
- const list = Object.values(yAxisdata);
5590
- setYAxisList(list.filter((item) => item !== void 0 && item !== "NONE"));
5546
+ useEffect(() => {
5547
+ if (!yAxisList)
5548
+ return;
5549
+ setValue("yAxisList", yAxisList);
5550
+ }, []);
5551
+ const onSubmitOptions = (fieldValues) => {
5552
+ const list = fieldValues.yAxisList;
5553
+ setYAxisList(list.filter((item) => item && item !== "NONE"));
5591
5554
  setSettingsShow(false);
5592
5555
  };
5593
5556
  const onSubmitSnakeyValues = () => {
@@ -5595,12 +5558,12 @@ const ChartConfig = ({
5595
5558
  };
5596
5559
  if (chartType2 === SANKEY) {
5597
5560
  return /* @__PURE__ */ jsxs("div", {
5598
- className: styles$y.container,
5561
+ className: styles$A.container,
5599
5562
  children: [/* @__PURE__ */ jsxs("div", {
5600
- className: styles$y.field,
5563
+ className: styles$A.field,
5601
5564
  children: [/* @__PURE__ */ jsx(Text, {
5602
5565
  styleClass: "font-14",
5603
- className: styles$y.fieldText,
5566
+ className: styles$A.fieldText,
5604
5567
  variant: "h4",
5605
5568
  children: "Source"
5606
5569
  }), /* @__PURE__ */ jsx(Select, {
@@ -5610,10 +5573,10 @@ const ChartConfig = ({
5610
5573
  value: source
5611
5574
  })]
5612
5575
  }), /* @__PURE__ */ jsxs("div", {
5613
- className: styles$y.field,
5576
+ className: styles$A.field,
5614
5577
  children: [/* @__PURE__ */ jsx(Text, {
5615
5578
  styleClass: "font-14",
5616
- className: styles$y.fieldText,
5579
+ className: styles$A.fieldText,
5617
5580
  variant: "h4",
5618
5581
  children: "Target"
5619
5582
  }), /* @__PURE__ */ jsx(Select, {
@@ -5625,7 +5588,7 @@ const ChartConfig = ({
5625
5588
  }), /* @__PURE__ */ jsxs("div", {
5626
5589
  children: [/* @__PURE__ */ jsx(Text, {
5627
5590
  styleClass: "font-14",
5628
- className: styles$y.fieldText,
5591
+ className: styles$A.fieldText,
5629
5592
  variant: "h4",
5630
5593
  children: "Value"
5631
5594
  }), /* @__PURE__ */ jsx(Select, {
@@ -5638,7 +5601,7 @@ const ChartConfig = ({
5638
5601
  type: "submit",
5639
5602
  variant: "primary",
5640
5603
  size: "default",
5641
- className: styles$y.doneBtn,
5604
+ className: styles$A.doneBtn,
5642
5605
  onClick: () => {
5643
5606
  onSubmitSnakeyValues();
5644
5607
  setSettingsShow(false);
@@ -5650,10 +5613,10 @@ const ChartConfig = ({
5650
5613
  if (chartType2 === DOUGHNUT) {
5651
5614
  return /* @__PURE__ */ jsx(Fragment, {
5652
5615
  children: !!(chartType2 === DOUGHNUT || PIE) && /* @__PURE__ */ jsxs("div", {
5653
- className: styles$y.container,
5616
+ className: styles$A.container,
5654
5617
  children: [/* @__PURE__ */ jsx(Text, {
5655
5618
  styleClass: "font-14",
5656
- className: styles$y.field,
5619
+ className: styles$A.field,
5657
5620
  variant: "h4",
5658
5621
  children: "Dimension"
5659
5622
  }), /* @__PURE__ */ jsx(Select, {
@@ -5663,27 +5626,22 @@ const ChartConfig = ({
5663
5626
  value: xAxis
5664
5627
  }), /* @__PURE__ */ jsx(Text, {
5665
5628
  styleClass: "font-14",
5666
- className: styles$y.measureText,
5629
+ className: styles$A.measureText,
5667
5630
  variant: "h4",
5668
5631
  children: "Measure"
5669
- }), /* @__PURE__ */ jsx("div", {
5670
- className: styles$y.plus,
5671
- children: /* @__PURE__ */ jsx(akarIconsCirclePlus, {
5672
- className: `${styles$y.plusIcon} ${showAddButton}`,
5673
- onClick: () => addSelectField()
5674
- })
5675
5632
  }), /* @__PURE__ */ jsxs("form", {
5676
5633
  onSubmit: handleSubmit(onSubmitOptions),
5677
- className: styles$y.form,
5678
- children: [selectField.map((field2) => /* @__PURE__ */ jsx(SelectField, {
5679
- value: field2.value,
5634
+ className: styles$A.form,
5635
+ children: [/* @__PURE__ */ jsx(HookMultiSelect, {
5636
+ name: "yAxisList",
5680
5637
  options: options2,
5638
+ defaultValue: options2.map((option2) => option2.value),
5681
5639
  control
5682
- }, field2.value)), /* @__PURE__ */ jsx(Button, {
5640
+ }), /* @__PURE__ */ jsx(Button, {
5683
5641
  type: "submit",
5684
5642
  variant: "primary",
5685
5643
  size: "default",
5686
- className: styles$y.doneBtn,
5644
+ className: styles$A.doneBtn,
5687
5645
  children: "Done"
5688
5646
  })]
5689
5647
  })]
@@ -5691,12 +5649,12 @@ const ChartConfig = ({
5691
5649
  });
5692
5650
  }
5693
5651
  if (chartType2 === PIE) {
5694
- return /* @__PURE__ */ jsxs(Fragment, {
5695
- children: ["(", /* @__PURE__ */ jsxs("div", {
5696
- className: styles$y.container,
5652
+ return /* @__PURE__ */ jsx(Fragment, {
5653
+ children: /* @__PURE__ */ jsxs("div", {
5654
+ className: styles$A.container,
5697
5655
  children: [/* @__PURE__ */ jsx(Text, {
5698
5656
  styleClass: "font-14",
5699
- className: styles$y.field,
5657
+ className: styles$A.field,
5700
5658
  variant: "h4",
5701
5659
  children: "Dimension"
5702
5660
  }), /* @__PURE__ */ jsx(Select, {
@@ -5706,38 +5664,33 @@ const ChartConfig = ({
5706
5664
  value: xAxis
5707
5665
  }), /* @__PURE__ */ jsx(Text, {
5708
5666
  styleClass: "font-14",
5709
- className: styles$y.measureText,
5667
+ className: styles$A.measureText,
5710
5668
  variant: "h4",
5711
5669
  children: "Measure"
5712
- }), /* @__PURE__ */ jsx("div", {
5713
- className: styles$y.plus,
5714
- children: /* @__PURE__ */ jsx(akarIconsCirclePlus, {
5715
- className: `${styles$y.plusIcon} ${showAddButton}`,
5716
- onClick: () => addSelectField()
5717
- })
5718
5670
  }), /* @__PURE__ */ jsxs("form", {
5719
5671
  onSubmit: handleSubmit(onSubmitOptions),
5720
- className: styles$y.form,
5721
- children: [selectField.map((field2) => /* @__PURE__ */ jsx(SelectField, {
5722
- value: field2.value,
5672
+ className: styles$A.form,
5673
+ children: [/* @__PURE__ */ jsx(HookMultiSelect, {
5674
+ name: "yAxisList",
5723
5675
  options: options2,
5676
+ defaultValue: options2.map((option2) => option2.value),
5724
5677
  control
5725
- }, field2.value)), /* @__PURE__ */ jsx(Button, {
5678
+ }), /* @__PURE__ */ jsx(Button, {
5726
5679
  type: "submit",
5727
5680
  variant: "primary",
5728
5681
  size: "default",
5729
- className: styles$y.doneBtn,
5682
+ className: styles$A.doneBtn,
5730
5683
  children: "Done"
5731
5684
  })]
5732
5685
  })]
5733
- }), ")"]
5686
+ })
5734
5687
  });
5735
5688
  }
5736
5689
  if (chartType2 === "single value") {
5737
5690
  return /* @__PURE__ */ jsxs(Fragment, {
5738
5691
  children: [/* @__PURE__ */ jsx(Text, {
5739
5692
  styleClass: "font-14",
5740
- className: `${styles$y.singleValueMeasure}`,
5693
+ className: `${styles$A.singleValueMeasure}`,
5741
5694
  variant: "h4",
5742
5695
  children: "Measure"
5743
5696
  }), /* @__PURE__ */ jsx(Select, {
@@ -5749,7 +5702,7 @@ const ChartConfig = ({
5749
5702
  type: "button",
5750
5703
  variant: "primary",
5751
5704
  size: "default",
5752
- className: styles$y.doneBtn,
5705
+ className: styles$A.doneBtn,
5753
5706
  onClick: () => setSettingsShow(false),
5754
5707
  children: "Done"
5755
5708
  })]
@@ -5757,11 +5710,11 @@ const ChartConfig = ({
5757
5710
  }
5758
5711
  return /* @__PURE__ */ jsx(Fragment, {
5759
5712
  children: /* @__PURE__ */ jsxs("div", {
5760
- className: styles$y.container,
5713
+ className: styles$A.container,
5761
5714
  children: [chartType2 !== "gauge" && chartType2 !== BOXPLOT && chartType2 !== "table" && /* @__PURE__ */ jsxs(Fragment, {
5762
5715
  children: [/* @__PURE__ */ jsxs(Text, {
5763
5716
  styleClass: "font-14",
5764
- className: styles$y.field,
5717
+ className: styles$A.field,
5765
5718
  variant: "h4",
5766
5719
  children: [chartType2 !== "funnel" && chartType2 !== "row" && "X-axis", chartType2 === "funnel" && "Step", chartType2 === "row" && "Y-axis"]
5767
5720
  }), chartType2 === "funnel" ? /* @__PURE__ */ jsx(Select, {
@@ -5775,35 +5728,33 @@ const ChartConfig = ({
5775
5728
  onChange: setXAxis,
5776
5729
  value: xAxis
5777
5730
  })]
5778
- }), /* @__PURE__ */ jsxs("div", {
5779
- className: `${styles$y.chartType}
5780
- ${chartType2 !== "gauge" ? styles$y.measureText : ""}`,
5781
- children: [/* @__PURE__ */ jsxs(Text, {
5731
+ }), /* @__PURE__ */ jsx("div", {
5732
+ className: `${styles$A.chartType}
5733
+ ${chartType2 !== "gauge" ? styles$A.measureText : ""}`,
5734
+ children: /* @__PURE__ */ jsxs(Text, {
5782
5735
  styleClass: "font-14",
5783
5736
  variant: "h1",
5784
- className: styles$y.field,
5737
+ className: styles$A.field,
5785
5738
  children: [chartType2 !== "funnel" && chartType2 !== "gauge" && chartType2 !== "row" && chartType2 !== "boxplot" && chartType2 !== "table" && "Y-axis", (chartType2 === "funnel" || chartType2 === "gauge" || chartType2 === "boxplot" || chartType2 === "table") && "Measure", chartType2 === "row" && "X-axis"]
5786
- }), chartType2 !== "funnel" && chartType2 !== "gauge" && /* @__PURE__ */ jsx(akarIconsCirclePlus, {
5787
- className: `${styles$y.plusIcon} ${showAddButton}`,
5788
- onClick: () => addSelectField()
5789
- })]
5739
+ })
5790
5740
  }), /* @__PURE__ */ jsxs("form", {
5791
5741
  onSubmit: handleSubmit(onSubmitOptions),
5792
- className: styles$y.form,
5742
+ className: styles$A.form,
5793
5743
  children: [chartType2 === "funnel" || chartType2 === "gauge" ? /* @__PURE__ */ jsx(Select, {
5794
5744
  label: "",
5795
5745
  options: options2,
5796
5746
  onChange: setMeasure,
5797
5747
  value: measure
5798
- }) : selectField.map((field2) => /* @__PURE__ */ jsx(SelectField, {
5799
- value: field2.value,
5748
+ }) : /* @__PURE__ */ jsx(HookMultiSelect, {
5749
+ name: "yAxisList",
5800
5750
  options: options2,
5751
+ defaultValue: options2.map((option2) => option2.value),
5801
5752
  control
5802
- }, field2.value)), /* @__PURE__ */ jsx(Button, {
5753
+ }), /* @__PURE__ */ jsx(Button, {
5803
5754
  type: "submit",
5804
5755
  variant: "primary",
5805
5756
  size: "default",
5806
- className: styles$y.doneBtn,
5757
+ className: styles$A.doneBtn,
5807
5758
  children: "Done"
5808
5759
  })]
5809
5760
  })]
@@ -6033,6 +5984,7 @@ const materialSymbolsBackupTable = (props) => /* @__PURE__ */ jsx("svg", {
6033
5984
  })
6034
5985
  });
6035
5986
  const ChartModalOptions = ({
5987
+ chartType: chartType2,
6036
5988
  setChartType
6037
5989
  }) => {
6038
5990
  const chartOptions2 = [{
@@ -6094,13 +6046,13 @@ const ChartModalOptions = ({
6094
6046
  icon: materialSymbolsBackupTable
6095
6047
  }];
6096
6048
  return /* @__PURE__ */ jsx("div", {
6097
- className: styles$y.chartOptions,
6049
+ className: styles$A.chartOptions,
6098
6050
  children: chartOptions2.map((option2) => /* @__PURE__ */ jsxs("div", {
6099
- className: styles$y.chartOption,
6051
+ className: styles$A.chartOption,
6100
6052
  children: [/* @__PURE__ */ jsx(Button, {
6101
6053
  type: "button",
6102
6054
  variant: "custom",
6103
- className: styles$y.chartOptionBtn,
6055
+ className: chartType2 === option2.name.toLowerCase() ? styles$A.chartOptionBtnSelected : styles$A.chartOptionBtn,
6104
6056
  onClick: () => {
6105
6057
  setChartType(option2.name.toLowerCase());
6106
6058
  },
@@ -6113,13 +6065,27 @@ const ChartModalOptions = ({
6113
6065
  })
6114
6066
  }, option2.name), /* @__PURE__ */ jsx(Text, {
6115
6067
  variant: "p",
6116
- styleClass: "tertiary",
6117
- className: styles$y.chartOptionText,
6068
+ styleClass: "custom",
6069
+ className: styles$A.chartOptionText,
6118
6070
  children: option2.name
6119
6071
  })]
6120
6072
  }, option2.name))
6121
6073
  });
6122
6074
  };
6075
+ const SelectField = ({
6076
+ value,
6077
+ options: options2,
6078
+ control
6079
+ }) => {
6080
+ const [yAxisValue, setYAxisValue] = useState("");
6081
+ return /* @__PURE__ */ jsx(HookSelect, {
6082
+ control,
6083
+ label: "",
6084
+ options: options2,
6085
+ onChange: setYAxisValue,
6086
+ name: yAxisValue ? yAxisValue : value
6087
+ });
6088
+ };
6123
6089
  const operatorList = [
6124
6090
  {
6125
6091
  value: "=",
@@ -7617,29 +7583,40 @@ const applyTheme = (theme2) => {
7617
7583
  const root = document.documentElement;
7618
7584
  if (theme2.colors)
7619
7585
  Object.entries(theme2.colors).forEach(([key, value]) => {
7620
- root.style.setProperty(`--databrainhq-plugin-color-${key}`, `${value}`);
7586
+ if (key && value)
7587
+ root.style.setProperty(`--databrainhq-plugin-color-${key}`, `${value}`);
7621
7588
  });
7622
7589
  if (theme2.border)
7623
7590
  Object.entries(theme2.border).forEach(([key, value]) => {
7624
- root.style.setProperty(`--databrainhq-plugin-border-${key}`, `${value}`);
7591
+ if (key && value)
7592
+ root.style.setProperty(
7593
+ `--databrainhq-plugin-border-${key}`,
7594
+ `${value}`
7595
+ );
7625
7596
  });
7626
7597
  if (theme2.shadow)
7627
7598
  Object.entries(theme2.shadow).forEach(([key, value]) => {
7628
- root.style.setProperty(`--databrainhq-plugin-shadow-${key}`, `${value}`);
7599
+ if (key && value)
7600
+ root.style.setProperty(
7601
+ `--databrainhq-plugin-shadow-${key}`,
7602
+ `${value}`
7603
+ );
7629
7604
  });
7630
7605
  if (theme2.typography)
7631
7606
  Object.entries(theme2.typography).forEach(([key, value]) => {
7632
- root.style.setProperty(
7633
- `--databrainhq-plugin-typography-${key}`,
7634
- `${value}`
7635
- );
7607
+ if (key && value)
7608
+ root.style.setProperty(
7609
+ `--databrainhq-plugin-typography-${key}`,
7610
+ `${value}`
7611
+ );
7636
7612
  });
7637
7613
  if (theme2.breakpoint)
7638
7614
  Object.entries(theme2.breakpoint).forEach(([key, value]) => {
7639
- root.style.setProperty(
7640
- `--databrainhq-plugin-breakpoint-${key}`,
7641
- `${value}`
7642
- );
7615
+ if (key && value)
7616
+ root.style.setProperty(
7617
+ `--databrainhq-plugin-breakpoint-${key}`,
7618
+ `${value}`
7619
+ );
7643
7620
  });
7644
7621
  };
7645
7622
  const colors = [
@@ -78859,22 +78836,17 @@ const AreaChart = ({
78859
78836
  legendSettings,
78860
78837
  labelSettings,
78861
78838
  axisSettings,
78862
- enableSaveAs,
78863
78839
  colors: colors2,
78864
78840
  updateGroup,
78865
78841
  isEnableGroupBy,
78866
78842
  backGroundColor,
78867
78843
  customSettings,
78868
- chartClickConfig
78844
+ chartClickConfig,
78845
+ chartRef
78869
78846
  }) => {
78870
78847
  var _a2;
78871
78848
  const option2 = {
78872
78849
  toolbox: {
78873
- feature: {
78874
- saveAsImage: enableSaveAs && {
78875
- name: "databrain"
78876
- }
78877
- },
78878
78850
  emphasis: {
78879
78851
  iconStyle: {
78880
78852
  borderColor: "#5865F6"
@@ -78965,6 +78937,7 @@ const AreaChart = ({
78965
78937
  };
78966
78938
  return /* @__PURE__ */ jsxs(Fragment, {
78967
78939
  children: [!isEnableGroupBy && /* @__PURE__ */ jsx(EChartsReact, {
78940
+ ref: chartRef,
78968
78941
  style: {
78969
78942
  width: "100%",
78970
78943
  height: "90%"
@@ -78977,6 +78950,7 @@ const AreaChart = ({
78977
78950
  }
78978
78951
  }
78979
78952
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
78953
+ ref: chartRef,
78980
78954
  style: {
78981
78955
  width: "100%",
78982
78956
  height: "90%"
@@ -79001,16 +78975,12 @@ const BarChart = ({
79001
78975
  axisSettings,
79002
78976
  margins,
79003
78977
  customSettings,
79004
- chartClickConfig
78978
+ chartClickConfig,
78979
+ chartRef
79005
78980
  }) => {
79006
78981
  var _a2, _b2;
79007
78982
  const option2 = {
79008
78983
  toolbox: {
79009
- feature: {
79010
- saveAsImage: {
79011
- name: "databrain"
79012
- }
79013
- },
79014
78984
  emphasis: {
79015
78985
  iconStyle: {
79016
78986
  borderColor: "#5865F6"
@@ -79103,6 +79073,7 @@ const BarChart = ({
79103
79073
  };
79104
79074
  return /* @__PURE__ */ jsxs(Fragment, {
79105
79075
  children: [!isEnableGroupBy && /* @__PURE__ */ jsx(EChartsReact, {
79076
+ ref: chartRef,
79106
79077
  style: {
79107
79078
  width: "100%",
79108
79079
  height: "90%"
@@ -79115,6 +79086,7 @@ const BarChart = ({
79115
79086
  }
79116
79087
  }
79117
79088
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
79089
+ ref: chartRef,
79118
79090
  style: {
79119
79091
  width: "100%",
79120
79092
  height: "90%"
@@ -79133,13 +79105,13 @@ const ComboChart = ({
79133
79105
  margins,
79134
79106
  legendSettings,
79135
79107
  labelSettings,
79136
- enableSaveAs,
79137
79108
  colors: colors2,
79138
79109
  updateGroup,
79139
79110
  isEnableGroupBy,
79140
79111
  backGroundColor,
79141
79112
  customSettings,
79142
- chartClickConfig
79113
+ chartClickConfig,
79114
+ chartRef
79143
79115
  }) => {
79144
79116
  var _a2;
79145
79117
  const choice = ["bar", "line"];
@@ -79156,11 +79128,6 @@ const ComboChart = ({
79156
79128
  color: colors2
79157
79129
  } : {},
79158
79130
  toolbox: {
79159
- feature: {
79160
- saveAsImage: enableSaveAs && {
79161
- name: "databrain"
79162
- }
79163
- },
79164
79131
  emphasis: {
79165
79132
  iconStyle: {
79166
79133
  borderColor: "#5865F6"
@@ -79269,6 +79236,7 @@ const ComboChart = ({
79269
79236
  height: "90%"
79270
79237
  },
79271
79238
  option: option2,
79239
+ ref: chartRef,
79272
79240
  onEvents: {
79273
79241
  click: (params) => {
79274
79242
  var _a3;
@@ -79281,6 +79249,7 @@ const ComboChart = ({
79281
79249
  height: "90%"
79282
79250
  },
79283
79251
  option: option2,
79252
+ ref: chartRef,
79284
79253
  onEvents: {
79285
79254
  click: (params) => {
79286
79255
  updateGroup(params.name);
@@ -79295,12 +79264,12 @@ const LineChart = ({
79295
79264
  legendSettings,
79296
79265
  labelSettings,
79297
79266
  axisSettings,
79298
- enableSaveAs,
79299
79267
  colors: colors2,
79300
79268
  updateGroup,
79301
79269
  isEnableGroupBy,
79302
79270
  customSettings,
79303
- chartClickConfig
79271
+ chartClickConfig,
79272
+ chartRef
79304
79273
  }) => {
79305
79274
  var _a2, _b2;
79306
79275
  const option2 = {
@@ -79330,11 +79299,6 @@ const LineChart = ({
79330
79299
  containLabel: true
79331
79300
  },
79332
79301
  toolbox: {
79333
- feature: {
79334
- saveAsImage: enableSaveAs && {
79335
- name: "databrain"
79336
- }
79337
- },
79338
79302
  emphasis: {
79339
79303
  iconStyle: {
79340
79304
  borderColor: "#5865F6"
@@ -79400,7 +79364,14 @@ const LineChart = ({
79400
79364
  width: "100%",
79401
79365
  height: "90%"
79402
79366
  },
79403
- option: option2
79367
+ option: option2,
79368
+ ref: chartRef,
79369
+ onEvents: {
79370
+ click: (params) => {
79371
+ var _a3;
79372
+ handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
79373
+ }
79374
+ }
79404
79375
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
79405
79376
  style: {
79406
79377
  width: "100%",
@@ -79409,9 +79380,10 @@ const LineChart = ({
79409
79380
  option: option2,
79410
79381
  onEvents: {
79411
79382
  click: (params) => {
79412
- handleChartClick(chartClickConfig, params.name);
79383
+ updateGroup(params.name);
79413
79384
  }
79414
- }
79385
+ },
79386
+ ref: chartRef
79415
79387
  })]
79416
79388
  });
79417
79389
  };
@@ -79420,7 +79392,7 @@ const PieChart = ({
79420
79392
  margins,
79421
79393
  legendSettings,
79422
79394
  labelSettings,
79423
- enableSaveAs,
79395
+ chartRef,
79424
79396
  colors: colors2,
79425
79397
  updateGroup,
79426
79398
  isEnableGroupBy,
@@ -79445,11 +79417,6 @@ const PieChart = ({
79445
79417
  });
79446
79418
  const option22 = {
79447
79419
  toolbox: {
79448
- feature: {
79449
- saveAsImage: enableSaveAs && {
79450
- name: "databrain"
79451
- }
79452
- },
79453
79420
  emphasis: {
79454
79421
  iconStyle: {
79455
79422
  borderColor: "#5865F6"
@@ -79518,7 +79485,8 @@ const PieChart = ({
79518
79485
  click: (params) => {
79519
79486
  updateGroup(params.name);
79520
79487
  }
79521
- }
79488
+ },
79489
+ ref: chartRef
79522
79490
  })
79523
79491
  }), !isEnableGroupBy && /* @__PURE__ */ jsx(Fragment, {
79524
79492
  children: /* @__PURE__ */ jsx(EChartsReact, {
@@ -79532,7 +79500,8 @@ const PieChart = ({
79532
79500
  var _a3;
79533
79501
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
79534
79502
  }
79535
- }
79503
+ },
79504
+ ref: chartRef
79536
79505
  })
79537
79506
  })]
79538
79507
  });
@@ -79545,11 +79514,6 @@ const PieChart = ({
79545
79514
  });
79546
79515
  const option2 = {
79547
79516
  toolbox: {
79548
- feature: {
79549
- saveAsImage: enableSaveAs && {
79550
- name: "databrain"
79551
- }
79552
- },
79553
79517
  emphasis: {
79554
79518
  iconStyle: {
79555
79519
  borderColor: "#5865F6"
@@ -79608,7 +79572,8 @@ const PieChart = ({
79608
79572
  click: (params) => {
79609
79573
  updateGroup(params.name);
79610
79574
  }
79611
- }
79575
+ },
79576
+ ref: chartRef
79612
79577
  })
79613
79578
  }), !isEnableGroupBy && /* @__PURE__ */ jsx(Fragment, {
79614
79579
  children: /* @__PURE__ */ jsx(EChartsReact, {
@@ -79622,7 +79587,8 @@ const PieChart = ({
79622
79587
  var _a3;
79623
79588
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
79624
79589
  }
79625
- }
79590
+ },
79591
+ ref: chartRef
79626
79592
  })
79627
79593
  })]
79628
79594
  })
@@ -79633,7 +79599,7 @@ const RowChart = ({
79633
79599
  margins,
79634
79600
  legendSettings,
79635
79601
  labelSettings,
79636
- enableSaveAs,
79602
+ chartRef,
79637
79603
  colors: colors2,
79638
79604
  updateGroup,
79639
79605
  isEnableGroupBy,
@@ -79644,11 +79610,6 @@ const RowChart = ({
79644
79610
  var _a2;
79645
79611
  const option2 = {
79646
79612
  toolbox: {
79647
- feature: {
79648
- saveAsImage: enableSaveAs && {
79649
- name: "databrain"
79650
- }
79651
- },
79652
79613
  emphasis: {
79653
79614
  iconStyle: {
79654
79615
  borderColor: "#5865F6"
@@ -79750,7 +79711,8 @@ const RowChart = ({
79750
79711
  var _a3;
79751
79712
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
79752
79713
  }
79753
- }
79714
+ },
79715
+ ref: chartRef
79754
79716
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
79755
79717
  style: {
79756
79718
  width: "100%",
@@ -79761,7 +79723,8 @@ const RowChart = ({
79761
79723
  click: (params) => {
79762
79724
  updateGroup(params.name);
79763
79725
  }
79764
- }
79726
+ },
79727
+ ref: chartRef
79765
79728
  })]
79766
79729
  });
79767
79730
  };
@@ -79771,7 +79734,7 @@ const ScatterChart = ({
79771
79734
  legendSettings,
79772
79735
  labelSettings,
79773
79736
  axisSettings,
79774
- enableSaveAs,
79737
+ chartRef,
79775
79738
  colors: colors2,
79776
79739
  updateGroup,
79777
79740
  isEnableGroupBy,
@@ -79782,11 +79745,6 @@ const ScatterChart = ({
79782
79745
  var _a2;
79783
79746
  const option2 = {
79784
79747
  toolbox: {
79785
- feature: {
79786
- saveAsImage: enableSaveAs && {
79787
- name: "databrain"
79788
- }
79789
- },
79790
79748
  emphasis: {
79791
79749
  iconStyle: {
79792
79750
  borderColor: "#5865F6"
@@ -79882,7 +79840,8 @@ const ScatterChart = ({
79882
79840
  var _a3;
79883
79841
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
79884
79842
  }
79885
- }
79843
+ },
79844
+ ref: chartRef
79886
79845
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
79887
79846
  style: {
79888
79847
  width: "100%",
@@ -79893,7 +79852,8 @@ const ScatterChart = ({
79893
79852
  click: (params) => {
79894
79853
  updateGroup(params.name);
79895
79854
  }
79896
- }
79855
+ },
79856
+ ref: chartRef
79897
79857
  })]
79898
79858
  });
79899
79859
  };
@@ -79902,7 +79862,7 @@ const WaterFallChart = ({
79902
79862
  margins,
79903
79863
  labelSettings,
79904
79864
  axisSettings,
79905
- enableSaveAs,
79865
+ chartRef,
79906
79866
  colors: colors2,
79907
79867
  updateGroup,
79908
79868
  isEnableGroupBy,
@@ -79913,11 +79873,6 @@ const WaterFallChart = ({
79913
79873
  var _a2, _b2;
79914
79874
  const option2 = {
79915
79875
  toolbox: {
79916
- feature: {
79917
- saveAsImage: enableSaveAs && {
79918
- name: "databrain"
79919
- }
79920
- },
79921
79876
  emphasis: {
79922
79877
  iconStyle: {
79923
79878
  borderColor: "#5865F6"
@@ -80016,7 +79971,8 @@ const WaterFallChart = ({
80016
79971
  var _a3;
80017
79972
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
80018
79973
  }
80019
- }
79974
+ },
79975
+ ref: chartRef
80020
79976
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
80021
79977
  style: {
80022
79978
  width: "100%",
@@ -80027,7 +79983,8 @@ const WaterFallChart = ({
80027
79983
  click: (params) => {
80028
79984
  updateGroup(params.name);
80029
79985
  }
80030
- }
79986
+ },
79987
+ ref: chartRef
80031
79988
  })]
80032
79989
  });
80033
79990
  };
@@ -80037,7 +79994,8 @@ const FunnelChart = ({
80037
79994
  legendSettings,
80038
79995
  labelSettings,
80039
79996
  colors: colors2,
80040
- chartClickConfig
79997
+ chartClickConfig,
79998
+ chartRef
80041
79999
  }) => {
80042
80000
  const option2 = {
80043
80001
  tooltip: {
@@ -80116,7 +80074,8 @@ const FunnelChart = ({
80116
80074
  var _a2;
80117
80075
  handleChartClick(chartClickConfig, ((_a2 = params == null ? void 0 : params.name) == null ? void 0 : _a2.split(" ").join("_")) || "undefined");
80118
80076
  }
80119
- }
80077
+ },
80078
+ ref: chartRef
80120
80079
  })
80121
80080
  });
80122
80081
  };
@@ -80126,12 +80085,12 @@ const BubbleChart = ({
80126
80085
  legendSettings,
80127
80086
  labelSettings,
80128
80087
  axisSettings,
80129
- enableSaveAs,
80130
80088
  colors: colors2,
80131
80089
  updateGroup,
80132
80090
  isEnableGroupBy,
80133
80091
  customSettings,
80134
- chartClickConfig
80092
+ chartClickConfig,
80093
+ chartRef
80135
80094
  }) => {
80136
80095
  var _a2;
80137
80096
  const modifiedData = [];
@@ -80157,11 +80116,6 @@ const BubbleChart = ({
80157
80116
  color: colors2
80158
80117
  } : {},
80159
80118
  toolbox: {
80160
- feature: {
80161
- saveAsImage: enableSaveAs && {
80162
- name: "databrain"
80163
- }
80164
- },
80165
80119
  emphasis: {
80166
80120
  iconStyle: {
80167
80121
  borderColor: "#5865F6"
@@ -80251,6 +80205,7 @@ const BubbleChart = ({
80251
80205
  };
80252
80206
  return /* @__PURE__ */ jsxs(Fragment, {
80253
80207
  children: [!isEnableGroupBy && /* @__PURE__ */ jsx(EChartsReact, {
80208
+ ref: chartRef,
80254
80209
  style: {
80255
80210
  width: "100%",
80256
80211
  height: "90%"
@@ -80263,6 +80218,7 @@ const BubbleChart = ({
80263
80218
  }
80264
80219
  }
80265
80220
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
80221
+ ref: chartRef,
80266
80222
  style: {
80267
80223
  width: "100%",
80268
80224
  height: "90%"
@@ -80281,11 +80237,11 @@ const DoughnutChart = ({
80281
80237
  margins,
80282
80238
  legendSettings,
80283
80239
  labelSettings,
80284
- enableSaveAs,
80285
80240
  colors: colors2,
80286
80241
  updateGroup,
80287
80242
  isEnableGroupBy,
80288
- chartClickConfig
80243
+ chartClickConfig,
80244
+ chartRef
80289
80245
  }) => {
80290
80246
  var _a2, _b2;
80291
80247
  if (((_a2 = data2 == null ? void 0 : data2.labels) == null ? void 0 : _a2.length) > 1) {
@@ -80307,11 +80263,6 @@ const DoughnutChart = ({
80307
80263
  });
80308
80264
  const option22 = {
80309
80265
  toolbox: {
80310
- feature: {
80311
- saveAsImage: enableSaveAs && {
80312
- name: "databrain"
80313
- }
80314
- },
80315
80266
  emphasis: {
80316
80267
  iconStyle: {
80317
80268
  borderColor: "#5865F6"
@@ -80369,7 +80320,14 @@ const DoughnutChart = ({
80369
80320
  width: "100%",
80370
80321
  height: "90%"
80371
80322
  },
80372
- option: option22
80323
+ option: option22,
80324
+ ref: chartRef,
80325
+ onEvents: {
80326
+ click: (params) => {
80327
+ var _a3;
80328
+ handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
80329
+ }
80330
+ }
80373
80331
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
80374
80332
  style: {
80375
80333
  width: "100%",
@@ -80380,7 +80338,8 @@ const DoughnutChart = ({
80380
80338
  click: (params) => {
80381
80339
  updateGroup(params.name);
80382
80340
  }
80383
- }
80341
+ },
80342
+ ref: chartRef
80384
80343
  })]
80385
80344
  });
80386
80345
  }
@@ -80392,11 +80351,6 @@ const DoughnutChart = ({
80392
80351
  });
80393
80352
  const option2 = {
80394
80353
  toolbox: {
80395
- feature: {
80396
- saveAsImage: enableSaveAs && {
80397
- name: "databrain"
80398
- }
80399
- },
80400
80354
  emphasis: {
80401
80355
  iconStyle: {
80402
80356
  borderColor: "#5865F6"
@@ -80452,7 +80406,8 @@ const DoughnutChart = ({
80452
80406
  var _a3;
80453
80407
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
80454
80408
  }
80455
- }
80409
+ },
80410
+ ref: chartRef
80456
80411
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
80457
80412
  style: {
80458
80413
  width: "100%",
@@ -80463,7 +80418,8 @@ const DoughnutChart = ({
80463
80418
  click: (params) => {
80464
80419
  updateGroup(params.name);
80465
80420
  }
80466
- }
80421
+ },
80422
+ ref: chartRef
80467
80423
  })]
80468
80424
  });
80469
80425
  };
@@ -80473,7 +80429,7 @@ const SteppedAreaChart = ({
80473
80429
  legendSettings,
80474
80430
  labelSettings,
80475
80431
  axisSettings,
80476
- enableSaveAs,
80432
+ chartRef,
80477
80433
  colors: colors2,
80478
80434
  updateGroup,
80479
80435
  isEnableGroupBy,
@@ -80486,11 +80442,6 @@ const SteppedAreaChart = ({
80486
80442
  let k = 2;
80487
80443
  const option2 = {
80488
80444
  toolbox: {
80489
- feature: {
80490
- saveAsImage: enableSaveAs && {
80491
- name: "databrain"
80492
- }
80493
- },
80494
80445
  emphasis: {
80495
80446
  iconStyle: {
80496
80447
  borderColor: "#5865F6"
@@ -80588,7 +80539,8 @@ const SteppedAreaChart = ({
80588
80539
  var _a3;
80589
80540
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
80590
80541
  }
80591
- }
80542
+ },
80543
+ ref: chartRef
80592
80544
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
80593
80545
  style: {
80594
80546
  width: "100%",
@@ -80599,7 +80551,8 @@ const SteppedAreaChart = ({
80599
80551
  click: (params) => {
80600
80552
  updateGroup(params.name);
80601
80553
  }
80602
- }
80554
+ },
80555
+ ref: chartRef
80603
80556
  })]
80604
80557
  });
80605
80558
  };
@@ -80609,7 +80562,7 @@ const Histogram = ({
80609
80562
  legendSettings,
80610
80563
  labelSettings,
80611
80564
  axisSettings,
80612
- enableSaveAs,
80565
+ chartRef,
80613
80566
  colors: colors2,
80614
80567
  updateGroup,
80615
80568
  isEnableGroupBy,
@@ -80620,11 +80573,6 @@ const Histogram = ({
80620
80573
  var _a2, _b2;
80621
80574
  const option2 = {
80622
80575
  toolbox: {
80623
- feature: {
80624
- saveAsImage: enableSaveAs && {
80625
- name: "databrain"
80626
- }
80627
- },
80628
80576
  emphasis: {
80629
80577
  iconStyle: {
80630
80578
  borderColor: "#5865F6"
@@ -80718,7 +80666,8 @@ const Histogram = ({
80718
80666
  var _a3;
80719
80667
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
80720
80668
  }
80721
- }
80669
+ },
80670
+ ref: chartRef
80722
80671
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
80723
80672
  style: {
80724
80673
  width: "100%",
@@ -80729,7 +80678,8 @@ const Histogram = ({
80729
80678
  click: (params) => {
80730
80679
  updateGroup(params.name);
80731
80680
  }
80732
- }
80681
+ },
80682
+ ref: chartRef
80733
80683
  })]
80734
80684
  });
80735
80685
  };
@@ -80737,9 +80687,9 @@ const GaugeChart = ({
80737
80687
  gaugeData,
80738
80688
  margins,
80739
80689
  legendSettings,
80740
- enableSaveAs,
80741
80690
  colors: colors2,
80742
- chartClickConfig
80691
+ chartClickConfig,
80692
+ chartRef
80743
80693
  }) => {
80744
80694
  const newGuageData = Array.isArray(gaugeData) ? gaugeData : [];
80745
80695
  const total = newGuageData.reduce((sum2, item) => {
@@ -80748,11 +80698,6 @@ const GaugeChart = ({
80748
80698
  const average = Math.floor(total / newGuageData.length);
80749
80699
  const option2 = {
80750
80700
  toolbox: {
80751
- feature: {
80752
- saveAsImage: enableSaveAs && {
80753
- name: "databrain"
80754
- }
80755
- },
80756
80701
  emphasis: {
80757
80702
  iconStyle: {
80758
80703
  borderColor: "#5865F6"
@@ -80840,13 +80785,14 @@ const GaugeChart = ({
80840
80785
  var _a2;
80841
80786
  handleChartClick(chartClickConfig, ((_a2 = params == null ? void 0 : params.name) == null ? void 0 : _a2.split(" ").join("_")) || "undefined");
80842
80787
  }
80843
- }
80788
+ },
80789
+ ref: chartRef
80844
80790
  });
80845
80791
  };
80846
80792
  const SankeyChart = ({
80847
80793
  data: data2,
80848
80794
  margins,
80849
- enableSaveAs,
80795
+ chartRef,
80850
80796
  colors: colors2,
80851
80797
  backGroundColor,
80852
80798
  chartClickConfig
@@ -80873,11 +80819,6 @@ const SankeyChart = ({
80873
80819
  }
80874
80820
  const option2 = {
80875
80821
  toolbox: {
80876
- feature: {
80877
- saveAsImage: enableSaveAs && {
80878
- name: "databrain"
80879
- }
80880
- },
80881
80822
  emphasis: {
80882
80823
  iconStyle: {
80883
80824
  borderColor: "#5865F6"
@@ -80932,7 +80873,8 @@ const SankeyChart = ({
80932
80873
  var _a3;
80933
80874
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
80934
80875
  }
80935
- }
80876
+ },
80877
+ ref: chartRef
80936
80878
  })
80937
80879
  });
80938
80880
  };
@@ -80942,7 +80884,7 @@ const StackedBarChart = ({
80942
80884
  legendSettings,
80943
80885
  labelSettings,
80944
80886
  axisSettings,
80945
- enableSaveAs,
80887
+ chartRef,
80946
80888
  colors: colors2,
80947
80889
  updateGroup,
80948
80890
  isEnableGroupBy,
@@ -80953,11 +80895,6 @@ const StackedBarChart = ({
80953
80895
  var _a2, _b2;
80954
80896
  const option2 = {
80955
80897
  toolbox: {
80956
- feature: {
80957
- saveAsImage: enableSaveAs && {
80958
- name: "databrain"
80959
- }
80960
- },
80961
80898
  emphasis: {
80962
80899
  iconStyle: {
80963
80900
  borderColor: "#5865F6"
@@ -81060,7 +80997,8 @@ const StackedBarChart = ({
81060
80997
  var _a3;
81061
80998
  handleChartClick(chartClickConfig, ((_a3 = params == null ? void 0 : params.name) == null ? void 0 : _a3.split(" ").join("_")) || "undefined");
81062
80999
  }
81063
- }
81000
+ },
81001
+ ref: chartRef
81064
81002
  }), isEnableGroupBy && updateGroup && /* @__PURE__ */ jsx(EChartsReact, {
81065
81003
  style: {
81066
81004
  width: "100%",
@@ -81071,7 +81009,8 @@ const StackedBarChart = ({
81071
81009
  click: (params) => {
81072
81010
  updateGroup(params.name);
81073
81011
  }
81074
- }
81012
+ },
81013
+ ref: chartRef
81075
81014
  })]
81076
81015
  });
81077
81016
  };
@@ -81357,10 +81296,10 @@ const BoxPlot = ({
81357
81296
  margins,
81358
81297
  legendSettings,
81359
81298
  axisSettings,
81360
- enableSaveAs,
81361
81299
  colors: colors2,
81362
81300
  customSettings,
81363
- chartClickConfig
81301
+ chartClickConfig,
81302
+ chartRef
81364
81303
  }) => {
81365
81304
  var _a2;
81366
81305
  const modifiedData = [];
@@ -81371,11 +81310,6 @@ const BoxPlot = ({
81371
81310
  });
81372
81311
  const option2 = {
81373
81312
  toolbox: {
81374
- feature: {
81375
- saveAsImage: enableSaveAs && {
81376
- name: "databrain"
81377
- }
81378
- },
81379
81313
  emphasis: {
81380
81314
  iconStyle: {
81381
81315
  borderColor: "#5865F6"
@@ -81475,6 +81409,7 @@ const BoxPlot = ({
81475
81409
  };
81476
81410
  return /* @__PURE__ */ jsx(Fragment, {
81477
81411
  children: /* @__PURE__ */ jsx(EChartsReact, {
81412
+ ref: chartRef,
81478
81413
  style: {
81479
81414
  width: "100%",
81480
81415
  height: "90%"
@@ -81621,9 +81556,10 @@ const MetricChart = ({
81621
81556
  isEnableGroupBy,
81622
81557
  backGroundColor,
81623
81558
  chartClickConfig,
81624
- tableSettings
81559
+ tableSettings,
81560
+ chartRef
81625
81561
  }) => {
81626
- var _a2, _b2, _c2, _d;
81562
+ var _a2, _b2, _c2, _d, _e, _f;
81627
81563
  if (chartType2 === CHART_TYPES.line) {
81628
81564
  return /* @__PURE__ */ jsx(LineChart, {
81629
81565
  data: data2,
@@ -81632,10 +81568,10 @@ const MetricChart = ({
81632
81568
  labelSettings,
81633
81569
  axisSettings,
81634
81570
  customSettings,
81635
- enableSaveAs,
81636
81571
  updateGroup,
81637
81572
  isEnableGroupBy,
81638
- chartClickConfig
81573
+ chartClickConfig,
81574
+ chartRef
81639
81575
  });
81640
81576
  }
81641
81577
  if (chartType2 === CHART_TYPES.stepped) {
@@ -81652,7 +81588,8 @@ const MetricChart = ({
81652
81588
  updateGroup,
81653
81589
  isEnableGroupBy,
81654
81590
  backGroundColor,
81655
- chartClickConfig
81591
+ chartClickConfig,
81592
+ chartRef
81656
81593
  });
81657
81594
  }
81658
81595
  if (chartType2 === CHART_TYPES.bar) {
@@ -81667,7 +81604,8 @@ const MetricChart = ({
81667
81604
  axisSettings,
81668
81605
  customSettings,
81669
81606
  margins,
81670
- chartClickConfig
81607
+ chartClickConfig,
81608
+ chartRef
81671
81609
  });
81672
81610
  }
81673
81611
  if (chartType2 === CHART_TYPES.stack) {
@@ -81683,7 +81621,8 @@ const MetricChart = ({
81683
81621
  isEnableGroupBy,
81684
81622
  backGroundColor,
81685
81623
  customSettings,
81686
- chartClickConfig
81624
+ chartClickConfig,
81625
+ chartRef
81687
81626
  });
81688
81627
  }
81689
81628
  if (chartType2 === CHART_TYPES.histogram) {
@@ -81699,7 +81638,8 @@ const MetricChart = ({
81699
81638
  isEnableGroupBy,
81700
81639
  backGroundColor,
81701
81640
  customSettings,
81702
- chartClickConfig
81641
+ chartClickConfig,
81642
+ chartRef
81703
81643
  });
81704
81644
  }
81705
81645
  if (chartType2 === CHART_TYPES.bubble) {
@@ -81715,7 +81655,8 @@ const MetricChart = ({
81715
81655
  isEnableGroupBy,
81716
81656
  backGroundColor,
81717
81657
  customSettings,
81718
- chartClickConfig
81658
+ chartClickConfig,
81659
+ chartRef
81719
81660
  });
81720
81661
  }
81721
81662
  if (chartType2 === CHART_TYPES.scatter) {
@@ -81731,7 +81672,8 @@ const MetricChart = ({
81731
81672
  isEnableGroupBy,
81732
81673
  backGroundColor,
81733
81674
  customSettings,
81734
- chartClickConfig
81675
+ chartClickConfig,
81676
+ chartRef
81735
81677
  });
81736
81678
  }
81737
81679
  if (chartType2 === CHART_TYPES.row) {
@@ -81746,7 +81688,8 @@ const MetricChart = ({
81746
81688
  isEnableGroupBy,
81747
81689
  backGroundColor,
81748
81690
  customSettings,
81749
- chartClickConfig
81691
+ chartClickConfig,
81692
+ chartRef
81750
81693
  });
81751
81694
  }
81752
81695
  if (chartType2 === CHART_TYPES.area) {
@@ -81765,7 +81708,8 @@ const MetricChart = ({
81765
81708
  isEnableGroupBy,
81766
81709
  backGroundColor,
81767
81710
  customSettings,
81768
- chartClickConfig
81711
+ chartClickConfig,
81712
+ chartRef
81769
81713
  });
81770
81714
  }
81771
81715
  if (chartType2 === CHART_TYPES.combo) {
@@ -81786,7 +81730,8 @@ const MetricChart = ({
81786
81730
  isEnableGroupBy,
81787
81731
  backGroundColor,
81788
81732
  customSettings,
81789
- chartClickConfig
81733
+ chartClickConfig,
81734
+ chartRef
81790
81735
  });
81791
81736
  }
81792
81737
  if (chartType2 === CHART_TYPES.pie) {
@@ -81799,7 +81744,8 @@ const MetricChart = ({
81799
81744
  colors: colors2,
81800
81745
  updateGroup,
81801
81746
  isEnableGroupBy,
81802
- chartClickConfig
81747
+ chartClickConfig,
81748
+ chartRef
81803
81749
  });
81804
81750
  }
81805
81751
  if (chartType2 === CHART_TYPES.doughnut) {
@@ -81812,7 +81758,8 @@ const MetricChart = ({
81812
81758
  colors: colors2,
81813
81759
  updateGroup,
81814
81760
  isEnableGroupBy,
81815
- chartClickConfig
81761
+ chartClickConfig,
81762
+ chartRef
81816
81763
  });
81817
81764
  }
81818
81765
  if (chartType2 === CHART_TYPES.waterfall) {
@@ -81842,7 +81789,8 @@ const MetricChart = ({
81842
81789
  isEnableGroupBy,
81843
81790
  backGroundColor,
81844
81791
  customSettings,
81845
- chartClickConfig
81792
+ chartClickConfig,
81793
+ chartRef
81846
81794
  });
81847
81795
  }
81848
81796
  if (chartType2 === CHART_TYPES.funnel) {
@@ -81852,18 +81800,34 @@ const MetricChart = ({
81852
81800
  legendSettings,
81853
81801
  labelSettings,
81854
81802
  colors: colors2,
81855
- chartClickConfig
81803
+ chartClickConfig,
81804
+ chartRef
81856
81805
  });
81857
81806
  }
81858
81807
  if (chartType2 === CHART_TYPES.gauge) {
81808
+ let modifiedData;
81809
+ if ((_e = data2.datasets) == null ? void 0 : _e.length) {
81810
+ const values = (_f = data2.datasets[0]) == null ? void 0 : _f.data;
81811
+ const convertedData = [values == null ? void 0 : values[0]];
81812
+ if (values == null ? void 0 : values.length)
81813
+ for (let i = 1; i < values.length - 1; i++) {
81814
+ convertedData.push(convertedData[i - 1] - values[i]);
81815
+ }
81816
+ convertedData.push(values == null ? void 0 : values[values.length - 1]);
81817
+ modifiedData = {
81818
+ labels: data2.labels,
81819
+ datasets: [values, convertedData]
81820
+ };
81821
+ }
81859
81822
  return /* @__PURE__ */ jsx(GaugeChart, {
81860
- gaugeData: funnelData,
81823
+ gaugeData: modifiedData,
81861
81824
  margins,
81862
81825
  legendSettings,
81863
81826
  labelSettings,
81864
81827
  enableSaveAs,
81865
81828
  colors: colors2,
81866
- chartClickConfig
81829
+ chartClickConfig,
81830
+ chartRef
81867
81831
  });
81868
81832
  }
81869
81833
  if (chartType2 === CHART_TYPES.sankey) {
@@ -81875,7 +81839,8 @@ const MetricChart = ({
81875
81839
  enableSaveAs,
81876
81840
  colors: colors2,
81877
81841
  backGroundColor,
81878
- chartClickConfig
81842
+ chartClickConfig,
81843
+ chartRef
81879
81844
  });
81880
81845
  }
81881
81846
  if (chartType2 === CHART_TYPES.singleValue) {
@@ -81897,7 +81862,8 @@ const MetricChart = ({
81897
81862
  enableSaveAs,
81898
81863
  colors: colors2,
81899
81864
  customSettings,
81900
- chartClickConfig
81865
+ chartClickConfig,
81866
+ chartRef
81901
81867
  });
81902
81868
  }
81903
81869
  if (chartType2 === CHART_TYPES.table) {
@@ -81945,7 +81911,8 @@ const FullScreenChart = ({
81945
81911
  dynamic: "{{value}}",
81946
81912
  route: "/{{value}}",
81947
81913
  routeType: "internal"
81948
- }
81914
+ },
81915
+ chartRef: chart.chartRef
81949
81916
  })
81950
81917
  })
81951
81918
  });
@@ -82531,29 +82498,27 @@ const Dataset = ({
82531
82498
  })]
82532
82499
  });
82533
82500
  };
82534
- const container$6 = "_container_1mqhp_1";
82535
- const header$2 = "_header_1mqhp_7";
82536
- const headerText = "_headerText_1mqhp_13";
82537
- const tab$2 = "_tab_1mqhp_19";
82538
- const tabText$1 = "_tabText_1mqhp_25";
82539
- const tabHeading = "_tabHeading_1mqhp_31";
82540
- const form = "_form_1mqhp_37";
82541
- const inputWrapper = "_inputWrapper_1mqhp_43";
82542
- const input$1 = "_input_1mqhp_43";
82543
- const selectWrapper = "_selectWrapper_1mqhp_55";
82544
- const select = "_select_1mqhp_55";
82545
- const label$1 = "_label_1mqhp_67";
82546
- const series = "_series_1mqhp_73";
82547
- const legendWrapper = "_legendWrapper_1mqhp_79";
82548
- const seriesWrapper = "_seriesWrapper_1mqhp_85";
82549
- const valueLabelWrapper = "_valueLabelWrapper_1mqhp_91";
82550
- const singleCheckBox = "_singleCheckBox_1mqhp_97";
82551
- const seriesCheck = "_seriesCheck_1mqhp_103";
82552
- const seriesCheckContainer = "_seriesCheckContainer_1mqhp_109";
82501
+ const container$6 = "_container_j5bye_1";
82502
+ const header$2 = "_header_j5bye_7";
82503
+ const tab$2 = "_tab_j5bye_13";
82504
+ const tabText$1 = "_tabText_j5bye_19";
82505
+ const tabHeading = "_tabHeading_j5bye_25";
82506
+ const form = "_form_j5bye_31";
82507
+ const inputWrapper = "_inputWrapper_j5bye_37";
82508
+ const input$1 = "_input_j5bye_37";
82509
+ const selectWrapper = "_selectWrapper_j5bye_49";
82510
+ const select = "_select_j5bye_49";
82511
+ const label$1 = "_label_j5bye_61";
82512
+ const series = "_series_j5bye_67";
82513
+ const legendWrapper = "_legendWrapper_j5bye_73";
82514
+ const seriesWrapper = "_seriesWrapper_j5bye_79";
82515
+ const valueLabelWrapper = "_valueLabelWrapper_j5bye_85";
82516
+ const singleCheckBox = "_singleCheckBox_j5bye_91";
82517
+ const seriesCheck = "_seriesCheck_j5bye_97";
82518
+ const seriesCheckContainer = "_seriesCheckContainer_j5bye_103";
82553
82519
  var styles$e = {
82554
82520
  container: container$6,
82555
82521
  header: header$2,
82556
- headerText,
82557
82522
  tab: tab$2,
82558
82523
  tabText: tabText$1,
82559
82524
  tabHeading,
@@ -82630,7 +82595,7 @@ const ChartConfigure = ({
82630
82595
  className: styles$e.container,
82631
82596
  children: [chartType2 === "table" && /* @__PURE__ */ jsxs(Fragment, {
82632
82597
  children: [/* @__PURE__ */ jsx("div", {
82633
- className: "h-[10%]",
82598
+ className: styles$e.header,
82634
82599
  children: /* @__PURE__ */ jsx(Tab, {
82635
82600
  options: tableTabs,
82636
82601
  activeTab: activeTab2,
@@ -82834,7 +82799,7 @@ const ChartConfigure = ({
82834
82799
  ...m2,
82835
82800
  marginTop: parseInt(e2.target.value, 10)
82836
82801
  })),
82837
- defaultValue: margins.marginTop
82802
+ value: margins.marginTop
82838
82803
  })
82839
82804
  }), /* @__PURE__ */ jsx("div", {
82840
82805
  className: styles$e.input,
@@ -82845,14 +82810,14 @@ const ChartConfigure = ({
82845
82810
  ...m2,
82846
82811
  marginBottom: parseInt(e2.target.value, 10)
82847
82812
  })),
82848
- defaultValue: margins.marginBottom
82813
+ value: margins.marginBottom
82849
82814
  })
82850
82815
  }), /* @__PURE__ */ jsx("div", {
82851
82816
  className: styles$e.input,
82852
82817
  children: /* @__PURE__ */ jsx(InputField, {
82853
82818
  type: "number",
82854
82819
  label: "Left",
82855
- defaultValue: margins.marginLeft,
82820
+ value: margins.marginLeft,
82856
82821
  onChange: (e2) => setMargins((m2) => ({
82857
82822
  ...m2,
82858
82823
  marginLeft: parseInt(e2.target.value, 10)
@@ -82863,7 +82828,7 @@ const ChartConfigure = ({
82863
82828
  children: /* @__PURE__ */ jsx(InputField, {
82864
82829
  type: "number",
82865
82830
  label: "Right",
82866
- defaultValue: margins.marginRight,
82831
+ value: margins.marginRight,
82867
82832
  onChange: (e2) => setMargins((m2) => ({
82868
82833
  ...m2,
82869
82834
  marginRight: parseInt(e2.target.value, 10)
@@ -82892,7 +82857,7 @@ const ChartConfigure = ({
82892
82857
  children: /* @__PURE__ */ jsx(InputField, {
82893
82858
  type: "number",
82894
82859
  label: "Top",
82895
- defaultValue: legendSettings.top,
82860
+ value: legendSettings.top,
82896
82861
  onChange: (e2) => setLegendSettings((settings2) => ({
82897
82862
  ...settings2,
82898
82863
  top: parseInt(e2.target.value, 10)
@@ -82903,7 +82868,7 @@ const ChartConfigure = ({
82903
82868
  children: /* @__PURE__ */ jsx(InputField, {
82904
82869
  type: "number",
82905
82870
  label: "Bottom",
82906
- defaultValue: legendSettings.bottom,
82871
+ value: legendSettings.bottom,
82907
82872
  onChange: (e2) => setLegendSettings((settings2) => ({
82908
82873
  ...settings2,
82909
82874
  bottom: parseInt(e2.target.value, 10)
@@ -82914,7 +82879,7 @@ const ChartConfigure = ({
82914
82879
  children: /* @__PURE__ */ jsx(InputField, {
82915
82880
  type: "number",
82916
82881
  label: "Left",
82917
- defaultValue: legendSettings.left,
82882
+ value: legendSettings.left,
82918
82883
  onChange: (e2) => setLegendSettings((settings2) => ({
82919
82884
  ...settings2,
82920
82885
  left: parseInt(e2.target.value, 10)
@@ -82925,7 +82890,7 @@ const ChartConfigure = ({
82925
82890
  children: /* @__PURE__ */ jsx(InputField, {
82926
82891
  type: "number",
82927
82892
  label: "Right",
82928
- defaultValue: legendSettings.right,
82893
+ value: legendSettings.right,
82929
82894
  onChange: (e2) => setLegendSettings((settings2) => ({
82930
82895
  ...settings2,
82931
82896
  right: parseInt(e2.target.value, 10)
@@ -83151,7 +83116,7 @@ const ChartConfigure = ({
83151
83116
  ...m2,
83152
83117
  barWidth: parseInt(e2.target.value, 10)
83153
83118
  })),
83154
- defaultValue: customSettings.barWidth
83119
+ value: customSettings.barWidth
83155
83120
  })]
83156
83121
  }), /* @__PURE__ */ jsxs("div", {
83157
83122
  className: styles$e.seriesWrapper,
@@ -83169,7 +83134,7 @@ const ChartConfigure = ({
83169
83134
  ...m2,
83170
83135
  barRadius: parseInt(e2.target.value, 10)
83171
83136
  })),
83172
- defaultValue: customSettings.barRadius
83137
+ value: customSettings.barRadius
83173
83138
  })]
83174
83139
  })]
83175
83140
  }) : null]
@@ -83189,7 +83154,7 @@ const ChartConfigure = ({
83189
83154
  ...m2,
83190
83155
  fontSize: parseInt(e2.target.value, 10)
83191
83156
  })),
83192
- defaultValue: customSettings.fontSize
83157
+ value: customSettings.fontSize
83193
83158
  })]
83194
83159
  }), /* @__PURE__ */ jsxs("div", {
83195
83160
  className: styles$e.singleCheckBox,
@@ -83225,7 +83190,7 @@ const ChartConfigure = ({
83225
83190
  ...m2,
83226
83191
  displayText: e2.target.value
83227
83192
  })),
83228
- defaultValue: customSettings.displayText
83193
+ value: customSettings.displayText
83229
83194
  })]
83230
83195
  }), /* @__PURE__ */ jsxs("div", {
83231
83196
  className: styles$e.seriesWrapper,
@@ -83241,7 +83206,7 @@ const ChartConfigure = ({
83241
83206
  ...m2,
83242
83207
  subHeaderFontSize: parseInt(e2.target.value, 10)
83243
83208
  })),
83244
- defaultValue: customSettings.subHeaderFontSize
83209
+ value: customSettings.subHeaderFontSize
83245
83210
  })]
83246
83211
  })]
83247
83212
  }), /* @__PURE__ */ jsxs("div", {
@@ -83415,6 +83380,7 @@ const ChartSettings = ({
83415
83380
  data: data2,
83416
83381
  setXAxis,
83417
83382
  setYAxisList,
83383
+ yAxisList,
83418
83384
  xAxis,
83419
83385
  setMeasure,
83420
83386
  setStep,
@@ -83504,6 +83470,7 @@ const ChartSettings = ({
83504
83470
  }), activeTab2 === FIRST_TAB && /* @__PURE__ */ jsx("div", {
83505
83471
  className: styles$c.button,
83506
83472
  children: /* @__PURE__ */ jsx(ChartModalOptions, {
83473
+ chartType: chartType2,
83507
83474
  setChartType
83508
83475
  })
83509
83476
  }), activeTab2 === SECOND_TAB && /* @__PURE__ */ jsx(Fragment, {
@@ -83513,6 +83480,7 @@ const ChartSettings = ({
83513
83480
  data: data2,
83514
83481
  setXAxis,
83515
83482
  xAxis,
83483
+ yAxisList,
83516
83484
  setYAxisList,
83517
83485
  chartType: chartType2,
83518
83486
  setStep,
@@ -83632,6 +83600,7 @@ const ChartTab = ({
83632
83600
  data: data2,
83633
83601
  setXAxis,
83634
83602
  setYAxisList,
83603
+ yAxisList,
83635
83604
  xAxis,
83636
83605
  setMeasure,
83637
83606
  setStep,
@@ -83662,6 +83631,7 @@ const ChartTab = ({
83662
83631
  setTableSettings
83663
83632
  }) => {
83664
83633
  var _a2, _b2, _c2, _d;
83634
+ const chartRef = useRef(null);
83665
83635
  const {
83666
83636
  globalTheme
83667
83637
  } = useGlobalTheme();
@@ -83748,6 +83718,7 @@ const ChartTab = ({
83748
83718
  data: data2,
83749
83719
  setXAxis,
83750
83720
  setYAxisList,
83721
+ yAxisList,
83751
83722
  xAxis,
83752
83723
  setMeasure,
83753
83724
  setStep,
@@ -83801,7 +83772,8 @@ const ChartTab = ({
83801
83772
  routeType: "internal"
83802
83773
  },
83803
83774
  enableSaveAs: true,
83804
- tableSettings
83775
+ tableSettings,
83776
+ chartRef
83805
83777
  })
83806
83778
  }) : /* @__PURE__ */ jsxs("div", {
83807
83779
  className: styles$b.metricChartEmpty,
@@ -83855,7 +83827,8 @@ const ChartTab = ({
83855
83827
  dynamic: "{{value}}",
83856
83828
  route: "/{{value}}",
83857
83829
  routeType: "internal"
83858
- }
83830
+ },
83831
+ chartRef
83859
83832
  }
83860
83833
  })]
83861
83834
  });
@@ -84195,6 +84168,7 @@ const MetricOutput = ({
84195
84168
  setChartType,
84196
84169
  setXAxis,
84197
84170
  setYAxisList,
84171
+ yAxisList,
84198
84172
  xAxis,
84199
84173
  setMeasure,
84200
84174
  setStep,
@@ -84269,6 +84243,7 @@ const MetricOutput = ({
84269
84243
  setChartType,
84270
84244
  setXAxis,
84271
84245
  setYAxisList,
84246
+ yAxisList,
84272
84247
  xAxis,
84273
84248
  setMeasure,
84274
84249
  setStep,
@@ -85890,6 +85865,7 @@ const EmbeddedMetricCreation = ({
85890
85865
  setChartType,
85891
85866
  setXAxis,
85892
85867
  setYAxisList,
85868
+ yAxisList,
85893
85869
  xAxis,
85894
85870
  setMeasure,
85895
85871
  setStep,
@@ -91238,6 +91214,50 @@ var styles = {
91238
91214
  features
91239
91215
  };
91240
91216
  var NoData = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6I2RhZGVkZjt9LmNscy03e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIxMC41LDIwMC44M2MuNC0uNjYuNjgtMS40LjgyLTIuMiwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguNDMtNC41Ni0yLjA5LTkuNjgtNi44Ni0xMC42Ni0uMDEsMC0uMDMsMC0uMDQsMC0yLjQtLjQ5LTUuMDItLjIyLTcuNDUtLjIyaC00NC4yMmMtLjUyLDAtMi4zMy0uMzEtMi43NywwbC0yNC4yOCwxNy4yMmgtNjEuNjFjLTMuOTcsMC02Ljk5LDMuNTYtNi4zNCw3LjQ3bDkuNzUsNTkuNDJjLjUxLDMuMTEsMy4yLDUuMzksNi4zNCw1LjM5aDExNy44NiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIwNywxMTQuNDN2LTguNTRjMC0zLjU1LTIuODgtNi40My02LjQzLTYuNDNoLTE3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTAzLjQ3LDk5LjQ2aC0xNS4xMmMtMy41NSwwLTYuNDMsMi44OC02LjQzLDYuNDN2MjUuNDgiLz48Zz48bGluZSBjbGFzcz0iY2xzLTIiIHgxPSIxMTQuMTIiIHkxPSI5NC4wOCIgeDI9IjE0NC44NCIgeTI9Ijk0LjA4Ii8+PGc+PHJlY3QgY2xhc3M9ImNscy02IiB4PSIxMTIuNjEiIHk9IjEwMi40MyIgd2lkdGg9IjE4Ljk3IiBoZWlnaHQ9IjMuMiIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMTM3LjYxIiB5PSIxMDIuNDMiIHdpZHRoPSI4LjkiIGhlaWdodD0iMy4yIi8+PC9nPjwvZz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im0xNjQuOTgsODEuNDZsLS4wOCwxNi4yOHMuMTUsMy4yNC4zLDMuNjIuNiwxLjUxLDEuMTMsMS44OCwxLjAyLjc5LDEuNzcsMS4wNi45NC40OSwyLjExLjQ5LDE4LjE3LjA0LDE4LjE3LjA0bC0yMy40MS0yMy4zN1oiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xODguNTEsMTA0LjkxdjkuNTIiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xMDMuNTMsMTMxLjM3di00NC45NWMwLTIuODQsMi4zLTUuMTUsNS4xNS01LjE1LDE4Ljc3LDAsMzcuNTQsMCw1Ni4zMSwwIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTY1LjAxLDgxLjI3djE4LjM1YzAsMi44NCwyLjMxLDUuMTUsNS4xNSw1LjE1aDE4LjM1cy0yMy41LTIzLjYyLTIzLjUtMjMuNVoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMjQuOTYiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMzEuMjUiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xOTIuNTcsMTgzLjMzYzkuNjIsOS42MiwzMC4yOCwzMC4yOCwzMC4yOCwzMC4yOCwxLjE3LDEuMTcsMS4xNywzLjA3LDAsNC4yNHMtMy4wNywxLjE3LTQuMjQsMGMwLDAtMjAuNTgtMjAuNTgtMzAuMjItMzAuMjIiLz48Zz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNjguNjYsMTcwLjkzYy0uNzQsMC0xLjM0LjI0LTEuODEuNzItLjQ3LjQ4LS43MSwxLjA5LS43MSwxLjgzcy4yNCwxLjMyLjcxLDEuODFjLjQ3LjQ5LDEuMDcuNzQsMS44MS43NHMxLjM0LS4yNSwxLjgxLS43NGMuNDctLjQ5LjcxLTEuMS43MS0xLjgxcy0uMjQtMS4zNC0uNzEtMS44M2MtLjQ3LS40OC0xLjA4LS43Mi0xLjgxLS43MloiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNzQuNjksMTUzLjc3Yy0uNjItMS4wMi0xLjQ5LTEuODItMi42LTIuNC0xLjEyLS41Ny0yLjQtLjg2LTMuODUtLjg2LTEuNjgsMC0zLjE3LjQtNC40NywxLjE5cy0yLjI5LDEuOTQtMi45OCwzLjQzbDIuNzYsMi4yOGMuNDYtMS4wNiwxLjA3LTEuODYsMS44NS0yLjQuNzctLjU0LDEuNjUtLjgxLDIuNjQtLjgxLjc2LDAsMS40MS4xNCwxLjk3LjQxLjU1LjI4Ljk4LjY3LDEuMjgsMS4xNy4zLjUxLjQ1LDEuMS40NSwxLjc5cy0uMTYsMS4yOS0uNDcsMS44MWMtLjMxLjUyLS43NS45Mi0xLjMxLDEuMjEtLjU2LjI5LTEuMjIuNDMtMS45OC40M2gtLjkzdjYuNjZoMy4yOGwuMjYtMy43M2MuNzEtLjI0LDEuMzctLjU1LDEuOTUtLjkzLjk5LS42NCwxLjc1LTEuNDUsMi4yOS0yLjQxLjU0LS45Ny44MS0yLjA3LjgxLTMuMzEsMC0xLjMzLS4zMS0yLjUxLS45My0zLjU0WiIvPjwvZz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im04NS41NSwyMDMuOTdjLjY4LDIuODksMy4yNiw0Ljk2LDYuMjYsNC45NmgxMTcuNzMiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMTUuMzcsMjA2LjA0Yy40Ny0uNzEuOC0xLjUyLjk1LTIuNCwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==";
91217
+ const handleSaveChartImage = (chartRef) => {
91218
+ var _a2;
91219
+ const chartInstance = (_a2 = chartRef.current) == null ? void 0 : _a2.getEchartsInstance();
91220
+ if (chartInstance) {
91221
+ const dataUrl = chartInstance.getConnectedDataURL({
91222
+ type: "png",
91223
+ pixelRatio: 2,
91224
+ excludeComponents: ["toolbox"],
91225
+ backgroundColor: "#fff"
91226
+ });
91227
+ const link = document.createElement("a");
91228
+ link.href = dataUrl;
91229
+ link.download = "chart.png";
91230
+ document.body.appendChild(link);
91231
+ link.click();
91232
+ document.body.removeChild(link);
91233
+ }
91234
+ };
91235
+ const uilImageDownload = (props) => /* @__PURE__ */ jsx("svg", {
91236
+ viewBox: "0 0 24 24",
91237
+ width: "1.2em",
91238
+ height: "1.2em",
91239
+ ...props,
91240
+ children: /* @__PURE__ */ jsx("path", {
91241
+ fill: "currentColor",
91242
+ d: "M22.71 6.29a1 1 0 0 0-1.42 0L20 7.59V2a1 1 0 0 0-2 0v5.59l-1.29-1.3a1 1 0 0 0-1.42 1.42l3 3a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l3-3a1 1 0 0 0 0-1.42ZM19 13a1 1 0 0 0-1 1v.38l-1.48-1.48a2.79 2.79 0 0 0-3.93 0l-.7.7l-2.48-2.48a2.85 2.85 0 0 0-3.93 0L4 12.6V7a1 1 0 0 1 1-1h8a1 1 0 0 0 0-2H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3v-5a1 1 0 0 0-1-1ZM5 20a1 1 0 0 1-1-1v-3.57l2.9-2.9a.79.79 0 0 1 1.09 0l3.17 3.17l4.3 4.3Zm13-1a.89.89 0 0 1-.18.53L13.31 15l.7-.7a.77.77 0 0 1 1.1 0L18 17.21Z"
91243
+ })
91244
+ });
91245
+ const ChartImageDownloadButton = ({
91246
+ className,
91247
+ iconClass,
91248
+ text: text2,
91249
+ chartRef
91250
+ }) => {
91251
+ return /* @__PURE__ */ jsxs(Button, {
91252
+ variant: "custom",
91253
+ type: "button",
91254
+ onClick: () => handleSaveChartImage(chartRef),
91255
+ className,
91256
+ children: [/* @__PURE__ */ jsx(uilImageDownload, {
91257
+ className: iconClass
91258
+ }), text2]
91259
+ });
91260
+ };
91241
91261
  const MetricCard = ({
91242
91262
  globalFilters = {
91243
91263
  tableName: "",
@@ -91252,6 +91272,7 @@ const MetricCard = ({
91252
91272
  renderHeaderName
91253
91273
  }) => {
91254
91274
  var _a2, _b2, _c2;
91275
+ const chartRef = useRef(null);
91255
91276
  const {
91256
91277
  globalTheme
91257
91278
  } = useGlobalTheme();
@@ -91646,13 +91667,19 @@ const MetricCard = ({
91646
91667
  backGroundColor,
91647
91668
  tableSettings,
91648
91669
  enableSaveAs: true,
91649
- chartClickConfig: clickBehaviourConfigs.chart
91670
+ chartClickConfig: clickBehaviourConfigs.chart,
91671
+ chartRef
91650
91672
  });
91651
91673
  },
91652
91674
  children: [/* @__PURE__ */ jsx(Icons, {
91653
91675
  name: "fullscreen-icon",
91654
91676
  className: styles.popupItemIcon
91655
91677
  }), "Enter Fullscreen"]
91678
+ }), /* @__PURE__ */ jsx(ChartImageDownloadButton, {
91679
+ text: "Save As PNG",
91680
+ chartRef,
91681
+ className: `${styles.popupItem} ${styles.csvBtn}`,
91682
+ iconClass: styles.popupItemIcon
91656
91683
  }), /* @__PURE__ */ jsx(CsvDownloadButton, {
91657
91684
  data: dataDb,
91658
91685
  fileName: metricItem.name,
@@ -91708,7 +91735,8 @@ const MetricCard = ({
91708
91735
  isEnableGroupBy,
91709
91736
  customSettings,
91710
91737
  backGroundColor,
91711
- chartClickConfig: clickBehaviourConfigs.chart
91738
+ chartClickConfig: clickBehaviourConfigs.chart,
91739
+ chartRef
91712
91740
  }) : null]
91713
91741
  })]
91714
91742
  })