WaterfallPoint.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* *
  2. *
  3. * (c) 2010-2021 Torstein Honsi
  4. *
  5. * License: www.highcharts.com/license
  6. *
  7. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  8. *
  9. * */
  10. var __extends = (this && this.__extends) || (function () {
  11. var extendStatics = function (d, b) {
  12. extendStatics = Object.setPrototypeOf ||
  13. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  14. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  15. return extendStatics(d, b);
  16. };
  17. return function (d, b) {
  18. extendStatics(d, b);
  19. function __() { this.constructor = d; }
  20. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  21. };
  22. })();
  23. import ColumnSeries from '../Column/ColumnSeries.js';
  24. import Point from '../../Core/Series/Point.js';
  25. var isNumber = U.isNumber;
  26. import U from '../../Core/Utilities.js';
  27. /* *
  28. *
  29. * Class
  30. *
  31. * */
  32. var WaterfallPoint = /** @class */ (function (_super) {
  33. __extends(WaterfallPoint, _super);
  34. function WaterfallPoint() {
  35. var _this = _super !== null && _super.apply(this, arguments) || this;
  36. _this.options = void 0;
  37. _this.series = void 0;
  38. return _this;
  39. }
  40. /* *
  41. *
  42. * Functions
  43. *
  44. * */
  45. WaterfallPoint.prototype.getClassName = function () {
  46. var className = Point.prototype.getClassName.call(this);
  47. if (this.isSum) {
  48. className += ' highcharts-sum';
  49. }
  50. else if (this.isIntermediateSum) {
  51. className += ' highcharts-intermediate-sum';
  52. }
  53. return className;
  54. };
  55. // Pass the null test in ColumnSeries.translate.
  56. WaterfallPoint.prototype.isValid = function () {
  57. return (isNumber(this.y) ||
  58. this.isSum ||
  59. Boolean(this.isIntermediateSum));
  60. };
  61. return WaterfallPoint;
  62. }(ColumnSeries.prototype.pointClass));
  63. /* *
  64. *
  65. * Export
  66. *
  67. * */
  68. export default WaterfallPoint;