XRangeSeries.js 23 KB

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