xrange.src.js 28 KB

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