AreaSplineRangeSeries.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. 'use strict';
  11. var __extends = (this && this.__extends) || (function () {
  12. var extendStatics = function (d, b) {
  13. extendStatics = Object.setPrototypeOf ||
  14. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  15. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  16. return extendStatics(d, b);
  17. };
  18. return function (d, b) {
  19. extendStatics(d, b);
  20. function __() { this.constructor = d; }
  21. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  22. };
  23. })();
  24. import AreaRangeSeries from '../AreaRange/AreaRangeSeries.js';
  25. import SeriesRegistry from '../../Core/Series/SeriesRegistry.js';
  26. var SplineSeries = SeriesRegistry.seriesTypes.spline;
  27. import U from '../../Core/Utilities.js';
  28. var merge = U.merge, extend = U.extend;
  29. /* *
  30. *
  31. * Class
  32. *
  33. * */
  34. /**
  35. * The areasplinerange series type.
  36. *
  37. * @private
  38. * @class
  39. * @name Highcharts.seriesTypes.areasplinerange
  40. *
  41. * @augments Highcharts.Series
  42. */
  43. var AreaSplineRangeSeries = /** @class */ (function (_super) {
  44. __extends(AreaSplineRangeSeries, _super);
  45. function AreaSplineRangeSeries() {
  46. /* *
  47. *
  48. * Static properties
  49. *
  50. * */
  51. var _this = _super !== null && _super.apply(this, arguments) || this;
  52. /* *
  53. *
  54. * Properties
  55. *
  56. * */
  57. _this.options = void 0;
  58. _this.data = void 0;
  59. _this.points = void 0;
  60. return _this;
  61. }
  62. /**
  63. * The area spline range is a cartesian series type with higher and
  64. * lower Y values along an X axis. The area inside the range is colored, and
  65. * the graph outlining the area is a smoothed spline.
  66. *
  67. * @sample {highstock|highstock} stock/demo/areasplinerange/
  68. * Area spline range
  69. *
  70. * @extends plotOptions.arearange
  71. * @since 2.3.0
  72. * @excluding step, boostThreshold, boostBlending
  73. * @product highcharts highstock
  74. * @requires highcharts-more
  75. * @apioption plotOptions.areasplinerange
  76. */
  77. /**
  78. * @see [fillColor](#plotOptions.areasplinerange.fillColor)
  79. * @see [fillOpacity](#plotOptions.areasplinerange.fillOpacity)
  80. *
  81. * @apioption plotOptions.areasplinerange.color
  82. */
  83. /**
  84. * @see [color](#plotOptions.areasplinerange.color)
  85. * @see [fillOpacity](#plotOptions.areasplinerange.fillOpacity)
  86. *
  87. * @apioption plotOptions.areasplinerange.fillColor
  88. */
  89. /**
  90. * @see [color](#plotOptions.areasplinerange.color)
  91. * @see [fillColor](#plotOptions.areasplinerange.fillColor)
  92. *
  93. * @default {highcharts} 0.75
  94. * @default {highstock} 0.75
  95. * @apioption plotOptions.areasplinerange.fillOpacity
  96. */
  97. AreaSplineRangeSeries.defaultOptions = merge(AreaRangeSeries.defaultOptions);
  98. return AreaSplineRangeSeries;
  99. }(AreaRangeSeries));
  100. extend(AreaSplineRangeSeries.prototype, {
  101. getPointSpline: SplineSeries.prototype.getPointSpline
  102. });
  103. SeriesRegistry.registerSeriesType('areasplinerange', AreaSplineRangeSeries);
  104. /* *
  105. *
  106. * Default export
  107. *
  108. * */
  109. export default AreaSplineRangeSeries;
  110. /* *
  111. *
  112. * API options
  113. *
  114. * */
  115. /**
  116. * A `areasplinerange` series. If the [type](#series.areasplinerange.type)
  117. * option is not specified, it is inherited from [chart.type](#chart.type).
  118. *
  119. * @extends series,plotOptions.areasplinerange
  120. * @excluding dataParser, dataURL, stack, step, boostThreshold, boostBlending
  121. * @product highcharts highstock
  122. * @requires highcharts-more
  123. * @apioption series.areasplinerange
  124. */
  125. /**
  126. * @see [fillColor](#series.areasplinerange.fillColor)
  127. * @see [fillOpacity](#series.areasplinerange.fillOpacity)
  128. *
  129. * @apioption series.areasplinerange.color
  130. */
  131. /**
  132. * An array of data points for the series. For the `areasplinerange`
  133. * series type, points can be given in the following ways:
  134. *
  135. * 1. An array of arrays with 3 or 2 values. In this case, the values correspond
  136. * to `x,low,high`. If the first value is a string, it is applied as the name
  137. * of the point, and the `x` value is inferred. The `x` value can also be
  138. * omitted, in which case the inner arrays should be of length 2\. Then the
  139. * `x` value is automatically calculated, either starting at 0 and
  140. * incremented by 1, or from `pointStart` and `pointInterval` given in the
  141. * series options.
  142. * ```js
  143. * data: [
  144. * [0, 0, 5],
  145. * [1, 9, 1],
  146. * [2, 5, 2]
  147. * ]
  148. * ```
  149. *
  150. * 2. An array of objects with named values. The following snippet shows only a
  151. * few settings, see the complete options set below. If the total number of
  152. * data points exceeds the series'
  153. * [turboThreshold](#series.areasplinerange.turboThreshold), this option is
  154. * not available.
  155. * ```js
  156. * data: [{
  157. * x: 1,
  158. * low: 5,
  159. * high: 0,
  160. * name: "Point2",
  161. * color: "#00FF00"
  162. * }, {
  163. * x: 1,
  164. * low: 4,
  165. * high: 1,
  166. * name: "Point1",
  167. * color: "#FF00FF"
  168. * }]
  169. * ```
  170. *
  171. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  172. * Arrays of numeric x and y
  173. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  174. * Arrays of datetime x and y
  175. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  176. * Arrays of point.name and y
  177. * @sample {highcharts} highcharts/series/data-array-of-objects/
  178. * Config objects
  179. *
  180. * @type {Array<Array<(number|string),number>|Array<(number|string),number,number>|*>}
  181. * @extends series.arearange.data
  182. * @product highcharts highstock
  183. * @apioption series.areasplinerange.data
  184. */
  185. /**
  186. * @see [color](#series.areasplinerange.color)
  187. * @see [fillOpacity](#series.areasplinerange.fillOpacity)
  188. *
  189. * @apioption series.areasplinerange.fillColor
  190. */
  191. /**
  192. * @see [color](#series.areasplinerange.color)
  193. * @see [fillColor](#series.areasplinerange.fillColor)
  194. *
  195. * @default {highcharts} 0.75
  196. * @default {highstock} 0.75
  197. * @apioption series.areasplinerange.fillOpacity
  198. */
  199. ''; // adds doclets above to transpiled file