xrange.src.js 23 KB

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