BarSeries.js 3.3 KB

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