@databrainhq/plugin 0.8.12 → 0.8.13

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.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const FunnelChart: ({ funnelData, margins, legendSettings, labelSettings, colors, chartClickConfig, chartRef, handleChartRightClick, }: any) => JSX.Element;
2
+ declare const FunnelChart: ({ funnelData, margins, legendSettings, labelSettings, colors, chartClickConfig, chartRef, handleChartRightClick, customSettings, }: any) => JSX.Element;
3
3
  export default FunnelChart;
package/dist/index.es.js CHANGED
@@ -80504,12 +80504,13 @@ const FunnelChart = ({
80504
80504
  colors: colors2,
80505
80505
  chartClickConfig,
80506
80506
  chartRef,
80507
- handleChartRightClick
80507
+ handleChartRightClick,
80508
+ customSettings
80508
80509
  }) => {
80509
80510
  const option2 = {
80510
80511
  tooltip: {
80511
80512
  trigger: "item",
80512
- formatter: "{b} : {c}k",
80513
+ formatter: "{b} : {c}",
80513
80514
  backgroundColor: "black",
80514
80515
  textStyle: {
80515
80516
  color: "white"
@@ -80550,7 +80551,8 @@ const FunnelChart = ({
80550
80551
  gap: 3,
80551
80552
  label: {
80552
80553
  show: labelSettings.show,
80553
- position: labelSettings.position
80554
+ position: labelSettings.position,
80555
+ formatter: customSettings.showLabelValues ? "{b} : {c}" : "{b}"
80554
80556
  },
80555
80557
  labelLine: {
80556
80558
  length: 10,
@@ -86147,7 +86149,8 @@ const MetricChart = ({
86147
86149
  colors: colors2,
86148
86150
  chartClickConfig,
86149
86151
  chartRef,
86150
- handleChartRightClick
86152
+ handleChartRightClick,
86153
+ customSettings
86151
86154
  });
86152
86155
  }
86153
86156
  if (chartType2 === CHART_TYPES.gauge) {
@@ -87295,6 +87298,14 @@ const ChartConfigure = ({
87295
87298
  }))
87296
87299
  })
87297
87300
  })]
87301
+ }), chartType2 === "funnel" && /* @__PURE__ */ jsx(InputField, {
87302
+ type: "checkbox",
87303
+ label: "Show labels with values",
87304
+ checked: customSettings.showLabelValues,
87305
+ onChange: (e2) => setCustomSettings((settings2) => ({
87306
+ ...settings2,
87307
+ showLabelValues: e2.target.checked
87308
+ }))
87298
87309
  }), chartType2 !== "pie" && chartType2 !== "doughnut" && chartType2 !== "funnel" && chartType2 !== "gauge" && chartType2 !== "sankey" && chartType2 !== "singleValue" && chartType2 !== "table" && /* @__PURE__ */ jsxs(Fragment, {
87299
87310
  children: [/* @__PURE__ */ jsxs("div", {
87300
87311
  className: styles$g.seriesWrapper,
@@ -89781,7 +89792,8 @@ const EmbeddedMetricCreation = ({
89781
89792
  subHeaderFontSize: 0,
89782
89793
  dateFormatter: "none",
89783
89794
  numberFormatter: "original",
89784
- xRotation: 50
89795
+ xRotation: 50,
89796
+ showLabelValues: false
89785
89797
  });
89786
89798
  const [tableSettings, setTableSettings] = useState({
89787
89799
  contentAlignment: "center",
@@ -96066,7 +96078,8 @@ const MetricCard = ({
96066
96078
  subHeaderFontSize: 0,
96067
96079
  dateFormatter: "none",
96068
96080
  numberFormatter: "original",
96069
- xRotation: 50
96081
+ xRotation: 50,
96082
+ showLabelValues: false
96070
96083
  });
96071
96084
  const [backGroundColor, setBackGroundColor] = useState({
96072
96085
  show: false
@@ -96101,7 +96114,8 @@ const MetricCard = ({
96101
96114
  subHeaderFontSize: 0,
96102
96115
  dateFormatter: "none",
96103
96116
  numberFormatter: "original",
96104
- xRotation: 50
96117
+ xRotation: 50,
96118
+ showLabelValues: false
96105
96119
  });
96106
96120
  setEnableGroupBy(metricItem == null ? void 0 : metricItem.isEnableGroupBy);
96107
96121
  setSelectedGroupBy(metricItem == null ? void 0 : metricItem.selectedGroupBy);
@@ -96562,7 +96576,8 @@ const SingleValueCard = ({
96562
96576
  subHeaderFontSize: 0,
96563
96577
  dateFormatter: "none",
96564
96578
  numberFormatter: "original",
96565
- xRotation: 50
96579
+ xRotation: 50,
96580
+ showLabelValues: false
96566
96581
  });
96567
96582
  const {
96568
96583
  data: metricdata,
@@ -96597,7 +96612,8 @@ const SingleValueCard = ({
96597
96612
  subHeaderFontSize: 0,
96598
96613
  dateFormatter: "none",
96599
96614
  numberFormatter: "original",
96600
- xRotation: 50
96615
+ xRotation: 50,
96616
+ showLabelValues: false
96601
96617
  });
96602
96618
  setClickBehaviourConfigs(metricItem.clickActions || {
96603
96619
  card: {