@evergis/charts 2.0.16 → 2.0.17

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.
@@ -1713,16 +1713,21 @@ const drawTooltip$1 = (_ref) => {
1713
1713
  const mouseRect = mouseGlobal.append('rect').attr('width', x2 - x1).attr('height', Math.abs(y1 - y2)).attr('class', lineChartClassNames.lineChartMouseRect).attr('transform', "translate(" + x1 + ", " + y2 + ")");
1714
1714
  const mouseLine = mouseGlobal.append('path').attr('class', lineChartClassNames.lineChartMouseLine).style('opacity', '0');
1715
1715
  const lines = svg.selectAll("." + lineChartClassNames.lineChartLine).nodes();
1716
- const circles = mouseGlobal.selectAll('circle').data(chartData).join('circle').attr('class', lineChartClassNames.lineChartMouseCircle).attr('r', dynamicCircleRadius).attr('fill', (_ref3) => {
1716
+ const circles = mouseGlobal.selectAll('circle').data(chartData.filter((_ref3) => {
1717
1717
  let {
1718
- stroke
1718
+ dynamicDotOff
1719
1719
  } = _ref3;
1720
- return stroke || 'none';
1721
- }).attr('stroke', (_ref4) => {
1720
+ return !dynamicDotOff;
1721
+ })).join('circle').attr('class', lineChartClassNames.lineChartMouseCircle).attr('r', dynamicCircleRadius).attr('fill', (_ref4) => {
1722
1722
  let {
1723
1723
  stroke
1724
1724
  } = _ref4;
1725
1725
  return stroke || 'none';
1726
+ }).attr('stroke', (_ref5) => {
1727
+ let {
1728
+ stroke
1729
+ } = _ref5;
1730
+ return stroke || 'none';
1726
1731
  }).style('opacity', '0');
1727
1732
  let labelContainer = select("." + lineChartClassNames.lineChartMouseLabelContainer);
1728
1733
 
@@ -1783,27 +1788,27 @@ const drawTooltip$1 = (_ref) => {
1783
1788
  circles.attr('transform', (lineChartData, index) => {
1784
1789
  const value = getValue(lineChartData.values);
1785
1790
  return positions[index] && value ? 'translate(' + x + ',' + positions[index].y + ')' : 'translate(-9999, -9999)';
1786
- }).attr('style', (_ref5) => {
1791
+ }).attr('style', (_ref6) => {
1787
1792
  let {
1788
1793
  dynamicDotStyle
1789
- } = _ref5;
1794
+ } = _ref6;
1790
1795
  return dynamicDotStyle || '';
1791
1796
  });
1792
- const datas = chartData.map((_ref6, i) => {
1797
+ const datas = chartData.map((_ref7, i) => {
1793
1798
  let {
1794
1799
  values
1795
- } = _ref6,
1796
- rest = _objectWithoutPropertiesLoose(_ref6, ["values"]);
1800
+ } = _ref7,
1801
+ rest = _objectWithoutPropertiesLoose(_ref7, ["values"]);
1797
1802
 
1798
1803
  return _extends({}, rest, {
1799
1804
  value: getValue(values),
1800
1805
  invertValue: positions[i] ? yScale.invert(positions[i].y) : 0
1801
1806
  });
1802
1807
  });
1803
- const noHasData = datas.every((_ref7) => {
1808
+ const noHasData = datas.every((_ref8) => {
1804
1809
  let {
1805
1810
  value
1806
- } = _ref7;
1811
+ } = _ref8;
1807
1812
  return isVoid(value);
1808
1813
  });
1809
1814
 
@@ -1818,7 +1823,8 @@ const drawTooltip$1 = (_ref) => {
1818
1823
 
1819
1824
  const prevValue = (_datas$Number = datas[Number(acc)]) == null ? void 0 : _datas$Number.value;
1820
1825
  const value = (_datas$Number2 = datas[Number(key)]) == null ? void 0 : _datas$Number2.value;
1821
- return index === 0 || isVoid(value) ? acc : isVoid(prevValue) || positions[acc].y > positions[key].y ? key : acc;
1826
+ const dynamicDotOff = argData == null ? void 0 : argData[index].dynamicDotOff;
1827
+ return index === 0 || isVoid(value) || dynamicDotOff ? acc : isVoid(prevValue) || positions[acc].y > positions[key].y ? key : acc;
1822
1828
  }, '0');
1823
1829
  const labelTexts = labels && labels.style('left', left + "px").style('top', (_, i) => {
1824
1830
  const index = typeof stackedTooltipIndex === 'number' ? stackedTooltipIndex : stackedTooltip ? topIndex : i;
@@ -2064,7 +2070,7 @@ const draw$3 = (node, props) => {
2064
2070
  filter
2065
2071
  } = dot;
2066
2072
  const dotsGroup = dotsGlobal.append('g').attr('class', lineChartClassNames.lineChartDotsGlobal);
2067
- dotsGroup.selectAll('circle').data(values).join('circle').attr('cx', (_, index) => xScale(index)).attr('class', lineChartClassNames.lineChartDot).attr('cy', d => yScale(d)).attr('r', radius).attr('style', style || '');
2073
+ dotsGroup.selectAll('circle').data(values).join('circle').attr('cx', (_, index) => xScale(index)).attr('class', lineChartClassNames.lineChartDot).attr('cy', d => yScale(d)).attr('r', radius || 0).attr('style', style || '');
2068
2074
 
2069
2075
  if (filter) {
2070
2076
  dotsGroup.selectAll('circle').select((_, i, g) => filter(item, i, g) ? g[i] : null).remove();