@fluentui/react-charting 5.16.20 → 5.16.21

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.
@@ -313,7 +313,6 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
313
313
  // if no points need to be called out then don't show vertical line and callout card
314
314
  if (found) {
315
315
  var _this_2 = _this_1;
316
- d3_selection_1.select('#' + circleId).attr('aria-labelledby', "toolTip" + _this_1._uniqueCallOutID);
317
316
  d3_selection_1.select("#" + _this_1._verticalLine)
318
317
  .attr('transform', function () { return "translate(" + _this_2._xAxisScale(x) + ", 0)"; })
319
318
  .attr('visibility', 'visibility');
@@ -374,15 +373,17 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
374
373
  });
375
374
  }
376
375
  };
377
- _this_1._onLineClick = function (func) {
378
- if (func) {
379
- func();
380
- }
381
- };
382
- _this_1._onDataPointClick = function (func) {
376
+ /**
377
+ * Screen readers announce an element as clickable if the onClick attribute is set.
378
+ * This function sets the attribute only when a click event handler is provided.
379
+ */
380
+ _this_1._getClickHandler = function (func) {
383
381
  if (func) {
384
- func();
382
+ return {
383
+ onClick: func,
384
+ };
385
385
  }
386
+ return {};
386
387
  };
387
388
  _this_1._handleMouseOut = function () {
388
389
  d3_selection_1.select("#" + _this_1._verticalLine).attr('visibility', 'hidden');
@@ -505,6 +506,16 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
505
506
  _this_1._getColorFillBarOpacity = function (colorFillBar) {
506
507
  return colorFillBar.applyPattern ? 1 : 0.4;
507
508
  };
509
+ _this_1._getAriaLabel = function (lineIndex, pointIndex) {
510
+ var _a;
511
+ var line = _this_1._points[lineIndex];
512
+ var point = line.data[pointIndex];
513
+ var formattedDate = point.x instanceof Date ? point.x.toLocaleString() : point.x;
514
+ var xValue = point.xAxisCalloutData || formattedDate;
515
+ var legend = line.legend;
516
+ var yValue = point.yAxisCalloutData || point.y;
517
+ return ((_a = point.callOutAccessibilityData) === null || _a === void 0 ? void 0 : _a.ariaLabel) || xValue + ". " + legend + ", " + yValue + ".";
518
+ };
508
519
  _this_1.state = {
509
520
  hoverXValue: '',
510
521
  activeLegend: '',
@@ -650,60 +661,62 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
650
661
  else {
651
662
  this._points = this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);
652
663
  }
653
- for (var i = this._points.length - 1; i >= 0; i--) {
664
+ var _loop_1 = function (i) {
654
665
  var linesForLine = [];
655
666
  var bordersForLine = [];
656
667
  var pointsForLine = [];
657
- var legendVal = this._points[i].legend;
658
- var lineColor = this._points[i].color;
659
- var activePoint = this.state.activePoint;
660
- var theme = this.props.theme;
661
- var verticaLineHeight = containerHeight - this.margins.bottom + 6;
662
- if (this._points[i].data.length === 1) {
663
- var _0 = this._points[i].data[0], x1 = _0.x, y1 = _0.y, xAxisCalloutData = _0.xAxisCalloutData, xAxisCalloutAccessibilityData = _0.xAxisCalloutAccessibilityData;
664
- var circleId = this._circleId + "_" + i;
665
- pointsForLine.push(React.createElement("circle", { id: circleId, key: circleId, r: activePoint === circleId ? 5.5 : 3.5, cx: this._xAxisScale(x1), cy: this._yAxisScale(y1), fill: activePoint === circleId ? theme.palette.white : lineColor, onMouseOver: this._handleHover.bind(this, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this._handleHover.bind(this, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this._handleMouseOut, strokeWidth: activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0, stroke: activePoint === circleId ? lineColor : '' }));
668
+ var legendVal = this_1._points[i].legend;
669
+ var lineColor = this_1._points[i].color;
670
+ var activePoint = this_1.state.activePoint;
671
+ var theme = this_1.props.theme;
672
+ var verticaLineHeight = containerHeight - this_1.margins.bottom + 6;
673
+ if (this_1._points[i].data.length === 1) {
674
+ var _0 = this_1._points[i].data[0], x1_1 = _0.x, y1 = _0.y, xAxisCalloutData_1 = _0.xAxisCalloutData, xAxisCalloutAccessibilityData_1 = _0.xAxisCalloutAccessibilityData;
675
+ var circleId_1 = this_1._circleId + "_" + i;
676
+ pointsForLine.push(React.createElement("circle", tslib_1.__assign({ id: circleId_1, key: circleId_1, r: activePoint === circleId_1 ? 5.5 : 3.5, cx: this_1._xAxisScale(x1_1), cy: this_1._yAxisScale(y1), fill: activePoint === circleId_1 ? theme.palette.white : lineColor, onMouseOver: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1), onMouseMove: this_1._handleHover.bind(this_1, x1_1, y1, verticaLineHeight, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1), onMouseOut: this_1._handleMouseOut, strokeWidth: activePoint === circleId_1 ? DEFAULT_LINE_STROKE_SIZE : 0, stroke: activePoint === circleId_1 ? lineColor : '', role: "img", "aria-label": this_1._getAriaLabel(i, 0), "data-is-focusable": true, ref: function (e) {
677
+ _this_1._refCallback(e, circleId_1);
678
+ }, onFocus: function () { return _this_1._handleFocus(circleId_1, x1_1, xAxisCalloutData_1, circleId_1, xAxisCalloutAccessibilityData_1); }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[0].onDataPointClick))));
666
679
  }
667
680
  var gapIndex = 0;
668
- var gaps = (_b = (_a = this._points[i].gaps) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) { return a.startIndex - b.startIndex; })) !== null && _b !== void 0 ? _b : [];
681
+ var gaps = (_b = (_a = this_1._points[i].gaps) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) { return a.startIndex - b.startIndex; })) !== null && _b !== void 0 ? _b : [];
669
682
  // Use path rendering technique for larger datasets to optimize performance.
670
- if (this.props.optimizeLargeData) {
683
+ if (this_1.props.optimizeLargeData && this_1._points[i].data.length > 1) {
671
684
  var line = d3_shape_1.line()
672
685
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
673
686
  .x(function (d) { return _this_1._xAxisScale(d[0]); })
674
687
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
675
688
  .y(function (d) { return _this_1._yAxisScale(d[1]); })
676
689
  .curve(d3_shape_1.curveLinear);
677
- var lineId = this._lineId + "_" + i;
678
- var borderId = this._borderId + "_" + i;
679
- var strokeWidth = ((_c = this._points[i].lineOptions) === null || _c === void 0 ? void 0 : _c.strokeWidth) || this.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
680
- var isLegendSelected = this._legendHighlighted(legendVal) || this._noLegendHighlighted() || this.state.isSelectedLegend;
690
+ var lineId = this_1._lineId + "_" + i;
691
+ var borderId = this_1._borderId + "_" + i;
692
+ var strokeWidth = ((_c = this_1._points[i].lineOptions) === null || _c === void 0 ? void 0 : _c.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
693
+ var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
681
694
  var lineData = [];
682
- for (var k = 0; k < this._points[i].data.length; k++) {
695
+ for (var k = 0; k < this_1._points[i].data.length; k++) {
683
696
  lineData.push([
684
- this._points[i].data[k].x instanceof Date
685
- ? this._points[i].data[k].x.getTime()
686
- : this._points[i].data[k].x,
687
- this._points[i].data[k].y,
697
+ this_1._points[i].data[k].x instanceof Date
698
+ ? this_1._points[i].data[k].x.getTime()
699
+ : this_1._points[i].data[k].x,
700
+ this_1._points[i].data[k].y,
688
701
  ]);
689
702
  }
690
703
  if (isLegendSelected) {
691
- var lineBorderWidth = ((_d = this._points[i].lineOptions) === null || _d === void 0 ? void 0 : _d.lineBorderWidth)
692
- ? Number.parseFloat(this._points[i].lineOptions.lineBorderWidth.toString())
704
+ var lineBorderWidth = ((_d = this_1._points[i].lineOptions) === null || _d === void 0 ? void 0 : _d.lineBorderWidth)
705
+ ? Number.parseFloat(this_1._points[i].lineOptions.lineBorderWidth.toString())
693
706
  : 0;
694
707
  if (lineBorderWidth > 0) {
695
- bordersForLine.push(React.createElement("path", { id: borderId, key: borderId, d: line(lineData), fill: "transparent", strokeLinecap: (_f = (_e = this._points[i].lineOptions) === null || _e === void 0 ? void 0 : _e.strokeLinecap) !== null && _f !== void 0 ? _f : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_g = this._points[i].lineOptions) === null || _g === void 0 ? void 0 : _g.lineBorderColor) || theme.palette.white, opacity: 1 }));
708
+ bordersForLine.push(React.createElement("path", { id: borderId, key: borderId, d: line(lineData), fill: "transparent", strokeLinecap: (_f = (_e = this_1._points[i].lineOptions) === null || _e === void 0 ? void 0 : _e.strokeLinecap) !== null && _f !== void 0 ? _f : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_g = this_1._points[i].lineOptions) === null || _g === void 0 ? void 0 : _g.lineBorderColor) || theme.palette.white, opacity: 1 }));
696
709
  }
697
- linesForLine.push(React.createElement("path", { id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": true, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_j = (_h = this._points[i].lineOptions) === null || _h === void 0 ? void 0 : _h.strokeLinecap) !== null && _j !== void 0 ? _j : 'round', onMouseMove: this._onMouseOverLargeDataset.bind(this, i, verticaLineHeight), onMouseOver: this._onMouseOverLargeDataset.bind(this, i, verticaLineHeight), onMouseOut: this._handleMouseOut, onClick: this._onLineClick.bind(this, this._points[i].onLineClick), opacity: 1 }));
710
+ linesForLine.push(React.createElement("path", tslib_1.__assign({ id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": true, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_j = (_h = this_1._points[i].lineOptions) === null || _h === void 0 ? void 0 : _h.strokeLinecap) !== null && _j !== void 0 ? _j : 'round', onMouseMove: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight), onMouseOver: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight), onMouseOut: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].onLineClick), { opacity: 1, role: "img", "aria-label": legendVal + ", series " + (i + 1) + " of " + this_1._points.length + " with " + this_1._points[i].data.length + " data points." })));
698
711
  }
699
712
  else {
700
- linesForLine.push(React.createElement("path", { id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": true, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_l = (_k = this._points[i].lineOptions) === null || _k === void 0 ? void 0 : _k.strokeLinecap) !== null && _l !== void 0 ? _l : 'round', opacity: 0.1 }));
713
+ linesForLine.push(React.createElement("path", { id: lineId, key: lineId, d: line(lineData), fill: "transparent", "data-is-focusable": true, stroke: lineColor, strokeWidth: strokeWidth, strokeLinecap: (_l = (_k = this_1._points[i].lineOptions) === null || _k === void 0 ? void 0 : _k.strokeLinecap) !== null && _l !== void 0 ? _l : 'round', opacity: 0.1, role: "img", "aria-label": legendVal + ", series " + (i + 1) + " of " + this_1._points.length + " with " + this_1._points[i].data.length + " data points." }));
701
714
  }
702
- var isPointHighlighted = this.state.activeLine !== null && this.state.activeLine === i;
703
- pointsForLine.push(React.createElement("circle", { id: this._staticHighlightCircle + "_" + i, key: this._staticHighlightCircle + "_" + i, r: 5.5, cx: 0, cy: 0, fill: theme.palette.white, "data-is-focusable": true, strokeWidth: DEFAULT_LINE_STROKE_SIZE, stroke: lineColor, visibility: isPointHighlighted ? 'visibility' : 'hidden', onMouseMove: this._onMouseOverLargeDataset.bind(this, i, verticaLineHeight), onMouseOver: this._onMouseOverLargeDataset.bind(this, i, verticaLineHeight), onMouseOut: this._handleMouseOut }));
715
+ var isPointHighlighted = this_1.state.activeLine !== null && this_1.state.activeLine === i;
716
+ pointsForLine.push(React.createElement("circle", { id: this_1._staticHighlightCircle + "_" + i, key: this_1._staticHighlightCircle + "_" + i, r: 5.5, cx: 0, cy: 0, fill: theme.palette.white, strokeWidth: DEFAULT_LINE_STROKE_SIZE, stroke: lineColor, visibility: isPointHighlighted ? 'visibility' : 'hidden', onMouseMove: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight), onMouseOver: this_1._onMouseOverLargeDataset.bind(this_1, i, verticaLineHeight), onMouseOut: this_1._handleMouseOut }));
704
717
  }
705
- else {
706
- var _loop_1 = function (j) {
718
+ else if (!this_1.props.optimizeLargeData) {
719
+ var _loop_2 = function (j) {
707
720
  var gapResult = this_1._checkInGap(j, gaps, gapIndex);
708
721
  var isInGap = gapResult.isInGap;
709
722
  gapIndex = gapResult.gapIndex;
@@ -716,16 +729,16 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
716
729
  var strokeWidth = ((_m = this_1._points[i].lineOptions) === null || _m === void 0 ? void 0 : _m.strokeWidth) || this_1.props.strokeWidth || DEFAULT_LINE_STROKE_SIZE;
717
730
  var isLegendSelected = this_1._legendHighlighted(legendVal) || this_1._noLegendHighlighted() || this_1.state.isSelectedLegend;
718
731
  var currentPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== circleId;
719
- pointsForLine.push(React.createElement("path", { id: circleId, key: circleId, d: path, "data-is-focusable": true, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this_1._handleMouseOut, onFocus: function () { return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j - 1].onDataPointClick), opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, circleId, j, false), stroke: lineColor, strokeWidth: strokeWidth }));
732
+ pointsForLine.push(React.createElement("path", tslib_1.__assign({ id: circleId, key: circleId, d: path, "data-is-focusable": true, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this_1._handleMouseOut, onFocus: function () { return _this_1._handleFocus(lineId, x1, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData); }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[j - 1].onDataPointClick), { opacity: isLegendSelected && !currentPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, circleId, j, false), stroke: lineColor, strokeWidth: strokeWidth, role: "img", "aria-label": this_1._getAriaLabel(i, j - 1) })));
720
733
  if (j + 1 === this_1._points[i].data.length) {
721
734
  // If this is last point of the line segment.
722
735
  var lastCircleId_1 = "" + circleId + j + "L";
723
736
  var lastPointHidden = this_1._points[i].hideNonActiveDots && activePoint !== lastCircleId_1;
724
737
  path = this_1._getPath(this_1._xAxisScale(x2), this_1._yAxisScale(y2), lastCircleId_1, j, true, this_1._points[i].index);
725
738
  var _3 = this_1._points[i].data[j], lastCirlceXCallout_1 = _3.xAxisCalloutData, lastCirlceXCalloutAccessibilityData_1 = _3.xAxisCalloutAccessibilityData;
726
- pointsForLine.push(React.createElement("path", { id: lastCircleId_1, key: lastCircleId_1, d: path, "data-is-focusable": true, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseOut: this_1._handleMouseOut, onFocus: function () {
739
+ pointsForLine.push(React.createElement("path", tslib_1.__assign({ id: lastCircleId_1, key: lastCircleId_1, d: path, "data-is-focusable": true, onMouseOver: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseMove: this_1._handleHover.bind(this_1, x2, y2, verticaLineHeight, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1), onMouseOut: this_1._handleMouseOut, onFocus: function () {
727
740
  return _this_1._handleFocus(lineId, x2, lastCirlceXCallout_1, lastCircleId_1, lastCirlceXCalloutAccessibilityData_1);
728
- }, onBlur: this_1._handleMouseOut, onClick: this_1._onDataPointClick.bind(this_1, this_1._points[i].data[j].onDataPointClick), opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, lastCircleId_1, j, true), stroke: lineColor, strokeWidth: strokeWidth }));
741
+ }, onBlur: this_1._handleMouseOut }, this_1._getClickHandler(this_1._points[i].data[j].onDataPointClick), { opacity: isLegendSelected && !lastPointHidden ? 1 : 0.01, fill: this_1._getPointFill(lineColor, lastCircleId_1, j, true), stroke: lineColor, strokeWidth: strokeWidth, role: "img", "aria-label": this_1._getAriaLabel(i, j) })));
729
742
  /* eslint-enable react/jsx-no-bind */
730
743
  }
731
744
  if (isLegendSelected) {
@@ -737,9 +750,9 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
737
750
  if (lineBorderWidth > 0) {
738
751
  bordersForLine.push(React.createElement("line", { id: borderId, key: borderId, x1: this_1._xAxisScale(x1), y1: this_1._yAxisScale(y1), x2: this_1._xAxisScale(x2), y2: this_1._yAxisScale(y2), strokeLinecap: (_q = (_p = this_1._points[i].lineOptions) === null || _p === void 0 ? void 0 : _p.strokeLinecap) !== null && _q !== void 0 ? _q : 'round', strokeWidth: Number.parseFloat(strokeWidth.toString()) + lineBorderWidth, stroke: ((_r = this_1._points[i].lineOptions) === null || _r === void 0 ? void 0 : _r.lineBorderColor) || theme.palette.white, opacity: 1 }));
739
752
  }
740
- linesForLine.push(React.createElement("line", { id: lineId, key: lineId, x1: this_1._xAxisScale(x1), y1: this_1._yAxisScale(y1), x2: this_1._xAxisScale(x2), y2: this_1._yAxisScale(y2), strokeWidth: strokeWidth, ref: function (e) {
753
+ linesForLine.push(React.createElement("line", tslib_1.__assign({ id: lineId, key: lineId, x1: this_1._xAxisScale(x1), y1: this_1._yAxisScale(y1), x2: this_1._xAxisScale(x2), y2: this_1._yAxisScale(y2), strokeWidth: strokeWidth, ref: function (e) {
741
754
  _this_1._refCallback(e, lineId);
742
- }, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this_1._handleMouseOut, stroke: lineColor, strokeLinecap: (_t = (_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeLinecap) !== null && _t !== void 0 ? _t : 'round', strokeDasharray: (_u = this_1._points[i].lineOptions) === null || _u === void 0 ? void 0 : _u.strokeDasharray, strokeDashoffset: (_v = this_1._points[i].lineOptions) === null || _v === void 0 ? void 0 : _v.strokeDashoffset, opacity: 1, onClick: this_1._onLineClick.bind(this_1, this_1._points[i].onLineClick) }));
755
+ }, onMouseOver: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseMove: this_1._handleHover.bind(this_1, x1, y1, verticaLineHeight, xAxisCalloutData, circleId, xAxisCalloutAccessibilityData), onMouseOut: this_1._handleMouseOut, stroke: lineColor, strokeLinecap: (_t = (_s = this_1._points[i].lineOptions) === null || _s === void 0 ? void 0 : _s.strokeLinecap) !== null && _t !== void 0 ? _t : 'round', strokeDasharray: (_u = this_1._points[i].lineOptions) === null || _u === void 0 ? void 0 : _u.strokeDasharray, strokeDashoffset: (_v = this_1._points[i].lineOptions) === null || _v === void 0 ? void 0 : _v.strokeDashoffset, opacity: 1 }, this_1._getClickHandler(this_1._points[i].onLineClick))));
743
756
  }
744
757
  }
745
758
  else {
@@ -748,12 +761,15 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
748
761
  }
749
762
  }
750
763
  };
751
- var this_1 = this;
752
- for (var j = 1; j < this._points[i].data.length; j++) {
753
- _loop_1(j);
764
+ for (var j = 1; j < this_1._points[i].data.length; j++) {
765
+ _loop_2(j);
754
766
  }
755
767
  }
756
768
  lines.push.apply(lines, tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], bordersForLine), linesForLine), pointsForLine));
769
+ };
770
+ var this_1 = this;
771
+ for (var i = this._points.length - 1; i >= 0; i--) {
772
+ _loop_1(i);
757
773
  }
758
774
  var classNames = getClassNames(this.props.styles, {
759
775
  theme: this.props.theme,