xrange.src.js 22 KB

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