AreaSplineRangeSeries.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* *
  2. * (c) 2010-2019 Torstein Honsi
  3. *
  4. * License: www.highcharts.com/license
  5. */
  6. 'use strict';
  7. import H from '../parts/Globals.js';
  8. import '../parts/Utilities.js';
  9. import '../parts/Options.js';
  10. var seriesType = H.seriesType,
  11. seriesTypes = H.seriesTypes;
  12. /**
  13. * The area spline range is a cartesian series type with higher and
  14. * lower Y values along an X axis. The area inside the range is colored, and
  15. * the graph outlining the area is a smoothed spline. Requires
  16. * `highcharts-more.js`.
  17. *
  18. * @sample {highstock|highstock} stock/demo/areasplinerange/
  19. * Area spline range
  20. *
  21. * @extends plotOptions.arearange
  22. * @since 2.3.0
  23. * @excluding step
  24. * @product highcharts highstock
  25. * @apioption plotOptions.areasplinerange
  26. */
  27. seriesType('areasplinerange', 'arearange', null, {
  28. getPointSpline: seriesTypes.spline.prototype.getPointSpline
  29. });
  30. /**
  31. * A `areasplinerange` series. If the [type](#series.areasplinerange.type)
  32. * option is not specified, it is inherited from [chart.type](#chart.type).
  33. *
  34. * @extends series,plotOptions.areasplinerange
  35. * @excluding dataParser, dataURL, stack
  36. * @product highcharts highstock
  37. * @apioption series.areasplinerange
  38. */
  39. /**
  40. * An array of data points for the series. For the `areasplinerange`
  41. * series type, points can be given in the following ways:
  42. *
  43. * 1. An array of arrays with 3 or 2 values. In this case, the values correspond
  44. * to `x,low,high`. If the first value is a string, it is applied as the name
  45. * of the point, and the `x` value is inferred. The `x` value can also be
  46. * omitted, in which case the inner arrays should be of length 2\. Then the
  47. * `x` value is automatically calculated, either starting at 0 and
  48. * incremented by 1, or from `pointStart` and `pointInterval` given in the
  49. * series options.
  50. * ```js
  51. * data: [
  52. * [0, 0, 5],
  53. * [1, 9, 1],
  54. * [2, 5, 2]
  55. * ]
  56. * ```
  57. *
  58. * 2. An array of objects with named values. The following snippet shows only a
  59. * few settings, see the complete options set below. If the total number of
  60. * data points exceeds the series'
  61. * [turboThreshold](#series.areasplinerange.turboThreshold), this option is
  62. * not available.
  63. * ```js
  64. * data: [{
  65. * x: 1,
  66. * low: 5,
  67. * high: 0,
  68. * name: "Point2",
  69. * color: "#00FF00"
  70. * }, {
  71. * x: 1,
  72. * low: 4,
  73. * high: 1,
  74. * name: "Point1",
  75. * color: "#FF00FF"
  76. * }]
  77. * ```
  78. *
  79. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  80. * Arrays of numeric x and y
  81. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  82. * Arrays of datetime x and y
  83. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  84. * Arrays of point.name and y
  85. * @sample {highcharts} highcharts/series/data-array-of-objects/
  86. * Config objects
  87. *
  88. * @type {Array<Array<(number|string),number>|Array<(number|string),number,number>|*>}
  89. * @extends series.arearange.data
  90. * @product highcharts highstock
  91. * @apioption series.areasplinerange.data
  92. */