@sproutsocial/seeds-react-data-viz 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -810,6 +810,7 @@ var useTimeSeriesChartOptions = ({
810
810
  seriesType,
811
811
  textLocale,
812
812
  currency = "USD",
813
+ disableTooltips = false,
813
814
  numberFormat = "decimal",
814
815
  yAxisLabelFormatter: yAxisLabelFormatter2,
815
816
  onClick,
@@ -891,6 +892,9 @@ var useTimeSeriesChartOptions = ({
891
892
  }
892
893
  },
893
894
  series: transformDataToSeries({ data }, seriesType),
895
+ tooltip: {
896
+ enabled: !disableTooltips
897
+ },
894
898
  xAxis: {
895
899
  labels: {
896
900
  formatter: function() {
@@ -1112,6 +1116,7 @@ var AreaChartWithData = memo14(function AreaChartWithData2({
1112
1116
  tooltipTotalLabel,
1113
1117
  // optional
1114
1118
  currency = "USD",
1119
+ disableTooltips = false,
1115
1120
  numberFormat = "decimal",
1116
1121
  tooltip,
1117
1122
  yAxisLabelFormatter: yAxisLabelFormatter2,
@@ -1123,6 +1128,7 @@ var AreaChartWithData = memo14(function AreaChartWithData2({
1123
1128
  const { options, chart, callback } = useTimeSeriesChartOptions({
1124
1129
  currency,
1125
1130
  data,
1131
+ disableTooltips,
1126
1132
  numberFormat,
1127
1133
  numberLocale,
1128
1134
  seriesType: "areaspline",
@@ -1159,7 +1165,7 @@ var AreaChartWithData = memo14(function AreaChartWithData2({
1159
1165
  annotationContext: chart.annotations?.[0]
1160
1166
  }
1161
1167
  ) : null,
1162
- chart ? /* @__PURE__ */ jsx15(
1168
+ chart && !disableTooltips ? /* @__PURE__ */ jsx15(
1163
1169
  ChartTooltipPortal,
1164
1170
  {
1165
1171
  chart,
@@ -1315,6 +1321,7 @@ var DonutChartWithData = memo17(
1315
1321
  textLocale = "en-us",
1316
1322
  // optional
1317
1323
  currency = "USD",
1324
+ disableTooltips = false,
1318
1325
  hideLegend = false,
1319
1326
  numberFormat = "decimal",
1320
1327
  tooltip
@@ -1362,7 +1369,10 @@ var DonutChartWithData = memo17(
1362
1369
  };
1363
1370
  })
1364
1371
  }
1365
- ]
1372
+ ],
1373
+ tooltip: {
1374
+ enabled: !disableTooltips
1375
+ }
1366
1376
  });
1367
1377
  }, [data]);
1368
1378
  const colors = data.map(
@@ -1379,7 +1389,7 @@ var DonutChartWithData = memo17(
1379
1389
  callback
1380
1390
  }
1381
1391
  ),
1382
- chart ? /* @__PURE__ */ jsx18(
1392
+ chart && !disableTooltips ? /* @__PURE__ */ jsx18(
1383
1393
  ChartTooltipPortal,
1384
1394
  {
1385
1395
  chart,
@@ -1601,6 +1611,7 @@ var LineChartWithData = memo21(function LineChartWithData2({
1601
1611
  tooltipDateFormatter,
1602
1612
  // optional
1603
1613
  currency = "USD",
1614
+ disableTooltips = false,
1604
1615
  numberFormat = "decimal",
1605
1616
  tooltip,
1606
1617
  yAxisLabelFormatter: yAxisLabelFormatter2,
@@ -1612,6 +1623,7 @@ var LineChartWithData = memo21(function LineChartWithData2({
1612
1623
  const { options, chart, callback } = useTimeSeriesChartOptions({
1613
1624
  currency,
1614
1625
  data,
1626
+ disableTooltips,
1615
1627
  numberFormat,
1616
1628
  numberLocale,
1617
1629
  seriesType: "spline",
@@ -1659,7 +1671,7 @@ var LineChartWithData = memo21(function LineChartWithData2({
1659
1671
  annotationContext: chart.annotations?.[0]
1660
1672
  }
1661
1673
  ) : null,
1662
- chart ? /* @__PURE__ */ jsx22(
1674
+ chart && !disableTooltips ? /* @__PURE__ */ jsx22(
1663
1675
  ChartTooltipPortal,
1664
1676
  {
1665
1677
  chart,