XRangeSeries.js 22 KB

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