Pyramid3DSeries.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /* *
  2. *
  3. * Highcharts pyramid3d series module
  4. *
  5. * (c) 2010-2021 Highsoft AS
  6. * Author: Kacper Madej
  7. *
  8. * License: www.highcharts.com/license
  9. *
  10. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  11. *
  12. * */
  13. 'use strict';
  14. var __extends = (this && this.__extends) || (function () {
  15. var extendStatics = function (d, b) {
  16. extendStatics = Object.setPrototypeOf ||
  17. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  18. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  19. return extendStatics(d, b);
  20. };
  21. return function (d, b) {
  22. extendStatics(d, b);
  23. function __() { this.constructor = d; }
  24. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  25. };
  26. })();
  27. import SeriesRegistry from '../../Core/Series/SeriesRegistry.js';
  28. var Funnel3DSeries = SeriesRegistry.seriesTypes.funnel3d;
  29. import U from '../../Core/Utilities.js';
  30. var merge = U.merge;
  31. /* *
  32. *
  33. * Class
  34. *
  35. * */
  36. /**
  37. * The pyramid3d series type.
  38. *
  39. * @constructor seriesTypes.pyramid3d
  40. * @augments seriesTypes.funnel3d
  41. * @requires highcharts-3d
  42. * @requires modules/cylinder
  43. * @requires modules/funnel3d
  44. * @requires modules/pyramid3d
  45. */
  46. var Pyramid3DSeries = /** @class */ (function (_super) {
  47. __extends(Pyramid3DSeries, _super);
  48. function Pyramid3DSeries() {
  49. /* *
  50. *
  51. * Static Properties
  52. *
  53. * */
  54. var _this = _super !== null && _super.apply(this, arguments) || this;
  55. /* *
  56. *
  57. * Properties
  58. *
  59. * */
  60. _this.data = void 0;
  61. _this.options = void 0;
  62. _this.points = void 0;
  63. return _this;
  64. }
  65. /**
  66. * A pyramid3d is a 3d version of pyramid series type. Pyramid charts are
  67. * a type of chart often used to visualize stages in a sales project,
  68. * where the top are the initial stages with the most clients.
  69. *
  70. * @sample highcharts/demo/pyramid3d/
  71. * Pyramid3d
  72. *
  73. * @extends plotOptions.funnel3d
  74. * @excluding neckHeight, neckWidth, dataSorting
  75. * @product highcharts
  76. * @since 7.1.0
  77. * @requires highcharts-3d
  78. * @requires modules/cylinder
  79. * @requires modules/funnel3d
  80. * @requires modules/pyramid3d
  81. * @optionparent plotOptions.pyramid3d
  82. */
  83. Pyramid3DSeries.defaultOptions = merge(Funnel3DSeries.defaultOptions, {
  84. /**
  85. * A reversed pyramid3d is funnel3d, but the latter supports neck
  86. * related options: neckHeight and neckWidth
  87. *
  88. * @product highcharts
  89. */
  90. reversed: true,
  91. neckHeight: 0,
  92. neckWidth: 0,
  93. dataLabels: {
  94. verticalAlign: 'top'
  95. }
  96. });
  97. return Pyramid3DSeries;
  98. }(Funnel3DSeries));
  99. SeriesRegistry.registerSeriesType('pyramid3d', Pyramid3DSeries);
  100. /* *
  101. *
  102. * Default Export
  103. *
  104. * */
  105. export default Pyramid3DSeries;
  106. /* *
  107. *
  108. * API Options
  109. *
  110. * */
  111. /**
  112. * A `pyramid3d` series. If the [type](#series.pyramid3d.type) option is
  113. * not specified, it is inherited from [chart.type](#chart.type).
  114. *
  115. * @since 7.1.0
  116. * @extends series.pyramid,plotOptions.pyramid3d
  117. * @excluding allAreas,boostThreshold,colorAxis,compare,compareBase,dataSorting
  118. * @product highcharts
  119. * @sample {highcharts} highcharts/demo/pyramid3d/ Pyramid3d
  120. * @requires modules/pyramid3d
  121. * @apioption series.pyramid3d
  122. */
  123. /**
  124. * An array of data points for the series. For the `pyramid3d` series
  125. * type, points can be given in the following ways:
  126. *
  127. * 1. An array of numerical values. In this case, the numerical values
  128. * will be interpreted as `y` options. The `x` values will be automatically
  129. * calculated, either starting at 0 and incremented by 1, or from `pointStart`
  130. * and `pointInterval` given in the series options. If the axis has
  131. * categories, these will be used. Example:
  132. *
  133. * ```js
  134. * data: [0, 5, 3, 5]
  135. * ```
  136. *
  137. * 2. An array of objects with named values. The following snippet shows only a
  138. * few settings, see the complete options set below. If the total number of data
  139. * points exceeds the series'
  140. * [turboThreshold](#series.pyramid3d.turboThreshold),
  141. * this option is not available.
  142. *
  143. * ```js
  144. * data: [{
  145. * y: 2,
  146. * name: "Point2",
  147. * color: "#00FF00"
  148. * }, {
  149. * y: 4,
  150. * name: "Point1",
  151. * color: "#FF00FF"
  152. * }]
  153. * ```
  154. *
  155. * @sample {highcharts} highcharts/chart/reflow-true/
  156. * Numerical values
  157. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  158. * Arrays of numeric x and y
  159. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  160. * Arrays of datetime x and y
  161. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  162. * Arrays of point.name and y
  163. * @sample {highcharts} highcharts/series/data-array-of-objects/
  164. * Config objects
  165. *
  166. * @type {Array<number|Array<number>|*>}
  167. * @extends series.funnel3d.data
  168. * @product highcharts
  169. * @apioption series.pyramid3d.data
  170. */
  171. ''; // adds doclets above to the transpiled file