AreaSplineSeries.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* *
  2. *
  3. * (c) 2010-2020 Torstein Honsi
  4. *
  5. * License: www.highcharts.com/license
  6. *
  7. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  8. *
  9. * */
  10. import BaseSeries from '../Core/Series/Series.js';
  11. import LegendSymbolMixin from '../Mixins/LegendSymbol.js';
  12. import O from '../Core/Options.js';
  13. var defaultOptions = O.defaultOptions;
  14. import './AreaSeries.js';
  15. import './SplineSeries.js';
  16. var areaProto = BaseSeries.seriesTypes.area.prototype;
  17. /**
  18. * AreaSpline series type.
  19. *
  20. * @private
  21. * @class
  22. * @name Highcharts.seriesTypes.areaspline
  23. *
  24. * @augments Highcharts.Series
  25. */
  26. BaseSeries.seriesType('areaspline', 'spline',
  27. /**
  28. * The area spline series is an area series where the graph between the
  29. * points is smoothed into a spline.
  30. *
  31. * @sample {highcharts} highcharts/demo/areaspline/
  32. * Area spline chart
  33. * @sample {highstock} stock/demo/areaspline/
  34. * Area spline chart
  35. *
  36. * @extends plotOptions.area
  37. * @excluding step, boostThreshold, boostBlending
  38. * @product highcharts highstock
  39. * @apioption plotOptions.areaspline
  40. */
  41. /**
  42. * @see [fillColor](#plotOptions.areaspline.fillColor)
  43. * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)
  44. *
  45. * @apioption plotOptions.areaspline.color
  46. */
  47. /**
  48. * @see [color](#plotOptions.areaspline.color)
  49. * @see [fillOpacity](#plotOptions.areaspline.fillOpacity)
  50. *
  51. * @apioption plotOptions.areaspline.fillColor
  52. */
  53. /**
  54. * @see [color](#plotOptions.areaspline.color)
  55. * @see [fillColor](#plotOptions.areaspline.fillColor)
  56. *
  57. * @default {highcharts} 0.75
  58. * @default {highstock} 0.75
  59. * @apioption plotOptions.areaspline.fillOpacity
  60. */
  61. defaultOptions.plotOptions.area, {
  62. getStackPoints: areaProto.getStackPoints,
  63. getGraphPath: areaProto.getGraphPath,
  64. drawGraph: areaProto.drawGraph,
  65. drawLegendSymbol: LegendSymbolMixin.drawRectangle
  66. });
  67. /**
  68. * A `areaspline` series. If the [type](#series.areaspline.type) option
  69. * is not specified, it is inherited from [chart.type](#chart.type).
  70. *
  71. *
  72. * @extends series,plotOptions.areaspline
  73. * @excluding dataParser, dataURL, step, boostThreshold, boostBlending
  74. * @product highcharts highstock
  75. * @apioption series.areaspline
  76. */
  77. /**
  78. * @see [fillColor](#series.areaspline.fillColor)
  79. * @see [fillOpacity](#series.areaspline.fillOpacity)
  80. *
  81. * @apioption series.areaspline.color
  82. */
  83. /**
  84. * An array of data points for the series. For the `areaspline` series
  85. * type, points can be given in the following ways:
  86. *
  87. * 1. An array of numerical values. In this case, the numerical values will be
  88. * interpreted as `y` options. The `x` values will be automatically
  89. * calculated, either starting at 0 and incremented by 1, or from
  90. * `pointStart` and `pointInterval` given in the series options. If the axis
  91. * has categories, these will be used. Example:
  92. * ```js
  93. * data: [0, 5, 3, 5]
  94. * ```
  95. *
  96. * 2. An array of arrays with 2 values. In this case, the values correspond to
  97. * `x,y`. If the first value is a string, it is applied as the name of the
  98. * point, and the `x` value is inferred.
  99. * ```js
  100. * data: [
  101. * [0, 10],
  102. * [1, 9],
  103. * [2, 3]
  104. * ]
  105. * ```
  106. *
  107. * 3. An array of objects with named values. The following snippet shows only a
  108. * few settings, see the complete options set below. If the total number of
  109. * data points exceeds the series'
  110. * [turboThreshold](#series.areaspline.turboThreshold), this option is not
  111. * available.
  112. * ```js
  113. * data: [{
  114. * x: 1,
  115. * y: 4,
  116. * name: "Point2",
  117. * color: "#00FF00"
  118. * }, {
  119. * x: 1,
  120. * y: 4,
  121. * name: "Point1",
  122. * color: "#FF00FF"
  123. * }]
  124. * ```
  125. *
  126. * @sample {highcharts} highcharts/chart/reflow-true/
  127. * Numerical values
  128. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  129. * Arrays of numeric x and y
  130. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  131. * Arrays of datetime x and y
  132. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  133. * Arrays of point.name and y
  134. * @sample {highcharts} highcharts/series/data-array-of-objects/
  135. * Config objects
  136. *
  137. * @type {Array<number|Array<(number|string),(number|null)>|null|*>}
  138. * @extends series.line.data
  139. * @product highcharts highstock
  140. * @apioption series.areaspline.data
  141. */
  142. /**
  143. * @see [color](#series.areaspline.color)
  144. * @see [fillOpacity](#series.areaspline.fillOpacity)
  145. *
  146. * @apioption series.areaspline.fillColor
  147. */
  148. /**
  149. * @see [color](#series.areaspline.color)
  150. * @see [fillColor](#series.areaspline.fillColor)
  151. *
  152. * @default {highcharts} 0.75
  153. * @default {highstock} 0.75
  154. * @apioption series.areaspline.fillOpacity
  155. */
  156. ''; // adds doclets above into transpilat