@oliasoft-open-source/charts-library 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -24753,6 +24753,9 @@ const LegendItems = ({
24753
24753
  legendClick
24754
24754
  }) => /* @__PURE__ */ jsx("div", { className: styles$2.legendItems, children: items.map((item) => {
24755
24755
  var _a2;
24756
+ if (datasets[item.datasetIndex].hideLegend) {
24757
+ return null;
24758
+ }
24756
24759
  const hiddenState = ((_a2 = hiddenStates.find((state) => state.label === item.text)) == null ? void 0 : _a2.hidden) ?? false;
24757
24760
  return /* @__PURE__ */ jsx(
24758
24761
  LegendItem,
@@ -26238,7 +26241,7 @@ const LineChart = (props) => {
26238
26241
  plugins: usePlugins
26239
26242
  }
26240
26243
  ),
26241
- showCustomLegend && /* @__PURE__ */ jsx(
26244
+ showCustomLegend && !!generatedDatasets.length && /* @__PURE__ */ jsx(
26242
26245
  Legend2,
26243
26246
  {
26244
26247
  chartRef,