@evergis/charts 3.0.23 → 3.0.25

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.
@@ -2,6 +2,7 @@ import styled, { css, createGlobalStyle } from 'styled-components';
2
2
  import React, { useState, useCallback, useMemo, useEffect, useRef, Fragment } from 'react';
3
3
  import { select, pointer, min, max, scaleLinear, lineRadial, curveLinearClosed, range as range$1, format, arc, pie, create, quantize, interpolate, interpolateRound, quantile, axisBottom, group, utcFormat, scaleSequential, interpolateGreens, utcYear, utcMonths, utcMonth, utcSunday, utcMonday, axisLeft, axisRight, line, curveLinear, area, scaleBand, sum, scaleLog } from 'd3';
4
4
  import ReactDOMServer from 'react-dom/server';
5
+ import { uniqueId } from 'lodash-es';
5
6
  import { unmountComponentAtNode, render } from 'react-dom';
6
7
 
7
8
  function _extends() {
@@ -2815,8 +2816,9 @@ const draw$4 = (node, props) => {
2815
2816
  drawGridX
2816
2817
  });
2817
2818
  xAxis.attr('transform', "translate(0, " + (yScale(yTicks[0]) + (xAxisPadding || 0)) + ")");
2818
- svg.append('defs').append('mask').attr('id', 'height-limit-mask').append('rect').attr('width', '100%').attr('height', height - marginBottom + MIN_BAR_HEIGHT).attr('fill', 'white');
2819
- const gSvg = svg.append('g').attr('class', barChartClassNames.barChartBarGlobal).attr('mask', 'url(#height-limit-mask)');
2819
+ const maskId = "height-limit-mask-" + uniqueId();
2820
+ svg.append('defs').append('mask').attr('id', maskId).append('rect').attr('width', '100%').attr('height', height - marginBottom + MIN_BAR_HEIGHT).attr('fill', 'white');
2821
+ const gSvg = svg.append('g').attr('class', barChartClassNames.barChartBarGlobal).attr('mask', "url(#" + maskId + ")");
2820
2822
  const groups = gSvg.selectAll('g').data(marshalledData).enter().append('g').attr('transform', (_, i) => "translate(" + Math.round(xScale(i)) + "," + -(marginTop || 0) + ")");
2821
2823
  const bars = drawBars ? drawBars({
2822
2824
  groups,