'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Globals = require('../../parts/Globals.js'); var _Globals2 = _interopRequireDefault(_Globals); require('../../parts/Utilities.js'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Annotation = _Globals2.default.Annotation, CrookedLine = Annotation.types.crookedLine; /** * @class * @extends Annotation.CrookedLine * @memberOf Annotation */ function ElliottWave() { CrookedLine.apply(this, arguments); } _Globals2.default.extendAnnotation(ElliottWave, CrookedLine, /** Annotation.CrookedLine# */ { addLabels: function addLabels() { this.getPointsOptions().forEach(function (point, i) { var label = this.initLabel(_Globals2.default.merge(point.label, { text: this.options.typeOptions.labels[i], point: function point(target) { return target.annotation.points[i]; } }), false); point.label = label.options; }, this); } }, /** * An elliott wave annotation. * * @sample highcharts/annotations-advanced/elliott-wave/ * Elliott wave * * @extends annotations.crookedLine * @product highstock * @optionparent annotations.elliottWave */ { typeOptions: { /** * @extends annotations.crookedLine.labelOptions * @apioption annotations.elliottWave.typeOptions.points.label */ /** * @ignore-options */ labels: ['(0)', '(A)', '(B)', '(C)', '(D)', '(E)'], line: { strokeWidth: 1 } }, labelOptions: { align: 'center', allowOverlap: true, crop: true, overflow: 'none', type: 'rect', backgroundColor: 'none', borderWidth: 0, y: -5 } }); Annotation.types.elliottWave = ElliottWave; exports.default = ElliottWave;