histogram-bellcurve.src.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. /**
  2. * @license Highcharts JS v9.1.1 (2021-06-04)
  3. *
  4. * (c) 2010-2021 Highsoft AS
  5. * Author: Sebastian Domas
  6. *
  7. * License: www.highcharts.com/license
  8. */
  9. 'use strict';
  10. (function (factory) {
  11. if (typeof module === 'object' && module.exports) {
  12. factory['default'] = factory;
  13. module.exports = factory;
  14. } else if (typeof define === 'function' && define.amd) {
  15. define('highcharts/modules/histogram-bellcurve', ['highcharts'], function (Highcharts) {
  16. factory(Highcharts);
  17. factory.Highcharts = Highcharts;
  18. return factory;
  19. });
  20. } else {
  21. factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
  22. }
  23. }(function (Highcharts) {
  24. var _modules = Highcharts ? Highcharts._modules : {};
  25. function _registerModule(obj, path, args, fn) {
  26. if (!obj.hasOwnProperty(path)) {
  27. obj[path] = fn.apply(null, args);
  28. }
  29. }
  30. _registerModule(_modules, 'Mixins/DerivedSeries.js', [_modules['Core/Globals.js'], _modules['Core/Series/Series.js'], _modules['Core/Utilities.js']], function (H, Series, U) {
  31. /* *
  32. *
  33. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  34. *
  35. * */
  36. var noop = H.noop;
  37. var addEvent = U.addEvent,
  38. defined = U.defined;
  39. /* ************************************************************************** *
  40. *
  41. * DERIVED SERIES MIXIN
  42. *
  43. * ************************************************************************** */
  44. /**
  45. * Provides methods for auto setting/updating series data based on the based
  46. * series data.
  47. *
  48. * @private
  49. * @mixin derivedSeriesMixin
  50. */
  51. var derivedSeriesMixin = {
  52. hasDerivedData: true,
  53. /* eslint-disable valid-jsdoc */
  54. /**
  55. * Initialise series
  56. *
  57. * @private
  58. * @function derivedSeriesMixin.init
  59. * @return {void}
  60. */
  61. init: function () {
  62. Series.prototype.init.apply(this,
  63. arguments);
  64. this.initialised = false;
  65. this.baseSeries = null;
  66. this.eventRemovers = [];
  67. this.addEvents();
  68. },
  69. /**
  70. * Method to be implemented - inside the method the series has already
  71. * access to the base series via m `this.baseSeries` and the bases data is
  72. * initialised. It should return data in the format accepted by
  73. * `Series.setData()` method
  74. *
  75. * @private
  76. * @function derivedSeriesMixin.setDerivedData
  77. * @return {Array<Highcharts.PointOptionsType>}
  78. * An array of data
  79. */
  80. setDerivedData: noop,
  81. /**
  82. * Sets base series for the series
  83. *
  84. * @private
  85. * @function derivedSeriesMixin.setBaseSeries
  86. * @return {void}
  87. */
  88. setBaseSeries: function () {
  89. var chart = this.chart,
  90. baseSeriesOptions = this.options.baseSeries,
  91. baseSeries = (defined(baseSeriesOptions) &&
  92. (chart.series[baseSeriesOptions] ||
  93. chart.get(baseSeriesOptions)));
  94. this.baseSeries = baseSeries || null;
  95. },
  96. /**
  97. * Adds events for the series
  98. *
  99. * @private
  100. * @function derivedSeriesMixin.addEvents
  101. * @return {void}
  102. */
  103. addEvents: function () {
  104. var derivedSeries = this,
  105. chartSeriesLinked;
  106. chartSeriesLinked = addEvent(this.chart, 'afterLinkSeries', function () {
  107. derivedSeries.setBaseSeries();
  108. if (derivedSeries.baseSeries && !derivedSeries.initialised) {
  109. derivedSeries.setDerivedData();
  110. derivedSeries.addBaseSeriesEvents();
  111. derivedSeries.initialised = true;
  112. }
  113. });
  114. this.eventRemovers.push(chartSeriesLinked);
  115. },
  116. /**
  117. * Adds events to the base series - it required for recalculating the data
  118. * in the series if the base series is updated / removed / etc.
  119. *
  120. * @private
  121. * @function derivedSeriesMixin.addBaseSeriesEvents
  122. * @return {void}
  123. */
  124. addBaseSeriesEvents: function () {
  125. var derivedSeries = this,
  126. updatedDataRemover,
  127. destroyRemover;
  128. updatedDataRemover = addEvent(derivedSeries.baseSeries, 'updatedData', function () {
  129. derivedSeries.setDerivedData();
  130. });
  131. destroyRemover = addEvent(derivedSeries.baseSeries, 'destroy', function () {
  132. derivedSeries.baseSeries = null;
  133. derivedSeries.initialised = false;
  134. });
  135. derivedSeries.eventRemovers.push(updatedDataRemover, destroyRemover);
  136. },
  137. /**
  138. * Destroys the series
  139. *
  140. * @private
  141. * @function derivedSeriesMixin.destroy
  142. */
  143. destroy: function () {
  144. this.eventRemovers.forEach(function (remover) {
  145. remover();
  146. });
  147. Series.prototype.destroy.apply(this, arguments);
  148. }
  149. /* eslint-disable valid-jsdoc */
  150. };
  151. return derivedSeriesMixin;
  152. });
  153. _registerModule(_modules, 'Series/Histogram/HistogramSeries.js', [_modules['Mixins/DerivedSeries.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (DerivedSeriesMixin, SeriesRegistry, U) {
  154. /* *
  155. *
  156. * Copyright (c) 2010-2021 Highsoft AS
  157. * Author: Sebastian Domas
  158. *
  159. * License: www.highcharts.com/license
  160. *
  161. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  162. *
  163. * */
  164. var __extends = (this && this.__extends) || (function () {
  165. var extendStatics = function (d,
  166. b) {
  167. extendStatics = Object.setPrototypeOf ||
  168. ({ __proto__: [] } instanceof Array && function (d,
  169. b) { d.__proto__ = b; }) ||
  170. function (d,
  171. b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  172. return extendStatics(d, b);
  173. };
  174. return function (d, b) {
  175. extendStatics(d, b);
  176. function __() { this.constructor = d; }
  177. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  178. };
  179. })();
  180. var ColumnSeries = SeriesRegistry.seriesTypes.column;
  181. var arrayMax = U.arrayMax,
  182. arrayMin = U.arrayMin,
  183. correctFloat = U.correctFloat,
  184. extend = U.extend,
  185. isNumber = U.isNumber,
  186. merge = U.merge,
  187. objectEach = U.objectEach;
  188. /* ************************************************************************** *
  189. * HISTOGRAM
  190. * ************************************************************************** */
  191. /**
  192. * A dictionary with formulas for calculating number of bins based on the
  193. * base series
  194. **/
  195. var binsNumberFormulas = {
  196. 'square-root': function (baseSeries) {
  197. return Math.ceil(Math.sqrt(baseSeries.options.data.length));
  198. },
  199. 'sturges': function (baseSeries) {
  200. return Math.ceil(Math.log(baseSeries.options.data.length) * Math.LOG2E);
  201. },
  202. 'rice': function (baseSeries) {
  203. return Math.ceil(2 * Math.pow(baseSeries.options.data.length, 1 / 3));
  204. }
  205. };
  206. /**
  207. * Returns a function for mapping number to the closed (right opened) bins
  208. * @private
  209. * @param {Array<number>} bins - Width of the bins
  210. * @return {Function}
  211. **/
  212. function fitToBinLeftClosed(bins) {
  213. return function (y) {
  214. var i = 1;
  215. while (bins[i] <= y) {
  216. i++;
  217. }
  218. return bins[--i];
  219. };
  220. }
  221. /* *
  222. *
  223. * Class
  224. *
  225. * */
  226. /**
  227. * Histogram class
  228. * @private
  229. * @class
  230. * @name Highcharts.seriesTypes.histogram
  231. * @augments Highcharts.Series
  232. */
  233. var HistogramSeries = /** @class */ (function (_super) {
  234. __extends(HistogramSeries, _super);
  235. function HistogramSeries() {
  236. /* *
  237. *
  238. * Static Properties
  239. *
  240. * */
  241. var _this = _super !== null && _super.apply(this,
  242. arguments) || this;
  243. _this.data = void 0;
  244. _this.options = void 0;
  245. _this.points = void 0;
  246. _this.userOptions = void 0;
  247. return _this;
  248. /* eslint-enable valid-jsdoc */
  249. }
  250. /* *
  251. *
  252. * Functions
  253. *
  254. * */
  255. /* eslint-disable valid-jsdoc */
  256. HistogramSeries.prototype.binsNumber = function () {
  257. var binsNumberOption = this.options.binsNumber;
  258. var binsNumber = binsNumberFormulas[binsNumberOption] ||
  259. // #7457
  260. (typeof binsNumberOption === 'function' && binsNumberOption);
  261. return Math.ceil((binsNumber && binsNumber(this.baseSeries)) ||
  262. (isNumber(binsNumberOption) ?
  263. binsNumberOption :
  264. binsNumberFormulas['square-root'](this.baseSeries)));
  265. };
  266. HistogramSeries.prototype.derivedData = function (baseData, binsNumber, binWidth) {
  267. var series = this,
  268. max = correctFloat(arrayMax(baseData)),
  269. // Float correction needed, because first frequency value is not
  270. // corrected when generating frequencies (within for loop).
  271. min = correctFloat(arrayMin(baseData)),
  272. frequencies = [],
  273. bins = {},
  274. data = [],
  275. x,
  276. fitToBin;
  277. binWidth = series.binWidth = (correctFloat(isNumber(binWidth) ?
  278. (binWidth || 1) :
  279. (max - min) / binsNumber));
  280. // #12077 negative pointRange causes wrong calculations,
  281. // browser hanging.
  282. series.options.pointRange = Math.max(binWidth, 0);
  283. // If binWidth is 0 then max and min are equaled,
  284. // increment the x with some positive value to quit the loop
  285. for (x = min;
  286. // This condition is needed because of the margin of error while
  287. // operating on decimal numbers. Without that, additional bin
  288. // was sometimes noticeable on the graph, because of too small
  289. // precision of float correction.
  290. x < max &&
  291. (series.userOptions.binWidth ||
  292. correctFloat(max - x) >= binWidth ||
  293. // #13069 - Every add and subtract operation should
  294. // be corrected, due to general problems with
  295. // operations on float numbers in JS.
  296. correctFloat(correctFloat(min + (frequencies.length * binWidth)) -
  297. x) <= 0); x = correctFloat(x + binWidth)) {
  298. frequencies.push(x);
  299. bins[x] = 0;
  300. }
  301. if (bins[min] !== 0) {
  302. frequencies.push(min);
  303. bins[min] = 0;
  304. }
  305. fitToBin = fitToBinLeftClosed(frequencies.map(function (elem) {
  306. return parseFloat(elem);
  307. }));
  308. baseData.forEach(function (y) {
  309. var x = correctFloat(fitToBin(y));
  310. bins[x]++;
  311. });
  312. objectEach(bins, function (frequency, x) {
  313. data.push({
  314. x: Number(x),
  315. y: frequency,
  316. x2: correctFloat(Number(x) + binWidth)
  317. });
  318. });
  319. data.sort(function (a, b) {
  320. return a.x - b.x;
  321. });
  322. data[data.length - 1].x2 = max;
  323. return data;
  324. };
  325. HistogramSeries.prototype.setDerivedData = function () {
  326. var yData = this.baseSeries.yData;
  327. if (!yData.length) {
  328. this.setData([]);
  329. return;
  330. }
  331. var data = this.derivedData(yData,
  332. this.binsNumber(),
  333. this.options.binWidth);
  334. this.setData(data, false);
  335. };
  336. /**
  337. * A histogram is a column series which represents the distribution of the
  338. * data set in the base series. Histogram splits data into bins and shows
  339. * their frequencies.
  340. *
  341. * @sample {highcharts} highcharts/demo/histogram/
  342. * Histogram
  343. *
  344. * @extends plotOptions.column
  345. * @excluding boostThreshold, dragDrop, pointInterval, pointIntervalUnit,
  346. * stacking, boostBlending
  347. * @product highcharts
  348. * @since 6.0.0
  349. * @requires modules/histogram
  350. * @optionparent plotOptions.histogram
  351. */
  352. HistogramSeries.defaultOptions = merge(ColumnSeries.defaultOptions, {
  353. /**
  354. * A preferable number of bins. It is a suggestion, so a histogram may
  355. * have a different number of bins. By default it is set to the square
  356. * root of the base series' data length. Available options are:
  357. * `square-root`, `sturges`, `rice`. You can also define a function
  358. * which takes a `baseSeries` as a parameter and should return a
  359. * positive integer.
  360. *
  361. * @type {"square-root"|"sturges"|"rice"|number|function}
  362. */
  363. binsNumber: 'square-root',
  364. /**
  365. * Width of each bin. By default the bin's width is calculated as
  366. * `(max - min) / number of bins`. This option takes precedence over
  367. * [binsNumber](#plotOptions.histogram.binsNumber).
  368. *
  369. * @type {number}
  370. */
  371. binWidth: void 0,
  372. pointPadding: 0,
  373. groupPadding: 0,
  374. grouping: false,
  375. pointPlacement: 'between',
  376. tooltip: {
  377. headerFormat: '',
  378. pointFormat: ('<span style="font-size: 10px">{point.x} - {point.x2}' +
  379. '</span><br/>' +
  380. '<span style="color:{point.color}">\u25CF</span>' +
  381. ' {series.name} <b>{point.y}</b><br/>')
  382. }
  383. });
  384. return HistogramSeries;
  385. }(ColumnSeries));
  386. extend(HistogramSeries.prototype, {
  387. addBaseSeriesEvents: DerivedSeriesMixin.addBaseSeriesEvents,
  388. addEvents: DerivedSeriesMixin.addEvents,
  389. destroy: DerivedSeriesMixin.destroy,
  390. hasDerivedData: DerivedSeriesMixin.hasDerivedData,
  391. init: DerivedSeriesMixin.init,
  392. setBaseSeries: DerivedSeriesMixin.setBaseSeries
  393. });
  394. SeriesRegistry.registerSeriesType('histogram', HistogramSeries);
  395. /* *
  396. *
  397. * Default Export
  398. *
  399. * */
  400. /* *
  401. *
  402. * API Options
  403. *
  404. * */
  405. /**
  406. * A `histogram` series. If the [type](#series.histogram.type) option is not
  407. * specified, it is inherited from [chart.type](#chart.type).
  408. *
  409. * @extends series,plotOptions.histogram
  410. * @excluding data, dataParser, dataURL, boostThreshold, boostBlending
  411. * @product highcharts
  412. * @since 6.0.0
  413. * @requires modules/histogram
  414. * @apioption series.histogram
  415. */
  416. /**
  417. * An integer identifying the index to use for the base series, or a string
  418. * representing the id of the series.
  419. *
  420. * @type {number|string}
  421. * @apioption series.histogram.baseSeries
  422. */
  423. ''; // adds doclets above to transpiled file
  424. return HistogramSeries;
  425. });
  426. _registerModule(_modules, 'Series/Bellcurve/BellcurveSeries.js', [_modules['Mixins/DerivedSeries.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (DerivedSeriesMixin, SeriesRegistry, U) {
  427. /* *
  428. *
  429. * (c) 2010-2021 Highsoft AS
  430. *
  431. * Author: Sebastian Domas
  432. *
  433. * License: www.highcharts.com/license
  434. *
  435. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  436. *
  437. * */
  438. var __extends = (this && this.__extends) || (function () {
  439. var extendStatics = function (d,
  440. b) {
  441. extendStatics = Object.setPrototypeOf ||
  442. ({ __proto__: [] } instanceof Array && function (d,
  443. b) { d.__proto__ = b; }) ||
  444. function (d,
  445. b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  446. return extendStatics(d, b);
  447. };
  448. return function (d, b) {
  449. extendStatics(d, b);
  450. function __() { this.constructor = d; }
  451. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  452. };
  453. })();
  454. var AreaSplineSeries = SeriesRegistry.seriesTypes.areaspline;
  455. var correctFloat = U.correctFloat,
  456. extend = U.extend,
  457. isNumber = U.isNumber,
  458. merge = U.merge;
  459. /**
  460. * Bell curve class
  461. *
  462. * @private
  463. * @class
  464. * @name Highcharts.seriesTypes.bellcurve
  465. *
  466. * @augments Highcharts.Series
  467. */
  468. var BellcurveSeries = /** @class */ (function (_super) {
  469. __extends(BellcurveSeries, _super);
  470. function BellcurveSeries() {
  471. /* *
  472. *
  473. * Static Properties
  474. *
  475. * */
  476. var _this = _super !== null && _super.apply(this,
  477. arguments) || this;
  478. /* eslint-enable valid-jsdoc */
  479. /* *
  480. *
  481. * Properties
  482. *
  483. * */
  484. _this.data = void 0;
  485. _this.options = void 0;
  486. _this.points = void 0;
  487. return _this;
  488. /* eslint-enable valid-jsdoc */
  489. }
  490. /* *
  491. *
  492. * Static Functions
  493. *
  494. * */
  495. /* eslint-disable valid-jsdoc */
  496. /**
  497. * @private
  498. */
  499. BellcurveSeries.mean = function (data) {
  500. var length = data.length,
  501. sum = data.reduce(function (sum,
  502. value) {
  503. return (sum += value);
  504. }, 0);
  505. return length > 0 && sum / length;
  506. };
  507. /**
  508. * @private
  509. */
  510. BellcurveSeries.standardDeviation = function (data, average) {
  511. var len = data.length,
  512. sum;
  513. average = isNumber(average) ? average : BellcurveSeries.mean(data);
  514. sum = data.reduce(function (sum, value) {
  515. var diff = value - average;
  516. return (sum += diff * diff);
  517. }, 0);
  518. return len > 1 && Math.sqrt(sum / (len - 1));
  519. };
  520. /**
  521. * @private
  522. */
  523. BellcurveSeries.normalDensity = function (x, mean, standardDeviation) {
  524. var translation = x - mean;
  525. return Math.exp(-(translation * translation) /
  526. (2 * standardDeviation * standardDeviation)) / (standardDeviation * Math.sqrt(2 * Math.PI));
  527. };
  528. /* *
  529. *
  530. * Functions
  531. *
  532. * */
  533. /* eslint-disable valid-jsdoc */
  534. BellcurveSeries.prototype.derivedData = function (mean, standardDeviation) {
  535. var intervals = this.options.intervals,
  536. pointsInInterval = this.options.pointsInInterval,
  537. x = mean - intervals * standardDeviation,
  538. stop = intervals * pointsInInterval * 2 + 1,
  539. increment = standardDeviation / pointsInInterval,
  540. data = [],
  541. i;
  542. for (i = 0; i < stop; i++) {
  543. data.push([x, BellcurveSeries.normalDensity(x, mean, standardDeviation)]);
  544. x += increment;
  545. }
  546. return data;
  547. };
  548. BellcurveSeries.prototype.setDerivedData = function () {
  549. if (this.baseSeries.yData.length > 1) {
  550. this.setMean();
  551. this.setStandardDeviation();
  552. this.setData(this.derivedData(this.mean, this.standardDeviation), false);
  553. }
  554. return (void 0);
  555. };
  556. BellcurveSeries.prototype.setMean = function () {
  557. this.mean = correctFloat(BellcurveSeries.mean(this.baseSeries.yData));
  558. };
  559. BellcurveSeries.prototype.setStandardDeviation = function () {
  560. this.standardDeviation = correctFloat(BellcurveSeries.standardDeviation(this.baseSeries.yData, this.mean));
  561. };
  562. /**
  563. * A bell curve is an areaspline series which represents the probability
  564. * density function of the normal distribution. It calculates mean and
  565. * standard deviation of the base series data and plots the curve according
  566. * to the calculated parameters.
  567. *
  568. * @sample {highcharts} highcharts/demo/bellcurve/
  569. * Bell curve
  570. *
  571. * @extends plotOptions.areaspline
  572. * @since 6.0.0
  573. * @product highcharts
  574. * @excluding boostThreshold, connectNulls, dragDrop, stacking,
  575. * pointInterval, pointIntervalUnit
  576. * @requires modules/bellcurve
  577. * @optionparent plotOptions.bellcurve
  578. */
  579. BellcurveSeries.defaultOptions = merge(AreaSplineSeries.defaultOptions, {
  580. /**
  581. * @see [fillColor](#plotOptions.bellcurve.fillColor)
  582. * @see [fillOpacity](#plotOptions.bellcurve.fillOpacity)
  583. *
  584. * @apioption plotOptions.bellcurve.color
  585. */
  586. /**
  587. * @see [color](#plotOptions.bellcurve.color)
  588. * @see [fillOpacity](#plotOptions.bellcurve.fillOpacity)
  589. *
  590. * @apioption plotOptions.bellcurve.fillColor
  591. */
  592. /**
  593. * @see [color](#plotOptions.bellcurve.color)
  594. * @see [fillColor](#plotOptions.bellcurve.fillColor)
  595. *
  596. * @default {highcharts} 0.75
  597. * @default {highstock} 0.75
  598. * @apioption plotOptions.bellcurve.fillOpacity
  599. */
  600. /**
  601. * This option allows to define the length of the bell curve. A unit of
  602. * the length of the bell curve is standard deviation.
  603. *
  604. * @sample highcharts/plotoptions/bellcurve-intervals-pointsininterval
  605. * Intervals and points in interval
  606. */
  607. intervals: 3,
  608. /**
  609. * Defines how many points should be plotted within 1 interval. See
  610. * `plotOptions.bellcurve.intervals`.
  611. *
  612. * @sample highcharts/plotoptions/bellcurve-intervals-pointsininterval
  613. * Intervals and points in interval
  614. */
  615. pointsInInterval: 3,
  616. marker: {
  617. enabled: false
  618. }
  619. });
  620. return BellcurveSeries;
  621. }(AreaSplineSeries));
  622. extend(BellcurveSeries.prototype, {
  623. addBaseSeriesEvents: DerivedSeriesMixin.addBaseSeriesEvents,
  624. addEvents: DerivedSeriesMixin.addEvents,
  625. destroy: DerivedSeriesMixin.destroy,
  626. init: DerivedSeriesMixin.init,
  627. setBaseSeries: DerivedSeriesMixin.setBaseSeries
  628. });
  629. SeriesRegistry.registerSeriesType('bellcurve', BellcurveSeries);
  630. /* *
  631. *
  632. * Default Export
  633. *
  634. * */
  635. /* *
  636. *
  637. * API Options
  638. *
  639. * */
  640. /**
  641. * A `bellcurve` series. If the [type](#series.bellcurve.type) option is not
  642. * specified, it is inherited from [chart.type](#chart.type).
  643. *
  644. * For options that apply to multiple series, it is recommended to add
  645. * them to the [plotOptions.series](#plotOptions.series) options structure.
  646. * To apply to all series of this specific type, apply it to
  647. * [plotOptions.bellcurve](#plotOptions.bellcurve).
  648. *
  649. * @extends series,plotOptions.bellcurve
  650. * @since 6.0.0
  651. * @product highcharts
  652. * @excluding dataParser, dataURL, data, boostThreshold, boostBlending
  653. * @requires modules/bellcurve
  654. * @apioption series.bellcurve
  655. */
  656. /**
  657. * An integer identifying the index to use for the base series, or a string
  658. * representing the id of the series.
  659. *
  660. * @type {number|string}
  661. * @apioption series.bellcurve.baseSeries
  662. */
  663. /**
  664. * @see [fillColor](#series.bellcurve.fillColor)
  665. * @see [fillOpacity](#series.bellcurve.fillOpacity)
  666. *
  667. * @apioption series.bellcurve.color
  668. */
  669. /**
  670. * @see [color](#series.bellcurve.color)
  671. * @see [fillOpacity](#series.bellcurve.fillOpacity)
  672. *
  673. * @apioption series.bellcurve.fillColor
  674. */
  675. /**
  676. * @see [color](#series.bellcurve.color)
  677. * @see [fillColor](#series.bellcurve.fillColor)
  678. *
  679. * @default {highcharts} 0.75
  680. * @default {highstock} 0.75
  681. * @apioption series.bellcurve.fillOpacity
  682. */
  683. ''; // adds doclets above to transpiled file
  684. return BellcurveSeries;
  685. });
  686. _registerModule(_modules, 'masters/modules/histogram-bellcurve.src.js', [], function () {
  687. });
  688. }));