VennPoint.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* *
  2. *
  3. * Imports
  4. *
  5. * */
  6. var __extends = (this && this.__extends) || (function () {
  7. var extendStatics = function (d, b) {
  8. extendStatics = Object.setPrototypeOf ||
  9. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  10. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  11. return extendStatics(d, b);
  12. };
  13. return function (d, b) {
  14. extendStatics(d, b);
  15. function __() { this.constructor = d; }
  16. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  17. };
  18. })();
  19. import DrawPointMixin from '../../Mixins/DrawPoint.js';
  20. import SeriesRegistry from '../../Core/Series/SeriesRegistry.js';
  21. var ScatterSeries = SeriesRegistry.seriesTypes.scatter;
  22. import U from '../../Core/Utilities.js';
  23. var extend = U.extend, isNumber = U.isNumber;
  24. /* *
  25. *
  26. * Class
  27. *
  28. * */
  29. var VennPoint = /** @class */ (function (_super) {
  30. __extends(VennPoint, _super);
  31. function VennPoint() {
  32. /* *
  33. *
  34. * Properties
  35. *
  36. * */
  37. var _this = _super !== null && _super.apply(this, arguments) || this;
  38. _this.options = void 0;
  39. _this.series = void 0;
  40. return _this;
  41. /* eslint-enable valid-jsdoc */
  42. }
  43. /* *
  44. *
  45. * Functions
  46. *
  47. * */
  48. /* eslint-disable valid-jsdoc */
  49. VennPoint.prototype.isValid = function () {
  50. return isNumber(this.value);
  51. };
  52. VennPoint.prototype.shouldDraw = function () {
  53. var point = this;
  54. // Only draw points with single sets.
  55. return !!point.shapeArgs;
  56. };
  57. return VennPoint;
  58. }(ScatterSeries.prototype.pointClass));
  59. extend(VennPoint.prototype, {
  60. draw: DrawPointMixin.drawPoint
  61. });
  62. /* *
  63. *
  64. * Default Export
  65. *
  66. * */
  67. export default VennPoint;