XRangeSeries.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. /* *
  2. *
  3. * X-range series module
  4. *
  5. * (c) 2010-2020 Torstein Honsi, Lars A. V. Cabrera
  6. *
  7. * License: www.highcharts.com/license
  8. *
  9. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  10. *
  11. * */
  12. import Axis from '../Core/Axis/Axis.js';
  13. import BaseSeries from '../Core/Series/Series.js';
  14. import H from '../Core/Globals.js';
  15. import Color from '../Core/Color/Color.js';
  16. var color = Color.parse;
  17. import Point from '../Core/Series/Point.js';
  18. import U from '../Core/Utilities.js';
  19. var addEvent = U.addEvent, clamp = U.clamp, correctFloat = U.correctFloat, defined = U.defined, find = U.find, isNumber = U.isNumber, isObject = U.isObject, merge = U.merge, pick = U.pick;
  20. /* *
  21. * @interface Highcharts.PointOptionsObject in parts/Point.ts
  22. */ /**
  23. * The ending X value of the range point.
  24. * @name Highcharts.PointOptionsObject#x2
  25. * @type {number|undefined}
  26. * @requires modules/xrange
  27. */
  28. import './ColumnSeries.js';
  29. var Series = H.Series, seriesTypes = BaseSeries.seriesTypes, columnType = seriesTypes.column;
  30. /**
  31. * Return color of a point based on its category.
  32. *
  33. * @private
  34. * @function getColorByCategory
  35. *
  36. * @param {object} series
  37. * The series which the point belongs to.
  38. *
  39. * @param {object} point
  40. * The point to calculate its color for.
  41. *
  42. * @return {object}
  43. * Returns an object containing the properties color and colorIndex.
  44. */
  45. function getColorByCategory(series, point) {
  46. var colors = series.options.colors || series.chart.options.colors, colorCount = colors ?
  47. colors.length :
  48. series.chart.options.chart.colorCount, colorIndex = point.y % colorCount, color = colors && colors[colorIndex];
  49. return {
  50. colorIndex: colorIndex,
  51. color: color
  52. };
  53. }
  54. import './ColumnSeries.js';
  55. /**
  56. * @private
  57. * @class
  58. * @name Highcharts.seriesTypes.xrange
  59. *
  60. * @augments Highcharts.Series
  61. */
  62. BaseSeries.seriesType('xrange', 'column'
  63. /**
  64. * The X-range series displays ranges on the X axis, typically time
  65. * intervals with a start and end date.
  66. *
  67. * @sample {highcharts} highcharts/demo/x-range/
  68. * X-range
  69. * @sample {highcharts} highcharts/css/x-range/
  70. * Styled mode X-range
  71. * @sample {highcharts} highcharts/chart/inverted-xrange/
  72. * Inverted X-range
  73. *
  74. * @extends plotOptions.column
  75. * @since 6.0.0
  76. * @product highcharts highstock gantt
  77. * @excluding boostThreshold, crisp, cropThreshold, depth, edgeColor,
  78. * edgeWidth, findNearestPointBy, getExtremesFromAll,
  79. * negativeColor, pointInterval, pointIntervalUnit,
  80. * pointPlacement, pointRange, pointStart, softThreshold,
  81. * stacking, threshold, data, dataSorting, boostBlending
  82. * @requires modules/xrange
  83. * @optionparent plotOptions.xrange
  84. */
  85. , {
  86. /**
  87. * A partial fill for each point, typically used to visualize how much
  88. * of a task is performed. The partial fill object can be set either on
  89. * series or point level.
  90. *
  91. * @sample {highcharts} highcharts/demo/x-range
  92. * X-range with partial fill
  93. *
  94. * @product highcharts highstock gantt
  95. * @apioption plotOptions.xrange.partialFill
  96. */
  97. /**
  98. * The fill color to be used for partial fills. Defaults to a darker
  99. * shade of the point color.
  100. *
  101. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  102. * @product highcharts highstock gantt
  103. * @apioption plotOptions.xrange.partialFill.fill
  104. */
  105. /**
  106. * A partial fill for each point, typically used to visualize how much
  107. * of a task is performed. See [completed](series.gantt.data.completed).
  108. *
  109. * @sample gantt/demo/progress-indicator
  110. * Gantt with progress indicator
  111. *
  112. * @product gantt
  113. * @apioption plotOptions.gantt.partialFill
  114. */
  115. /**
  116. * In an X-range series, this option makes all points of the same Y-axis
  117. * category the same color.
  118. */
  119. colorByPoint: true,
  120. dataLabels: {
  121. formatter: function () {
  122. var point = this.point, amount = point.partialFill;
  123. if (isObject(amount)) {
  124. amount = amount.amount;
  125. }
  126. if (isNumber(amount) && amount > 0) {
  127. return correctFloat(amount * 100) + '%';
  128. }
  129. },
  130. inside: true,
  131. verticalAlign: 'middle'
  132. },
  133. tooltip: {
  134. headerFormat: '<span style="font-size: 10px">{point.x} - {point.x2}</span><br/>',
  135. pointFormat: '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.yCategory}</b><br/>'
  136. },
  137. borderRadius: 3,
  138. pointRange: 0
  139. }, {
  140. type: 'xrange',
  141. parallelArrays: ['x', 'x2', 'y'],
  142. requireSorting: false,
  143. animate: seriesTypes.line.prototype.animate,
  144. cropShoulder: 1,
  145. getExtremesFromAll: true,
  146. autoIncrement: H.noop,
  147. buildKDTree: H.noop,
  148. /* eslint-disable valid-jsdoc */
  149. /**
  150. * @private
  151. * @function Highcarts.seriesTypes.xrange#init
  152. * @return {void}
  153. */
  154. init: function () {
  155. seriesTypes.column.prototype.init.apply(this, arguments);
  156. this.options.stacking = void 0; // #13161
  157. },
  158. /**
  159. * Borrow the column series metrics, but with swapped axes. This gives
  160. * free access to features like groupPadding, grouping, pointWidth etc.
  161. *
  162. * @private
  163. * @function Highcharts.Series#getColumnMetrics
  164. *
  165. * @return {Highcharts.ColumnMetricsObject}
  166. */
  167. getColumnMetrics: function () {
  168. var metrics, chart = this.chart;
  169. /**
  170. * @private
  171. */
  172. function swapAxes() {
  173. chart.series.forEach(function (s) {
  174. var xAxis = s.xAxis;
  175. s.xAxis = s.yAxis;
  176. s.yAxis = xAxis;
  177. });
  178. }
  179. swapAxes();
  180. metrics = columnType.prototype.getColumnMetrics.call(this);
  181. swapAxes();
  182. return metrics;
  183. },
  184. /**
  185. * Override cropData to show a point where x or x2 is outside visible
  186. * range, but one of them is inside.
  187. *
  188. * @private
  189. * @function Highcharts.Series#cropData
  190. *
  191. * @param {Array<number>} xData
  192. *
  193. * @param {Array<number>} yData
  194. *
  195. * @param {number} min
  196. *
  197. * @param {number} max
  198. *
  199. * @param {number} [cropShoulder]
  200. *
  201. * @return {*}
  202. */
  203. cropData: function (xData, yData, min, max) {
  204. // Replace xData with x2Data to find the appropriate cropStart
  205. var cropData = Series.prototype.cropData, crop = cropData.call(this, this.x2Data, yData, min, max);
  206. // Re-insert the cropped xData
  207. crop.xData = xData.slice(crop.start, crop.end);
  208. return crop;
  209. },
  210. /**
  211. * Finds the index of an existing point that matches the given point
  212. * options.
  213. *
  214. * @private
  215. * @function Highcharts.Series#findPointIndex
  216. * @param {object} options The options of the point.
  217. * @returns {number|undefined} Returns index of a matching point,
  218. * returns undefined if no match is found.
  219. */
  220. findPointIndex: function (options) {
  221. var _a = this, cropped = _a.cropped, cropStart = _a.cropStart, points = _a.points;
  222. var id = options.id;
  223. var pointIndex;
  224. if (id) {
  225. var point = find(points, function (point) {
  226. return point.id === id;
  227. });
  228. pointIndex = point ? point.index : void 0;
  229. }
  230. if (typeof pointIndex === 'undefined') {
  231. var point = find(points, function (point) {
  232. return (point.x === options.x &&
  233. point.x2 === options.x2 &&
  234. !point.touched);
  235. });
  236. pointIndex = point ? point.index : void 0;
  237. }
  238. // Reduce pointIndex if data is cropped
  239. if (cropped &&
  240. isNumber(pointIndex) &&
  241. isNumber(cropStart) &&
  242. pointIndex >= cropStart) {
  243. pointIndex -= cropStart;
  244. }
  245. return pointIndex;
  246. },
  247. /**
  248. * @private
  249. * @function Highcharts.Series#translatePoint
  250. *
  251. * @param {Highcharts.Point} point
  252. */
  253. translatePoint: function (point) {
  254. var series = this, xAxis = series.xAxis, yAxis = series.yAxis, metrics = series.columnMetrics, options = series.options, minPointLength = options.minPointLength || 0, plotX = point.plotX, posX = pick(point.x2, point.x + (point.len || 0)), plotX2 = xAxis.translate(posX, 0, 0, 0, 1), length = Math.abs(plotX2 - plotX), widthDifference, shapeArgs, partialFill, inverted = this.chart.inverted, borderWidth = pick(options.borderWidth, 1), crisper = borderWidth % 2 / 2, yOffset = metrics.offset, pointHeight = Math.round(metrics.width), dlLeft, dlRight, dlWidth, clipRectWidth, tooltipYOffset;
  255. if (minPointLength) {
  256. widthDifference = minPointLength - length;
  257. if (widthDifference < 0) {
  258. widthDifference = 0;
  259. }
  260. plotX -= widthDifference / 2;
  261. plotX2 += widthDifference / 2;
  262. }
  263. plotX = Math.max(plotX, -10);
  264. plotX2 = clamp(plotX2, -10, xAxis.len + 10);
  265. // Handle individual pointWidth
  266. if (defined(point.options.pointWidth)) {
  267. yOffset -= ((Math.ceil(point.options.pointWidth) - pointHeight) / 2);
  268. pointHeight = Math.ceil(point.options.pointWidth);
  269. }
  270. // Apply pointPlacement to the Y axis
  271. if (options.pointPlacement &&
  272. isNumber(point.plotY) &&
  273. yAxis.categories) {
  274. point.plotY = yAxis.translate(point.y, 0, 1, 0, 1, options.pointPlacement);
  275. }
  276. point.shapeArgs = {
  277. x: Math.floor(Math.min(plotX, plotX2)) + crisper,
  278. y: Math.floor(point.plotY + yOffset) + crisper,
  279. width: Math.round(Math.abs(plotX2 - plotX)),
  280. height: pointHeight,
  281. r: series.options.borderRadius
  282. };
  283. // Align data labels inside the shape and inside the plot area
  284. dlLeft = point.shapeArgs.x;
  285. dlRight = dlLeft + point.shapeArgs.width;
  286. if (dlLeft < 0 || dlRight > xAxis.len) {
  287. dlLeft = clamp(dlLeft, 0, xAxis.len);
  288. dlRight = clamp(dlRight, 0, xAxis.len);
  289. dlWidth = dlRight - dlLeft;
  290. point.dlBox = merge(point.shapeArgs, {
  291. x: dlLeft,
  292. width: dlRight - dlLeft,
  293. centerX: dlWidth ? dlWidth / 2 : null
  294. });
  295. }
  296. else {
  297. point.dlBox = null;
  298. }
  299. // Tooltip position
  300. var tooltipPos = point.tooltipPos;
  301. var xIndex = !inverted ? 0 : 1;
  302. var yIndex = !inverted ? 1 : 0;
  303. tooltipYOffset = series.columnMetrics ?
  304. series.columnMetrics.offset : -metrics.width / 2;
  305. // Limit position by the correct axis size (#9727)
  306. tooltipPos[xIndex] = clamp(tooltipPos[xIndex] + ((!inverted ? 1 : -1) * (xAxis.reversed ? -1 : 1) *
  307. (length / 2)), 0, xAxis.len - 1);
  308. tooltipPos[yIndex] = clamp(tooltipPos[yIndex] + ((inverted ? -1 : 1) * tooltipYOffset), 0, yAxis.len - 1);
  309. // Add a partShapeArgs to the point, based on the shapeArgs property
  310. partialFill = point.partialFill;
  311. if (partialFill) {
  312. // Get the partial fill amount
  313. if (isObject(partialFill)) {
  314. partialFill = partialFill.amount;
  315. }
  316. // If it was not a number, assume 0
  317. if (!isNumber(partialFill)) {
  318. partialFill = 0;
  319. }
  320. shapeArgs = point.shapeArgs;
  321. point.partShapeArgs = {
  322. x: shapeArgs.x,
  323. y: shapeArgs.y,
  324. width: shapeArgs.width,
  325. height: shapeArgs.height,
  326. r: series.options.borderRadius
  327. };
  328. clipRectWidth = Math.max(Math.round(length * partialFill + point.plotX -
  329. plotX), 0);
  330. point.clipRectArgs = {
  331. x: xAxis.reversed ? // #10717
  332. shapeArgs.x + length - clipRectWidth :
  333. shapeArgs.x,
  334. y: shapeArgs.y,
  335. width: clipRectWidth,
  336. height: shapeArgs.height
  337. };
  338. }
  339. },
  340. /**
  341. * @private
  342. * @function Highcharts.Series#translate
  343. */
  344. translate: function () {
  345. columnType.prototype.translate.apply(this, arguments);
  346. this.points.forEach(function (point) {
  347. this.translatePoint(point);
  348. }, this);
  349. },
  350. /**
  351. * Draws a single point in the series. Needed for partial fill.
  352. *
  353. * This override turns point.graphic into a group containing the
  354. * original graphic and an overlay displaying the partial fill.
  355. *
  356. * @private
  357. * @function Highcharts.Series#drawPoint
  358. *
  359. * @param {Highcharts.Point} point
  360. * An instance of Point in the series.
  361. *
  362. * @param {"animate"|"attr"} verb
  363. * 'animate' (animates changes) or 'attr' (sets options)
  364. */
  365. drawPoint: function (point, verb) {
  366. var series = this, seriesOpts = series.options, renderer = series.chart.renderer, graphic = point.graphic, type = point.shapeType, shapeArgs = point.shapeArgs, partShapeArgs = point.partShapeArgs, clipRectArgs = point.clipRectArgs, pfOptions = point.partialFill, cutOff = seriesOpts.stacking && !seriesOpts.borderRadius, pointState = point.state, stateOpts = (seriesOpts.states[pointState || 'normal'] ||
  367. {}), pointStateVerb = typeof pointState === 'undefined' ?
  368. 'attr' : verb, pointAttr = series.pointAttribs(point, pointState), animation = pick(series.chart.options.chart.animation, stateOpts.animation), fill;
  369. if (!point.isNull && point.visible !== false) {
  370. // Original graphic
  371. if (graphic) { // update
  372. graphic.rect[verb](shapeArgs);
  373. }
  374. else {
  375. point.graphic = graphic = renderer.g('point')
  376. .addClass(point.getClassName())
  377. .add(point.group || series.group);
  378. graphic.rect = renderer[type](merge(shapeArgs))
  379. .addClass(point.getClassName())
  380. .addClass('highcharts-partfill-original')
  381. .add(graphic);
  382. }
  383. // Partial fill graphic
  384. if (partShapeArgs) {
  385. if (graphic.partRect) {
  386. graphic.partRect[verb](merge(partShapeArgs));
  387. graphic.partialClipRect[verb](merge(clipRectArgs));
  388. }
  389. else {
  390. graphic.partialClipRect = renderer.clipRect(clipRectArgs.x, clipRectArgs.y, clipRectArgs.width, clipRectArgs.height);
  391. graphic.partRect =
  392. renderer[type](partShapeArgs)
  393. .addClass('highcharts-partfill-overlay')
  394. .add(graphic)
  395. .clip(graphic.partialClipRect);
  396. }
  397. }
  398. // Presentational
  399. if (!series.chart.styledMode) {
  400. graphic
  401. .rect[verb](pointAttr, animation)
  402. .shadow(seriesOpts.shadow, null, cutOff);
  403. if (partShapeArgs) {
  404. // Ensure pfOptions is an object
  405. if (!isObject(pfOptions)) {
  406. pfOptions = {};
  407. }
  408. if (isObject(seriesOpts.partialFill)) {
  409. pfOptions = merge(seriesOpts.partialFill, pfOptions);
  410. }
  411. fill = (pfOptions.fill ||
  412. color(pointAttr.fill).brighten(-0.3).get() ||
  413. color(point.color || series.color)
  414. .brighten(-0.3).get());
  415. pointAttr.fill = fill;
  416. graphic
  417. .partRect[pointStateVerb](pointAttr, animation)
  418. .shadow(seriesOpts.shadow, null, cutOff);
  419. }
  420. }
  421. }
  422. else if (graphic) {
  423. point.graphic = graphic.destroy(); // #1269
  424. }
  425. },
  426. /**
  427. * @private
  428. * @function Highcharts.Series#drawPoints
  429. */
  430. drawPoints: function () {
  431. var series = this, verb = series.getAnimationVerb();
  432. // Draw the columns
  433. series.points.forEach(function (point) {
  434. series.drawPoint(point, verb);
  435. });
  436. },
  437. /**
  438. * Returns "animate", or "attr" if the number of points is above the
  439. * animation limit.
  440. *
  441. * @private
  442. * @function Highcharts.Series#getAnimationVerb
  443. *
  444. * @return {string}
  445. */
  446. getAnimationVerb: function () {
  447. return (this.chart.pointCount < (this.options.animationLimit || 250) ?
  448. 'animate' :
  449. 'attr');
  450. }
  451. /*
  452. // Override to remove stroke from points. For partial fill.
  453. pointAttribs: function () {
  454. var series = this,
  455. retVal = columnType.prototype.pointAttribs
  456. .apply(series, arguments);
  457. //retVal['stroke-width'] = 0;
  458. return retVal;
  459. }
  460. //*/
  461. /* eslint-enable valid-jsdoc */
  462. }, {
  463. /**
  464. * The ending X value of the range point.
  465. * @name Highcharts.Point#x2
  466. * @type {number|undefined}
  467. * @requires modules/xrange
  468. */
  469. /**
  470. * Extend applyOptions so that `colorByPoint` for x-range means that one
  471. * color is applied per Y axis category.
  472. *
  473. * @private
  474. * @function Highcharts.Point#applyOptions
  475. *
  476. * @return {Highcharts.Series}
  477. */
  478. /* eslint-disable valid-jsdoc */
  479. /**
  480. * @private
  481. */
  482. resolveColor: function () {
  483. var series = this.series, colorByPoint;
  484. if (series.options.colorByPoint && !this.options.color) {
  485. colorByPoint = getColorByCategory(series, this);
  486. if (!series.chart.styledMode) {
  487. this.color = colorByPoint.color;
  488. }
  489. if (!this.options.colorIndex) {
  490. this.colorIndex = colorByPoint.colorIndex;
  491. }
  492. }
  493. else if (!this.color) {
  494. this.color = series.color;
  495. }
  496. },
  497. /**
  498. * Extend init to have y default to 0.
  499. *
  500. * @private
  501. * @function Highcharts.Point#init
  502. *
  503. * @return {Highcharts.Point}
  504. */
  505. init: function () {
  506. Point.prototype.init.apply(this, arguments);
  507. if (!this.y) {
  508. this.y = 0;
  509. }
  510. return this;
  511. },
  512. /**
  513. * @private
  514. * @function Highcharts.Point#setState
  515. */
  516. setState: function () {
  517. Point.prototype.setState.apply(this, arguments);
  518. this.series.drawPoint(this, this.series.getAnimationVerb());
  519. },
  520. /**
  521. * @private
  522. * @function Highcharts.Point#getLabelConfig
  523. *
  524. * @return {Highcharts.PointLabelObject}
  525. */
  526. // Add x2 and yCategory to the available properties for tooltip formats
  527. getLabelConfig: function () {
  528. var point = this, cfg = Point.prototype.getLabelConfig.call(point), yCats = point.series.yAxis.categories;
  529. cfg.x2 = point.x2;
  530. cfg.yCategory = point.yCategory = yCats && yCats[point.y];
  531. return cfg;
  532. },
  533. tooltipDateKeys: ['x', 'x2'],
  534. /**
  535. * @private
  536. * @function Highcharts.Point#isValid
  537. *
  538. * @return {boolean}
  539. */
  540. isValid: function () {
  541. return typeof this.x === 'number' &&
  542. typeof this.x2 === 'number';
  543. }
  544. /* eslint-enable valid-jsdoc */
  545. });
  546. /**
  547. * Max x2 should be considered in xAxis extremes
  548. */
  549. addEvent(Axis, 'afterGetSeriesExtremes', function () {
  550. var axis = this, // eslint-disable-line no-invalid-this
  551. axisSeries = axis.series, dataMax, modMax;
  552. if (axis.isXAxis) {
  553. dataMax = pick(axis.dataMax, -Number.MAX_VALUE);
  554. axisSeries.forEach(function (series) {
  555. if (series.x2Data) {
  556. series.x2Data
  557. .forEach(function (val) {
  558. if (val > dataMax) {
  559. dataMax = val;
  560. modMax = true;
  561. }
  562. });
  563. }
  564. });
  565. if (modMax) {
  566. axis.dataMax = dataMax;
  567. }
  568. }
  569. });
  570. /**
  571. * An `xrange` series. If the [type](#series.xrange.type) option is not
  572. * specified, it is inherited from [chart.type](#chart.type).
  573. *
  574. * @extends series,plotOptions.xrange
  575. * @excluding boostThreshold, crisp, cropThreshold, depth, edgeColor, edgeWidth,
  576. * findNearestPointBy, getExtremesFromAll, negativeColor,
  577. * pointInterval, pointIntervalUnit, pointPlacement, pointRange,
  578. * pointStart, softThreshold, stacking, threshold, dataSorting,
  579. * boostBlending
  580. * @product highcharts highstock gantt
  581. * @requires modules/xrange
  582. * @apioption series.xrange
  583. */
  584. /**
  585. * An array of data points for the series. For the `xrange` series type,
  586. * points can be given in the following ways:
  587. *
  588. * 1. An array of objects with named values. The objects are point configuration
  589. * objects as seen below.
  590. * ```js
  591. * data: [{
  592. * x: Date.UTC(2017, 0, 1),
  593. * x2: Date.UTC(2017, 0, 3),
  594. * name: "Test",
  595. * y: 0,
  596. * color: "#00FF00"
  597. * }, {
  598. * x: Date.UTC(2017, 0, 4),
  599. * x2: Date.UTC(2017, 0, 5),
  600. * name: "Deploy",
  601. * y: 1,
  602. * color: "#FF0000"
  603. * }]
  604. * ```
  605. *
  606. * @sample {highcharts} highcharts/series/data-array-of-objects/
  607. * Config objects
  608. *
  609. * @declare Highcharts.XrangePointOptionsObject
  610. * @type {Array<*>}
  611. * @extends series.line.data
  612. * @product highcharts highstock gantt
  613. * @apioption series.xrange.data
  614. */
  615. /**
  616. * The starting X value of the range point.
  617. *
  618. * @sample {highcharts} highcharts/demo/x-range
  619. * X-range
  620. *
  621. * @type {number}
  622. * @product highcharts highstock gantt
  623. * @apioption series.xrange.data.x
  624. */
  625. /**
  626. * The ending X value of the range point.
  627. *
  628. * @sample {highcharts} highcharts/demo/x-range
  629. * X-range
  630. *
  631. * @type {number}
  632. * @product highcharts highstock gantt
  633. * @apioption series.xrange.data.x2
  634. */
  635. /**
  636. * The Y value of the range point.
  637. *
  638. * @sample {highcharts} highcharts/demo/x-range
  639. * X-range
  640. *
  641. * @type {number}
  642. * @product highcharts highstock gantt
  643. * @apioption series.xrange.data.y
  644. */
  645. /**
  646. * A partial fill for each point, typically used to visualize how much of
  647. * a task is performed. The partial fill object can be set either on series
  648. * or point level.
  649. *
  650. * @sample {highcharts} highcharts/demo/x-range
  651. * X-range with partial fill
  652. *
  653. * @declare Highcharts.XrangePointPartialFillOptionsObject
  654. * @product highcharts highstock gantt
  655. * @apioption series.xrange.data.partialFill
  656. */
  657. /**
  658. * The amount of the X-range point to be filled. Values can be 0-1 and are
  659. * converted to percentages in the default data label formatter.
  660. *
  661. * @type {number}
  662. * @product highcharts highstock gantt
  663. * @apioption series.xrange.data.partialFill.amount
  664. */
  665. /**
  666. * The fill color to be used for partial fills. Defaults to a darker shade
  667. * of the point color.
  668. *
  669. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  670. * @product highcharts highstock gantt
  671. * @apioption series.xrange.data.partialFill.fill
  672. */
  673. ''; // adds doclets above to transpiled file