BarSeries.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 Series from '../Core/Series/Series.js';
  11. /**
  12. * Bar series type.
  13. *
  14. * @private
  15. * @class
  16. * @name Highcharts.seriesTypes.bar
  17. *
  18. * @augments Highcharts.Series
  19. */
  20. Series.seriesType('bar', 'column',
  21. /**
  22. * A bar series is a special type of column series where the columns are
  23. * horizontal.
  24. *
  25. * @sample highcharts/demo/bar-basic/
  26. * Bar chart
  27. *
  28. * @extends plotOptions.column
  29. * @product highcharts
  30. * @apioption plotOptions.bar
  31. */
  32. /**
  33. * @ignore
  34. */
  35. null, {
  36. inverted: true
  37. });
  38. /**
  39. * A `bar` series. If the [type](#series.bar.type) option is not specified,
  40. * it is inherited from [chart.type](#chart.type).
  41. *
  42. * @extends series,plotOptions.bar
  43. * @excluding connectNulls, dashStyle, dataParser, dataURL, gapSize, gapUnit,
  44. * linecap, lineWidth, marker, connectEnds, step
  45. * @product highcharts
  46. * @apioption series.bar
  47. */
  48. /**
  49. * An array of data points for the series. For the `bar` series type,
  50. * points can be given in the following ways:
  51. *
  52. * 1. An array of numerical values. In this case, the numerical values will be
  53. * interpreted as `y` options. The `x` values will be automatically
  54. * calculated, either starting at 0 and incremented by 1, or from
  55. * `pointStart` and `pointInterval` given in the series options. If the axis
  56. * has categories, these will be used. Example:
  57. * ```js
  58. * data: [0, 5, 3, 5]
  59. * ```
  60. *
  61. * 2. An array of arrays with 2 values. In this case, the values correspond to
  62. * `x,y`. If the first value is a string, it is applied as the name of the
  63. * point, and the `x` value is inferred.
  64. * ```js
  65. * data: [
  66. * [0, 5],
  67. * [1, 10],
  68. * [2, 3]
  69. * ]
  70. * ```
  71. *
  72. * 3. An array of objects with named values. The following snippet shows only a
  73. * few settings, see the complete options set below. If the total number of
  74. * data points exceeds the series'
  75. * [turboThreshold](#series.bar.turboThreshold), this option is not
  76. * available.
  77. * ```js
  78. * data: [{
  79. * x: 1,
  80. * y: 1,
  81. * name: "Point2",
  82. * color: "#00FF00"
  83. * }, {
  84. * x: 1,
  85. * y: 10,
  86. * name: "Point1",
  87. * color: "#FF00FF"
  88. * }]
  89. * ```
  90. *
  91. * @sample {highcharts} highcharts/chart/reflow-true/
  92. * Numerical values
  93. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  94. * Arrays of numeric x and y
  95. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  96. * Arrays of datetime x and y
  97. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  98. * Arrays of point.name and y
  99. * @sample {highcharts} highcharts/series/data-array-of-objects/
  100. * Config objects
  101. *
  102. * @type {Array<number|Array<(number|string),(number|null)>|null|*>}
  103. * @extends series.column.data
  104. * @product highcharts
  105. * @apioption series.bar.data
  106. */
  107. /**
  108. * @excluding halo,lineWidth,lineWidthPlus,marker
  109. * @product highcharts highstock
  110. * @apioption series.bar.states.hover
  111. */
  112. /**
  113. * @excluding halo,lineWidth,lineWidthPlus,marker
  114. * @product highcharts highstock
  115. * @apioption series.bar.states.select
  116. */
  117. ''; // gets doclets above into transpilat