@oliasoft-open-source/charts-library 3.3.3 → 3.3.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
@@ -34519,7 +34519,7 @@ const initialState = ({ options, persistenceId }) => {
34519
34519
  panEnabled: panEnabled ?? enablePan,
34520
34520
  pointsEnabled: pointsEnabled ?? showPoints,
34521
34521
  lineEnabled: lineEnabled ?? showLine,
34522
- legendEnabled: legendEnabled ?? true,
34522
+ legendEnabled: legendEnabled ?? display,
34523
34523
  axes: stateAxes,
34524
34524
  showAnnotationLineIndex: setAnnotations(annotationsData),
34525
34525
  showTable: false,
@@ -37003,8 +37003,7 @@ const getDefaultProps$2 = (props) => {
37003
37003
  annotationsData: props.chart.options.annotations.annotationsData || []
37004
37004
  },
37005
37005
  legend: {
37006
- display: !!props.chart.options.legend.customLegend.customLegendContainerID,
37007
- // ChartJS legend is replaced by draggable legend if customLegendContainerID is not set,
37006
+ display: props.chart.options.legend.display ?? true,
37008
37007
  position: props.chart.options.legend.position || "bottom-left",
37009
37008
  align: props.chart.options.legend.align || "center",
37010
37009
  customLegend: props.chart.options.legend.customLegend,
@@ -37695,7 +37694,8 @@ const useChartOptions = ({
37695
37694
  annotation: annotation2,
37696
37695
  zoom: { pan: panOptions, zoom: zoomOptions },
37697
37696
  tooltip,
37698
- legend: legend2,
37697
+ legend: { ...legend2, display: false },
37698
+ // hide default legend for line chart only
37699
37699
  [CUSTOM_LEGEND_PLUGIN_NAME]: options.legend.customLegend.customLegendPlugin && {
37700
37700
  containerID: options.legend.customLegend.customLegendContainerID
37701
37701
  },