@fluentui/react-charting 5.23.20 → 5.23.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.
Files changed (47) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/react-charting.d.ts +6 -1
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +2 -1
  7. package/lib/components/CommonComponents/CartesianChart.base.js +2 -2
  8. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.types.d.ts +6 -1
  10. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  11. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
  12. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +70 -41
  13. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  14. package/lib/utilities/test-data.d.ts +16 -0
  15. package/lib/utilities/test-data.js +52 -0
  16. package/lib/utilities/test-data.js.map +1 -1
  17. package/lib/utilities/utilities.d.ts +1 -1
  18. package/lib/utilities/utilities.js +29 -4
  19. package/lib/utilities/utilities.js.map +1 -1
  20. package/lib-amd/components/CommonComponents/CartesianChart.base.js +2 -2
  21. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  22. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +6 -1
  23. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  24. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
  25. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +70 -41
  26. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  27. package/lib-amd/utilities/test-data.d.ts +16 -0
  28. package/lib-amd/utilities/test-data.js +53 -1
  29. package/lib-amd/utilities/test-data.js.map +1 -1
  30. package/lib-amd/utilities/utilities.d.ts +1 -1
  31. package/lib-amd/utilities/utilities.js +29 -4
  32. package/lib-amd/utilities/utilities.js.map +1 -1
  33. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +2 -2
  34. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  35. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +6 -1
  36. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  37. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
  38. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +70 -41
  39. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  40. package/lib-commonjs/utilities/test-data.d.ts +16 -0
  41. package/lib-commonjs/utilities/test-data.js +53 -1
  42. package/lib-commonjs/utilities/test-data.js.map +1 -1
  43. package/lib-commonjs/utilities/utilities.d.ts +1 -1
  44. package/lib-commonjs/utilities/utilities.js +29 -4
  45. package/lib-commonjs/utilities/utilities.js.map +1 -1
  46. package/package.json +1 -1
  47. package/src/components/CommonComponents/CartesianChart.types.ts +7 -0
@@ -265,7 +265,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
265
265
  var xBarScale;
266
266
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
267
267
  var yBarScale = (0, d3_scale_1.scaleLinear)()
268
- .domain([0, _this._yMax])
268
+ .domain([_this.props.supportNegativeData ? _this._yMin : 0, _this._yMax])
269
269
  .range([0, containerHeight - _this.margins.bottom - _this.margins.top]);
270
270
  if (_this._xAxisType === index_2.XAxisTypes.NumericAxis) {
271
271
  var xMax = (0, d3_array_1.max)(_this._points, function (point) { return point.x; });
@@ -357,6 +357,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
357
357
  if (yAxisData && yAxisData.yAxisDomainValues.length) {
358
358
  var domainValue = yAxisData.yAxisDomainValues;
359
359
  _this._yMax = Math.max(domainValue[domainValue.length - 1], _this.props.yMaxValue || 0);
360
+ _this._yMin = Math.min(domainValue[0], _this.props.yMinValue || 0);
360
361
  }
361
362
  };
362
363
  /**
@@ -462,6 +463,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
462
463
  this._adjustProps();
463
464
  this._xAxisLabels = this._points.map(function (point) { return point.x; });
464
465
  this._yMax = Math.max((0, d3_array_1.max)(this._points, function (point) { return point.y; }), this.props.yMaxValue || 0);
466
+ this._yMin = Math.min((0, d3_array_1.min)(this._points, function (point) { return point.y; }), this.props.yMinValue || 0);
465
467
  var legendBars = this._getLegendData(this._points, this.props.theme.palette);
466
468
  this._classNames = getClassNames(this.props.styles, {
467
469
  theme: this.props.theme,
@@ -475,7 +477,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
475
477
  tickValues: this.props.tickValues,
476
478
  tickFormat: this.props.tickFormat,
477
479
  };
478
- return !this._isChartEmpty() ? (React.createElement(index_1.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: this._points, chartType: index_2.ChartTypes.VerticalBarChart, xAxisType: this._xAxisType, createYAxis: index_2.createNumericYAxis, calloutProps: calloutProps, tickParams: tickParams }, (this._isHavingLine && this._noLegendHighlighted() && { isCalloutForStack: true }), { legendBars: legendBars, datasetForXAxisDomain: this._xAxisLabels, barwidth: this._barWidth, focusZoneDirection: react_focus_1.FocusZoneDirection.horizontal, customizedCallout: this._getCustomizedCallout(), createStringYAxis: index_2.createStringYAxis, getmargins: this._getMargins, getMinMaxOfYAxis: index_2.findVerticalNumericMinMaxOfY, getGraphData: this._getGraphData, getDomainNRangeValues: this._getDomainNRangeValues, getAxisData: this._getAxisData, onChartMouseLeave: this._handleChartMouseLeave, getDomainMargins: this._getDomainMargins }, (this._xAxisType === index_2.XAxisTypes.StringAxis && {
480
+ return !this._isChartEmpty() ? (React.createElement(index_1.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: this._points, supportNegativeData: this.props.supportNegativeData, chartType: index_2.ChartTypes.VerticalBarChart, xAxisType: this._xAxisType, createYAxis: index_2.createNumericYAxis, calloutProps: calloutProps, tickParams: tickParams }, (this._isHavingLine && this._noLegendHighlighted() && { isCalloutForStack: true }), { legendBars: legendBars, datasetForXAxisDomain: this._xAxisLabels, barwidth: this._barWidth, focusZoneDirection: react_focus_1.FocusZoneDirection.horizontal, customizedCallout: this._getCustomizedCallout(), createStringYAxis: index_2.createStringYAxis, getmargins: this._getMargins, getMinMaxOfYAxis: index_2.findVerticalNumericMinMaxOfY, getGraphData: this._getGraphData, getDomainNRangeValues: this._getDomainNRangeValues, getAxisData: this._getAxisData, onChartMouseLeave: this._handleChartMouseLeave, getDomainMargins: this._getDomainMargins }, (this._xAxisType === index_2.XAxisTypes.StringAxis && {
479
481
  xAxisInnerPadding: this._xAxisInnerPadding,
480
482
  xAxisOuterPadding: this._xAxisOuterPadding,
481
483
  }), {
@@ -537,11 +539,19 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
537
539
  });
538
540
  }
539
541
  };
542
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
543
+ VerticalBarChartBase.prototype._calculateMinBarHeight = function (yMin, yMax, yReferencePoint, yBarScale) {
544
+ var maxHeightFromBaseline = yMax < 0
545
+ ? Math.abs(yMin - yReferencePoint)
546
+ : Math.max(Math.abs(yMax - yReferencePoint), Math.abs(yMin - yReferencePoint));
547
+ return Math.ceil(yBarScale(maxHeightFromBaseline) / 100.0);
548
+ };
540
549
  VerticalBarChartBase.prototype._createNumericBars = function (containerHeight, containerWidth, xElement) {
541
550
  var _this = this;
542
551
  var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
543
552
  var _b = this._getScales(containerHeight, containerWidth), xBarScale = _b.xBarScale, yBarScale = _b.yBarScale;
544
553
  var colorScale = this._createColors();
554
+ var yReferencePoint = this._yMax < 0 ? this._yMax : 0;
545
555
  var bars = this._points.map(function (point, index) {
546
556
  var _a, _b, _c, _d, _e, _f;
547
557
  var shouldHighlight = _this._legendHighlighted(point.legend) || _this._noLegendHighlighted() ? true : false;
@@ -550,19 +560,25 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
550
560
  legendColor: _this.state.color,
551
561
  shouldHighlight: shouldHighlight,
552
562
  });
553
- var barHeight = Math.max(yBarScale(point.y), 0);
554
- var adjustedBarHeight = 0;
555
- if (barHeight <= 0) {
563
+ var barHeight = yBarScale(point.y) - yBarScale(yReferencePoint);
564
+ var isHeightNegative = barHeight < 0;
565
+ barHeight = Math.abs(barHeight);
566
+ // Calculate threshold for minimum visible bar height
567
+ var minBarHeight = _this._calculateMinBarHeight(_this._yMin, _this._yMax, yReferencePoint, yBarScale);
568
+ var adjustedBarHeight = barHeight;
569
+ if (barHeight === 0 || (isHeightNegative && !_this.props.supportNegativeData)) {
556
570
  return React.createElement(React.Fragment, { key: point.x }, " ");
557
571
  }
558
- else if (barHeight <= Math.ceil(yBarScale(_this._yMax) / 100.0)) {
559
- adjustedBarHeight = Math.ceil(yBarScale(_this._yMax) / 100.0);
560
- }
561
- else {
562
- adjustedBarHeight = barHeight;
572
+ // Adjust bar height if it's smaller than the threshold
573
+ else if (barHeight <= minBarHeight) {
574
+ adjustedBarHeight = minBarHeight;
563
575
  }
564
576
  var xPoint = xBarScale(point.x) - _this._barWidth / 2;
565
- var yPoint = containerHeight - _this.margins.bottom - adjustedBarHeight;
577
+ var yPoint = containerHeight -
578
+ _this.margins.bottom -
579
+ (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -
580
+ yBarScale(yReferencePoint);
581
+ var baselineHeight = containerHeight - _this.margins.bottom - yBarScale(yReferencePoint);
566
582
  var startColor = point.color && !useSingleColor ? point.color : colorScale(point.y);
567
583
  var endColor = startColor;
568
584
  if (_this.props.enableGradient) {
@@ -580,10 +596,10 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
580
596
  React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "100%", x2: "0%", y2: "0%" },
581
597
  React.createElement("stop", { offset: "0", stopColor: startColor }),
582
598
  React.createElement("stop", { offset: "100%", stopColor: endColor })))),
583
- React.createElement("rect", { id: (0, Utilities_1.getId)('_VBC_bar_'), x: xPoint, className: _this._classNames.opacityChangeOnHover, y: yPoint, width: _this._barWidth, "data-is-focusable": !_this.props.hideTooltip && shouldHighlight, height: adjustedBarHeight, ref: function (e) {
599
+ React.createElement("rect", { id: (0, Utilities_1.getId)('_VBC_bar_'), x: xPoint, className: _this._classNames.opacityChangeOnHover, y: !isHeightNegative ? yPoint : baselineHeight, width: _this._barWidth, "data-is-focusable": !_this.props.hideTooltip && shouldHighlight, height: adjustedBarHeight, ref: function (e) {
584
600
  _this._refCallback(e, point.legend);
585
601
  }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, startColor), "aria-label": _this._getAriaLabel(point), role: "img", onMouseLeave: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, point, index, startColor), onBlur: _this._onBarLeave, fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0 }),
586
- _this._renderBarLabel(xPoint, yPoint, point.y, point.legend)));
602
+ _this._renderBarLabel(xPoint, yPoint, point.y, point.legend, isHeightNegative)));
587
603
  });
588
604
  // Removing un wanted tooltip div from DOM, when prop not provided.
589
605
  if (!this.props.showXAxisLablesTooltip) {
@@ -615,21 +631,28 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
615
631
  var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
616
632
  var _b = this._getScales(containerHeight, containerWidth), xBarScale = _b.xBarScale, yBarScale = _b.yBarScale;
617
633
  var colorScale = this._createColors();
634
+ var yReferencePoint = this._yMax < 0 ? this._yMax : 0;
618
635
  var bars = this._points.map(function (point, index) {
619
636
  var _a, _b, _c, _d, _e, _f;
620
- var barHeight = Math.max(yBarScale(point.y), 0);
621
- var adjustedBarHeight = 0;
622
- if (barHeight <= 0) {
623
- return React.createElement(React.Fragment, { key: point.x instanceof Date ? point.x.getTime() : point.x }, " ");
637
+ var barHeight = yBarScale(point.y) - yBarScale(yReferencePoint);
638
+ var isHeightNegative = barHeight < 0;
639
+ barHeight = Math.abs(barHeight);
640
+ // Calculate threshold for minimum visible bar height
641
+ var minBarHeight = _this._calculateMinBarHeight(_this._yMin, _this._yMax, yReferencePoint, yBarScale);
642
+ var adjustedBarHeight = barHeight;
643
+ if (barHeight === 0 || (isHeightNegative && !_this.props.supportNegativeData)) {
644
+ return React.createElement(React.Fragment, { key: point.x }, " ");
624
645
  }
625
- else if (barHeight <= Math.ceil(yBarScale(_this._yMax) / 100.0)) {
626
- adjustedBarHeight = Math.ceil(yBarScale(_this._yMax) / 100.0);
627
- }
628
- else {
629
- adjustedBarHeight = barHeight;
646
+ // Adjust bar height if it's smaller than the threshold
647
+ else if (barHeight <= minBarHeight) {
648
+ adjustedBarHeight = minBarHeight;
630
649
  }
631
650
  var xPoint = xBarScale(point.x);
632
- var yPoint = containerHeight - _this.margins.bottom - adjustedBarHeight;
651
+ var yPoint = containerHeight -
652
+ _this.margins.bottom -
653
+ (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -
654
+ yBarScale(yReferencePoint);
655
+ var baselineHeight = containerHeight - _this.margins.bottom - yBarScale(yReferencePoint);
633
656
  // Setting the bar width here is safe because there are no dependencies earlier in the code
634
657
  // that rely on the width of bars in vertical bar charts with string x-axis.
635
658
  _this._barWidth = (0, index_2.getBarWidth)(_this.props.barWidth, _this.props.maxBarWidth, xBarScale.bandwidth());
@@ -650,10 +673,10 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
650
673
  React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "100%", x2: "0%", y2: "0%" },
651
674
  React.createElement("stop", { offset: "0", stopColor: startColor }),
652
675
  React.createElement("stop", { offset: "100%", stopColor: endColor })))),
653
- React.createElement("rect", { id: (0, Utilities_1.getId)('_VBC_bar_'), x: xPoint, y: yPoint, width: _this._barWidth, height: adjustedBarHeight, "aria-label": _this._getAriaLabel(point), role: "img", ref: function (e) {
676
+ React.createElement("rect", { id: (0, Utilities_1.getId)('_VBC_bar_'), x: xPoint, y: !isHeightNegative ? yPoint : baselineHeight, width: _this._barWidth, height: adjustedBarHeight, "aria-label": _this._getAriaLabel(point), role: "img", ref: function (e) {
654
677
  _this._refCallback(e, point.legend);
655
678
  }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, startColor), onMouseLeave: _this._onBarLeave, onBlur: _this._onBarLeave, "data-is-focusable": !_this.props.hideTooltip, onFocus: _this._onBarFocus.bind(_this, point, index, startColor), fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0 }),
656
- _this._renderBarLabel(xPoint, yPoint, point.y, point.legend)));
679
+ _this._renderBarLabel(xPoint, yPoint, point.y, point.legend, isHeightNegative)));
657
680
  });
658
681
  // Removing un wanted tooltip div from DOM, when prop not provided.
659
682
  if (!this.props.showXAxisLablesTooltip) {
@@ -686,6 +709,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
686
709
  var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
687
710
  var _b = this._getScales(containerHeight, containerWidth), xBarScale = _b.xBarScale, yBarScale = _b.yBarScale;
688
711
  var colorScale = this._createColors();
712
+ var yReferencePoint = this._yMax < 0 ? this._yMax : 0;
689
713
  var bars = this._points.map(function (point, index) {
690
714
  var _a, _b, _c, _d, _e, _f;
691
715
  var shouldHighlight = _this._legendHighlighted(point.legend) || _this._noLegendHighlighted() ? true : false;
@@ -694,19 +718,25 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
694
718
  legendColor: _this.state.color,
695
719
  shouldHighlight: shouldHighlight,
696
720
  });
697
- var barHeight = Math.max(yBarScale(point.y), 0);
698
- var adjustedBarHeight = 0;
699
- if (barHeight <= 0) {
700
- return React.createElement(React.Fragment, { key: point.x instanceof Date ? point.x.getTime() : point.x }, " ");
701
- }
702
- else if (barHeight <= Math.ceil(yBarScale(_this._yMax) / 100.0)) {
703
- adjustedBarHeight = Math.ceil(yBarScale(_this._yMax) / 100.0);
721
+ var barHeight = yBarScale(point.y) - yBarScale(yReferencePoint);
722
+ var isHeightNegative = barHeight < 0;
723
+ barHeight = Math.abs(barHeight);
724
+ // Calculate threshold for minimum visible bar height
725
+ var minBarHeight = _this._calculateMinBarHeight(_this._yMin, _this._yMax, yReferencePoint, yBarScale);
726
+ var adjustedBarHeight = barHeight;
727
+ if (barHeight === 0 || (isHeightNegative && !_this.props.supportNegativeData)) {
728
+ return React.createElement(React.Fragment, { key: point.x }, " ");
704
729
  }
705
- else {
706
- adjustedBarHeight = barHeight;
730
+ // Adjust bar height if it's smaller than the threshold
731
+ else if (barHeight <= minBarHeight) {
732
+ adjustedBarHeight = minBarHeight;
707
733
  }
708
734
  var xPoint = xBarScale(point.x) - _this._barWidth / 2;
709
- var yPoint = containerHeight - _this.margins.bottom - adjustedBarHeight;
735
+ var yPoint = containerHeight -
736
+ _this.margins.bottom -
737
+ (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -
738
+ yBarScale(yReferencePoint);
739
+ var baselineHeight = containerHeight - _this.margins.bottom - yBarScale(yReferencePoint);
710
740
  var startColor = point.color && !useSingleColor ? point.color : colorScale(point.y);
711
741
  var endColor = startColor;
712
742
  if (_this.props.enableGradient) {
@@ -724,10 +754,10 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
724
754
  React.createElement("linearGradient", { id: gradientId, x1: "0%", y1: "100%", x2: "0%", y2: "0%" },
725
755
  React.createElement("stop", { offset: "0", stopColor: startColor }),
726
756
  React.createElement("stop", { offset: "100%", stopColor: endColor })))),
727
- React.createElement("rect", { id: (0, Utilities_1.getId)('_VBC_bar_'), x: xPoint, className: _this._classNames.opacityChangeOnHover, y: yPoint, width: _this._barWidth, "data-is-focusable": !_this.props.hideTooltip && shouldHighlight, height: adjustedBarHeight, ref: function (e) {
757
+ React.createElement("rect", { id: (0, Utilities_1.getId)('_VBC_bar_'), x: xPoint, className: _this._classNames.opacityChangeOnHover, y: !isHeightNegative ? yPoint : baselineHeight, width: _this._barWidth, "data-is-focusable": !_this.props.hideTooltip && shouldHighlight, height: adjustedBarHeight, ref: function (e) {
728
758
  _this._refCallback(e, point.legend);
729
759
  }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, startColor), "aria-label": _this._getAriaLabel(point), role: "img", onMouseLeave: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, point, index, startColor), onBlur: _this._onBarLeave, fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor, rx: _this.props.roundCorners ? 3 : 0 }),
730
- _this._renderBarLabel(xPoint, yPoint, point.y, point.legend)));
760
+ _this._renderBarLabel(xPoint, yPoint, point.y, point.legend, isHeightNegative)));
731
761
  });
732
762
  // Removing un wanted tooltip div from DOM, when prop not provided.
733
763
  if (!this.props.showXAxisLablesTooltip) {
@@ -776,17 +806,16 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
776
806
  activeLegend: '',
777
807
  });
778
808
  };
779
- VerticalBarChartBase.prototype._renderBarLabel = function (xPoint, yPoint, barValue, legend) {
809
+ VerticalBarChartBase.prototype._renderBarLabel = function (xPoint, yPoint, barValue, legend, isNegativeBar) {
780
810
  if (this.props.hideLabels ||
781
811
  this._barWidth < 16 ||
782
812
  !(this._legendHighlighted(legend) || this._noLegendHighlighted())) {
783
813
  return null;
784
814
  }
785
- return (React.createElement("text", { x: xPoint + this._barWidth / 2, y: yPoint - 6, textAnchor: "middle", className: this._classNames.barLabel, "aria-hidden": true }, (0, index_2.formatValueWithSIPrefix)(barValue)));
815
+ return (React.createElement("text", { x: xPoint + this._barWidth / 2, y: isNegativeBar ? yPoint + 12 : yPoint - 6, textAnchor: "middle", className: this._classNames.barLabel, "aria-hidden": true }, (0, index_2.formatValueWithSIPrefix)(barValue)));
786
816
  };
787
817
  VerticalBarChartBase.prototype._isChartEmpty = function () {
788
- return (this._points.length === 0 ||
789
- ((0, d3_array_1.max)(this._points, function (point) { return point.y; }) <= 0 && !this._isHavingLine));
818
+ return this._points.length === 0 || (this._points.every(function (point) { return point.y === 0; }) && !this._isHavingLine);
790
819
  };
791
820
  VerticalBarChartBase.defaultProps = {
792
821
  maxBarWidth: 24,