HeatmapSeries.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  1. /* *
  2. *
  3. * (c) 2010-2021 Torstein Honsi
  4. *
  5. * License: www.highcharts.com/license
  6. *
  7. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  8. *
  9. * */
  10. 'use strict';
  11. var __extends = (this && this.__extends) || (function () {
  12. var extendStatics = function (d, b) {
  13. extendStatics = Object.setPrototypeOf ||
  14. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  15. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  16. return extendStatics(d, b);
  17. };
  18. return function (d, b) {
  19. extendStatics(d, b);
  20. function __() { this.constructor = d; }
  21. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  22. };
  23. })();
  24. import ColorMapMixin from '../../Mixins/ColorMapSeries.js';
  25. var colorMapSeriesMixin = ColorMapMixin.colorMapSeriesMixin;
  26. import H from '../../Core/Globals.js';
  27. var noop = H.noop;
  28. import HeatmapPoint from './HeatmapPoint.js';
  29. import LegendSymbolMixin from '../../Mixins/LegendSymbol.js';
  30. import palette from '../../Core/Color/Palette.js';
  31. import SeriesRegistry from '../../Core/Series/SeriesRegistry.js';
  32. var Series = SeriesRegistry.series, _a = SeriesRegistry.seriesTypes, ColumnSeries = _a.column, ScatterSeries = _a.scatter;
  33. import SVGRenderer from '../../Core/Renderer/SVG/SVGRenderer.js';
  34. var symbols = SVGRenderer.prototype.symbols;
  35. import U from '../../Core/Utilities.js';
  36. var extend = U.extend, fireEvent = U.fireEvent, isNumber = U.isNumber, merge = U.merge, pick = U.pick;
  37. /* *
  38. *
  39. * Class
  40. *
  41. * */
  42. /**
  43. * @private
  44. * @class
  45. * @name Highcharts.seriesTypes.heatmap
  46. *
  47. * @augments Highcharts.Series
  48. */
  49. var HeatmapSeries = /** @class */ (function (_super) {
  50. __extends(HeatmapSeries, _super);
  51. function HeatmapSeries() {
  52. /* *
  53. *
  54. * Static Properties
  55. *
  56. * */
  57. var _this = _super !== null && _super.apply(this, arguments) || this;
  58. /* *
  59. *
  60. * Properties
  61. *
  62. * */
  63. _this.colorAxis = void 0;
  64. _this.data = void 0;
  65. _this.options = void 0;
  66. _this.points = void 0;
  67. _this.valueMax = NaN;
  68. _this.valueMin = NaN;
  69. return _this;
  70. /* eslint-enable valid-jsdoc */
  71. }
  72. /* *
  73. *
  74. * Functions
  75. *
  76. * */
  77. /* eslint-disable valid-jsdoc */
  78. /**
  79. * @private
  80. */
  81. HeatmapSeries.prototype.drawPoints = function () {
  82. var _this = this;
  83. // In styled mode, use CSS, otherwise the fill used in the style
  84. // sheet will take precedence over the fill attribute.
  85. var seriesMarkerOptions = this.options.marker || {};
  86. if (seriesMarkerOptions.enabled || this._hasPointMarkers) {
  87. Series.prototype.drawPoints.call(this);
  88. this.points.forEach(function (point) {
  89. point.graphic &&
  90. point.graphic[_this.chart.styledMode ? 'css' : 'animate'](_this.colorAttribs(point));
  91. });
  92. }
  93. };
  94. /**
  95. * @private
  96. */
  97. HeatmapSeries.prototype.getExtremes = function () {
  98. // Get the extremes from the value data
  99. var _a = Series.prototype.getExtremes
  100. .call(this, this.valueData), dataMin = _a.dataMin, dataMax = _a.dataMax;
  101. if (isNumber(dataMin)) {
  102. this.valueMin = dataMin;
  103. }
  104. if (isNumber(dataMax)) {
  105. this.valueMax = dataMax;
  106. }
  107. // Get the extremes from the y data
  108. return Series.prototype.getExtremes.call(this);
  109. };
  110. /**
  111. * Override to also allow null points, used when building the k-d-tree for
  112. * tooltips in boost mode.
  113. * @private
  114. */
  115. HeatmapSeries.prototype.getValidPoints = function (points, insideOnly) {
  116. return Series.prototype.getValidPoints.call(this, points, insideOnly, true);
  117. };
  118. /**
  119. * Define hasData function for non-cartesian series. Returns true if the
  120. * series has points at all.
  121. * @private
  122. */
  123. HeatmapSeries.prototype.hasData = function () {
  124. return !!this.processedXData.length; // != 0
  125. };
  126. /**
  127. * Override the init method to add point ranges on both axes.
  128. * @private
  129. */
  130. HeatmapSeries.prototype.init = function () {
  131. var options;
  132. Series.prototype.init.apply(this, arguments);
  133. options = this.options;
  134. // #3758, prevent resetting in setData
  135. options.pointRange = pick(options.pointRange, options.colsize || 1);
  136. // general point range
  137. this.yAxis.axisPointRange = options.rowsize || 1;
  138. // Bind new symbol names
  139. extend(symbols, {
  140. ellipse: symbols.circle,
  141. rect: symbols.square
  142. });
  143. };
  144. /**
  145. * @private
  146. */
  147. HeatmapSeries.prototype.markerAttribs = function (point, state) {
  148. var pointMarkerOptions = point.marker || {}, seriesMarkerOptions = this.options.marker || {}, seriesStateOptions, pointStateOptions, shapeArgs = point.shapeArgs || {}, hasImage = point.hasImage, attribs = {};
  149. if (hasImage) {
  150. return {
  151. x: point.plotX,
  152. y: point.plotY
  153. };
  154. }
  155. // Setting width and height attributes on image does not affect
  156. // on its dimensions.
  157. if (state) {
  158. seriesStateOptions = seriesMarkerOptions.states[state] || {};
  159. pointStateOptions = pointMarkerOptions.states &&
  160. pointMarkerOptions.states[state] || {};
  161. [['width', 'x'], ['height', 'y']].forEach(function (dimension) {
  162. // Set new width and height basing on state options.
  163. attribs[dimension[0]] = (pointStateOptions[dimension[0]] ||
  164. seriesStateOptions[dimension[0]] ||
  165. shapeArgs[dimension[0]]) + (pointStateOptions[dimension[0] + 'Plus'] ||
  166. seriesStateOptions[dimension[0] + 'Plus'] || 0);
  167. // Align marker by a new size.
  168. attribs[dimension[1]] = shapeArgs[dimension[1]] +
  169. (shapeArgs[dimension[0]] - attribs[dimension[0]]) / 2;
  170. });
  171. }
  172. return state ? attribs : shapeArgs;
  173. };
  174. /**
  175. * @private
  176. */
  177. HeatmapSeries.prototype.pointAttribs = function (point, state) {
  178. var series = this, attr = Series.prototype.pointAttribs.call(series, point, state), seriesOptions = series.options || {}, plotOptions = series.chart.options.plotOptions || {}, seriesPlotOptions = plotOptions.series || {}, heatmapPlotOptions = plotOptions.heatmap || {}, stateOptions, brightness,
  179. // Get old properties in order to keep backward compatibility
  180. borderColor = seriesOptions.borderColor ||
  181. heatmapPlotOptions.borderColor ||
  182. seriesPlotOptions.borderColor, borderWidth = seriesOptions.borderWidth ||
  183. heatmapPlotOptions.borderWidth ||
  184. seriesPlotOptions.borderWidth ||
  185. attr['stroke-width'];
  186. // Apply lineColor, or set it to default series color.
  187. attr.stroke = ((point && point.marker && point.marker.lineColor) ||
  188. (seriesOptions.marker && seriesOptions.marker.lineColor) ||
  189. borderColor ||
  190. this.color);
  191. // Apply old borderWidth property if exists.
  192. attr['stroke-width'] = borderWidth;
  193. if (state) {
  194. stateOptions =
  195. merge(seriesOptions.states[state], seriesOptions.marker &&
  196. seriesOptions.marker.states[state], point &&
  197. point.options.states &&
  198. point.options.states[state] || {});
  199. brightness = stateOptions.brightness;
  200. attr.fill =
  201. stateOptions.color ||
  202. H.color(attr.fill).brighten(brightness || 0).get();
  203. attr.stroke = stateOptions.lineColor;
  204. }
  205. return attr;
  206. };
  207. /**
  208. * @private
  209. */
  210. HeatmapSeries.prototype.setClip = function (animation) {
  211. var series = this, chart = series.chart;
  212. Series.prototype.setClip.apply(series, arguments);
  213. if (series.options.clip !== false || animation) {
  214. series.markerGroup
  215. .clip((animation || series.clipBox) && series.sharedClipKey ?
  216. chart[series.sharedClipKey] :
  217. chart.clipRect);
  218. }
  219. };
  220. /**
  221. * @private
  222. */
  223. HeatmapSeries.prototype.translate = function () {
  224. var series = this, options = series.options, symbol = options.marker && options.marker.symbol || '', shape = symbols[symbol] ? symbol : 'rect', options = series.options, hasRegularShape = ['circle', 'square'].indexOf(shape) !== -1;
  225. series.generatePoints();
  226. series.points.forEach(function (point) {
  227. var pointAttr, sizeDiff, hasImage, cellAttr = point.getCellAttributes(), shapeArgs = {
  228. x: Math.min(cellAttr.x1, cellAttr.x2),
  229. y: Math.min(cellAttr.y1, cellAttr.y2),
  230. width: Math.max(Math.abs(cellAttr.x2 - cellAttr.x1), 0),
  231. height: Math.max(Math.abs(cellAttr.y2 - cellAttr.y1), 0)
  232. };
  233. hasImage = point.hasImage =
  234. (point.marker && point.marker.symbol || symbol || '')
  235. .indexOf('url') === 0;
  236. // If marker shape is regular (symetric), find shorter
  237. // cell's side.
  238. if (hasRegularShape) {
  239. sizeDiff = Math.abs(shapeArgs.width - shapeArgs.height);
  240. shapeArgs.x = Math.min(cellAttr.x1, cellAttr.x2) +
  241. (shapeArgs.width < shapeArgs.height ? 0 : sizeDiff / 2);
  242. shapeArgs.y = Math.min(cellAttr.y1, cellAttr.y2) +
  243. (shapeArgs.width < shapeArgs.height ? sizeDiff / 2 : 0);
  244. shapeArgs.width = shapeArgs.height =
  245. Math.min(shapeArgs.width, shapeArgs.height);
  246. }
  247. pointAttr = {
  248. plotX: (cellAttr.x1 + cellAttr.x2) / 2,
  249. plotY: (cellAttr.y1 + cellAttr.y2) / 2,
  250. clientX: (cellAttr.x1 + cellAttr.x2) / 2,
  251. shapeType: 'path',
  252. shapeArgs: merge(true, shapeArgs, {
  253. d: symbols[shape](shapeArgs.x, shapeArgs.y, shapeArgs.width, shapeArgs.height)
  254. })
  255. };
  256. if (hasImage) {
  257. point.marker = {
  258. width: shapeArgs.width,
  259. height: shapeArgs.height
  260. };
  261. }
  262. extend(point, pointAttr);
  263. });
  264. fireEvent(series, 'afterTranslate');
  265. };
  266. /**
  267. * A heatmap is a graphical representation of data where the individual
  268. * values contained in a matrix are represented as colors.
  269. *
  270. * @productdesc {highcharts}
  271. * Requires `modules/heatmap`.
  272. *
  273. * @sample highcharts/demo/heatmap/
  274. * Simple heatmap
  275. * @sample highcharts/demo/heatmap-canvas/
  276. * Heavy heatmap
  277. *
  278. * @extends plotOptions.scatter
  279. * @excluding animationLimit, connectEnds, connectNulls, cropThreshold,
  280. * dashStyle, findNearestPointBy, getExtremesFromAll, jitter,
  281. * linecap, lineWidth, pointInterval, pointIntervalUnit,
  282. * pointRange, pointStart, shadow, softThreshold, stacking,
  283. * step, threshold, cluster
  284. * @product highcharts highmaps
  285. * @optionparent plotOptions.heatmap
  286. */
  287. HeatmapSeries.defaultOptions = merge(ScatterSeries.defaultOptions, {
  288. /**
  289. * Animation is disabled by default on the heatmap series.
  290. */
  291. animation: false,
  292. /**
  293. * The border width for each heat map item.
  294. */
  295. borderWidth: 0,
  296. /**
  297. * Padding between the points in the heatmap.
  298. *
  299. * @type {number}
  300. * @default 0
  301. * @since 6.0
  302. * @apioption plotOptions.heatmap.pointPadding
  303. */
  304. /**
  305. * @default value
  306. * @apioption plotOptions.heatmap.colorKey
  307. */
  308. /**
  309. * The main color of the series. In heat maps this color is rarely used,
  310. * as we mostly use the color to denote the value of each point. Unless
  311. * options are set in the [colorAxis](#colorAxis), the default value
  312. * is pulled from the [options.colors](#colors) array.
  313. *
  314. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  315. * @since 4.0
  316. * @product highcharts
  317. * @apioption plotOptions.heatmap.color
  318. */
  319. /**
  320. * The column size - how many X axis units each column in the heatmap
  321. * should span.
  322. *
  323. * @sample {highcharts} maps/demo/heatmap/
  324. * One day
  325. * @sample {highmaps} maps/demo/heatmap/
  326. * One day
  327. *
  328. * @type {number}
  329. * @default 1
  330. * @since 4.0
  331. * @product highcharts highmaps
  332. * @apioption plotOptions.heatmap.colsize
  333. */
  334. /**
  335. * The row size - how many Y axis units each heatmap row should span.
  336. *
  337. * @sample {highcharts} maps/demo/heatmap/
  338. * 1 by default
  339. * @sample {highmaps} maps/demo/heatmap/
  340. * 1 by default
  341. *
  342. * @type {number}
  343. * @default 1
  344. * @since 4.0
  345. * @product highcharts highmaps
  346. * @apioption plotOptions.heatmap.rowsize
  347. */
  348. /**
  349. * The color applied to null points. In styled mode, a general CSS class
  350. * is applied instead.
  351. *
  352. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  353. */
  354. nullColor: palette.neutralColor3,
  355. dataLabels: {
  356. formatter: function () {
  357. return this.point.value;
  358. },
  359. inside: true,
  360. verticalAlign: 'middle',
  361. crop: false,
  362. overflow: false,
  363. padding: 0 // #3837
  364. },
  365. /**
  366. * @excluding radius, enabledThreshold
  367. * @since 8.1
  368. */
  369. marker: {
  370. /**
  371. * A predefined shape or symbol for the marker. When undefined, the
  372. * symbol is pulled from options.symbols. Other possible values are
  373. * `'circle'`, `'square'`,`'diamond'`, `'triangle'`,
  374. * `'triangle-down'`, `'rect'`, and `'ellipse'`.
  375. *
  376. * Additionally, the URL to a graphic can be given on this form:
  377. * `'url(graphic.png)'`. Note that for the image to be applied to
  378. * exported charts, its URL needs to be accessible by the export
  379. * server.
  380. *
  381. * Custom callbacks for symbol path generation can also be added to
  382. * `Highcharts.SVGRenderer.prototype.symbols`. The callback is then
  383. * used by its method name, as shown in the demo.
  384. *
  385. * @sample {highcharts} highcharts/plotoptions/series-marker-symbol/
  386. * Predefined, graphic and custom markers
  387. * @sample {highstock} highcharts/plotoptions/series-marker-symbol/
  388. * Predefined, graphic and custom markers
  389. */
  390. symbol: 'rect',
  391. /** @ignore-option */
  392. radius: 0,
  393. lineColor: void 0,
  394. states: {
  395. /**
  396. * @excluding radius, radiusPlus
  397. */
  398. hover: {
  399. /**
  400. * Set the marker's fixed width on hover state.
  401. *
  402. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  403. * 70px fixed marker's width and height on hover
  404. *
  405. * @type {number|undefined}
  406. * @default undefined
  407. * @product highcharts highmaps
  408. * @apioption plotOptions.heatmap.marker.states.hover.width
  409. */
  410. /**
  411. * Set the marker's fixed height on hover state.
  412. *
  413. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  414. * 70px fixed marker's width and height on hover
  415. *
  416. * @type {number|undefined}
  417. * @default undefined
  418. * @product highcharts highmaps
  419. * @apioption plotOptions.heatmap.marker.states.hover.height
  420. */
  421. /**
  422. * The number of pixels to increase the width of the
  423. * selected point.
  424. *
  425. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  426. * 20px greater width and height on hover
  427. *
  428. * @type {number|undefined}
  429. * @default undefined
  430. * @product highcharts highmaps
  431. * @apioption plotOptions.heatmap.marker.states.hover.widthPlus
  432. */
  433. /**
  434. * The number of pixels to increase the height of the
  435. * selected point.
  436. *
  437. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  438. * 20px greater width and height on hover
  439. *
  440. * @type {number|undefined}
  441. * @default undefined
  442. * @product highcharts highmaps
  443. * @apioption plotOptions.heatmap.marker.states.hover.heightPlus
  444. */
  445. /**
  446. * The additional line width for a hovered point.
  447. *
  448. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  449. * 5 pixels wider lineWidth on hover
  450. * @sample {highmaps} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  451. * 5 pixels wider lineWidth on hover
  452. */
  453. lineWidthPlus: 0
  454. },
  455. /**
  456. * @excluding radius
  457. */
  458. select: {
  459. /**
  460. * Set the marker's fixed width on select state.
  461. *
  462. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  463. * 70px fixed marker's width and height on hover
  464. *
  465. * @type {number|undefined}
  466. * @default undefined
  467. * @product highcharts highmaps
  468. * @apioption plotOptions.heatmap.marker.states.select.width
  469. */
  470. /**
  471. * Set the marker's fixed height on select state.
  472. *
  473. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  474. * 70px fixed marker's width and height on hover
  475. *
  476. * @type {number|undefined}
  477. * @default undefined
  478. * @product highcharts highmaps
  479. * @apioption plotOptions.heatmap.marker.states.select.height
  480. */
  481. /**
  482. * The number of pixels to increase the width of the
  483. * selected point.
  484. *
  485. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  486. * 20px greater width and height on hover
  487. *
  488. * @type {number|undefined}
  489. * @default undefined
  490. * @product highcharts highmaps
  491. * @apioption plotOptions.heatmap.marker.states.select.widthPlus
  492. */
  493. /**
  494. * The number of pixels to increase the height of the
  495. * selected point.
  496. *
  497. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  498. * 20px greater width and height on hover
  499. *
  500. * @type {number|undefined}
  501. * @default undefined
  502. * @product highcharts highmaps
  503. * @apioption plotOptions.heatmap.marker.states.select.heightPlus
  504. */
  505. }
  506. }
  507. },
  508. clip: true,
  509. /** @ignore-option */
  510. pointRange: null,
  511. tooltip: {
  512. pointFormat: '{point.x}, {point.y}: {point.value}<br/>'
  513. },
  514. states: {
  515. hover: {
  516. /** @ignore-option */
  517. halo: false,
  518. /**
  519. * How much to brighten the point on interaction. Requires the
  520. * main color to be defined in hex or rgb(a) format.
  521. *
  522. * In styled mode, the hover brightening is by default replaced
  523. * with a fill-opacity set in the `.highcharts-point:hover`
  524. * rule.
  525. */
  526. brightness: 0.2
  527. }
  528. }
  529. });
  530. return HeatmapSeries;
  531. }(ScatterSeries));
  532. extend(HeatmapSeries.prototype, {
  533. /**
  534. * @private
  535. */
  536. alignDataLabel: ColumnSeries.prototype.alignDataLabel,
  537. axisTypes: colorMapSeriesMixin.axisTypes,
  538. colorAttribs: colorMapSeriesMixin.colorAttribs,
  539. colorKey: colorMapSeriesMixin.colorKey,
  540. directTouch: true,
  541. /**
  542. * @private
  543. */
  544. drawLegendSymbol: LegendSymbolMixin.drawRectangle,
  545. /**
  546. * @ignore
  547. * @deprecated
  548. */
  549. getBox: noop,
  550. getExtremesFromAll: true,
  551. getSymbol: Series.prototype.getSymbol,
  552. hasPointSpecificOptions: true,
  553. parallelArrays: colorMapSeriesMixin.parallelArrays,
  554. pointArrayMap: ['y', 'value'],
  555. pointClass: HeatmapPoint,
  556. trackerGroups: colorMapSeriesMixin.trackerGroups
  557. });
  558. SeriesRegistry.registerSeriesType('heatmap', HeatmapSeries);
  559. /* *
  560. *
  561. * Default Export
  562. *
  563. * */
  564. export default HeatmapSeries;
  565. /* *
  566. *
  567. * API Declarations
  568. *
  569. * */
  570. /**
  571. * Heatmap series only. Padding between the points in the heatmap.
  572. * @name Highcharts.Point#pointPadding
  573. * @type {number|undefined}
  574. */
  575. /**
  576. * Heatmap series only. The value of the point, resulting in a color
  577. * controled by options as set in the colorAxis configuration.
  578. * @name Highcharts.Point#value
  579. * @type {number|null|undefined}
  580. */
  581. /* *
  582. * @interface Highcharts.PointOptionsObject in parts/Point.ts
  583. */ /**
  584. * Heatmap series only. Point padding for a single point.
  585. * @name Highcharts.PointOptionsObject#pointPadding
  586. * @type {number|undefined}
  587. */ /**
  588. * Heatmap series only. The value of the point, resulting in a color controled
  589. * by options as set in the colorAxis configuration.
  590. * @name Highcharts.PointOptionsObject#value
  591. * @type {number|null|undefined}
  592. */
  593. ''; // detach doclets above
  594. /* *
  595. *
  596. * API Options
  597. *
  598. * */
  599. /**
  600. * A `heatmap` series. If the [type](#series.heatmap.type) option is
  601. * not specified, it is inherited from [chart.type](#chart.type).
  602. *
  603. * @productdesc {highcharts}
  604. * Requires `modules/heatmap`.
  605. *
  606. * @extends series,plotOptions.heatmap
  607. * @excluding cropThreshold, dataParser, dataURL, pointRange, stack,
  608. * @product highcharts highmaps
  609. * @apioption series.heatmap
  610. */
  611. /**
  612. * An array of data points for the series. For the `heatmap` series
  613. * type, points can be given in the following ways:
  614. *
  615. * 1. An array of arrays with 3 or 2 values. In this case, the values
  616. * correspond to `x,y,value`. If the first value is a string, it is
  617. * applied as the name of the point, and the `x` value is inferred.
  618. * The `x` value can also be omitted, in which case the inner arrays
  619. * should be of length 2\. Then the `x` value is automatically calculated,
  620. * either starting at 0 and incremented by 1, or from `pointStart`
  621. * and `pointInterval` given in the series options.
  622. *
  623. * ```js
  624. * data: [
  625. * [0, 9, 7],
  626. * [1, 10, 4],
  627. * [2, 6, 3]
  628. * ]
  629. * ```
  630. *
  631. * 2. An array of objects with named values. The following snippet shows only a
  632. * few settings, see the complete options set below. If the total number of data
  633. * points exceeds the series' [turboThreshold](#series.heatmap.turboThreshold),
  634. * this option is not available.
  635. *
  636. * ```js
  637. * data: [{
  638. * x: 1,
  639. * y: 3,
  640. * value: 10,
  641. * name: "Point2",
  642. * color: "#00FF00"
  643. * }, {
  644. * x: 1,
  645. * y: 7,
  646. * value: 10,
  647. * name: "Point1",
  648. * color: "#FF00FF"
  649. * }]
  650. * ```
  651. *
  652. * @sample {highcharts} highcharts/chart/reflow-true/
  653. * Numerical values
  654. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  655. * Arrays of numeric x and y
  656. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  657. * Arrays of datetime x and y
  658. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  659. * Arrays of point.name and y
  660. * @sample {highcharts} highcharts/series/data-array-of-objects/
  661. * Config objects
  662. *
  663. * @type {Array<Array<number>|*>}
  664. * @extends series.line.data
  665. * @product highcharts highmaps
  666. * @apioption series.heatmap.data
  667. */
  668. /**
  669. * The color of the point. In heat maps the point color is rarely set
  670. * explicitly, as we use the color to denote the `value`. Options for
  671. * this are set in the [colorAxis](#colorAxis) configuration.
  672. *
  673. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  674. * @product highcharts highmaps
  675. * @apioption series.heatmap.data.color
  676. */
  677. /**
  678. * The value of the point, resulting in a color controled by options
  679. * as set in the [colorAxis](#colorAxis) configuration.
  680. *
  681. * @type {number}
  682. * @product highcharts highmaps
  683. * @apioption series.heatmap.data.value
  684. */
  685. /**
  686. * The x value of the point. For datetime axes,
  687. * the X value is the timestamp in milliseconds since 1970.
  688. *
  689. * @type {number}
  690. * @product highcharts highmaps
  691. * @apioption series.heatmap.data.x
  692. */
  693. /**
  694. * The y value of the point.
  695. *
  696. * @type {number}
  697. * @product highcharts highmaps
  698. * @apioption series.heatmap.data.y
  699. */
  700. /**
  701. * Point padding for a single point.
  702. *
  703. * @sample maps/plotoptions/tilemap-pointpadding
  704. * Point padding on tiles
  705. *
  706. * @type {number}
  707. * @product highcharts highmaps
  708. * @apioption series.heatmap.data.pointPadding
  709. */
  710. /**
  711. * @excluding radius, enabledThreshold
  712. * @product highcharts highmaps
  713. * @since 8.1
  714. * @apioption series.heatmap.data.marker
  715. */
  716. /**
  717. * @excluding radius, enabledThreshold
  718. * @product highcharts highmaps
  719. * @since 8.1
  720. * @apioption series.heatmap.marker
  721. */
  722. /**
  723. * @excluding radius, radiusPlus
  724. * @product highcharts highmaps
  725. * @apioption series.heatmap.marker.states.hover
  726. */
  727. /**
  728. * @excluding radius
  729. * @product highcharts highmaps
  730. * @apioption series.heatmap.marker.states.select
  731. */
  732. /**
  733. * @excluding radius, radiusPlus
  734. * @product highcharts highmaps
  735. * @apioption series.heatmap.data.marker.states.hover
  736. */
  737. /**
  738. * @excluding radius
  739. * @product highcharts highmaps
  740. * @apioption series.heatmap.data.marker.states.select
  741. */
  742. /**
  743. * Set the marker's fixed width on hover state.
  744. *
  745. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  746. * 5 pixels wider lineWidth on hover
  747. *
  748. * @type {number|undefined}
  749. * @default 0
  750. * @product highcharts highmaps
  751. * @apioption series.heatmap.marker.states.hover.lineWidthPlus
  752. */
  753. /**
  754. * Set the marker's fixed width on hover state.
  755. *
  756. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  757. * 70px fixed marker's width and height on hover
  758. *
  759. * @type {number|undefined}
  760. * @default undefined
  761. * @product highcharts highmaps
  762. * @apioption series.heatmap.marker.states.hover.width
  763. */
  764. /**
  765. * Set the marker's fixed height on hover state.
  766. *
  767. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  768. * 70px fixed marker's width and height on hover
  769. *
  770. * @type {number|undefined}
  771. * @default undefined
  772. * @product highcharts highmaps
  773. * @apioption series.heatmap.marker.states.hover.height
  774. */
  775. /**
  776. * The number of pixels to increase the width of the
  777. * hovered point.
  778. *
  779. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  780. * One day
  781. *
  782. * @type {number|undefined}
  783. * @default undefined
  784. * @product highcharts highmaps
  785. * @apioption series.heatmap.marker.states.hover.widthPlus
  786. */
  787. /**
  788. * The number of pixels to increase the height of the
  789. * hovered point.
  790. *
  791. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  792. * One day
  793. *
  794. * @type {number|undefined}
  795. * @default undefined
  796. * @product highcharts highmaps
  797. * @apioption series.heatmap.marker.states.hover.heightPlus
  798. */
  799. /**
  800. * The number of pixels to increase the width of the
  801. * hovered point.
  802. *
  803. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  804. * One day
  805. *
  806. * @type {number|undefined}
  807. * @default undefined
  808. * @product highcharts highmaps
  809. * @apioption series.heatmap.marker.states.select.widthPlus
  810. */
  811. /**
  812. * The number of pixels to increase the height of the
  813. * hovered point.
  814. *
  815. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  816. * One day
  817. *
  818. * @type {number|undefined}
  819. * @default undefined
  820. * @product highcharts highmaps
  821. * @apioption series.heatmap.marker.states.select.heightPlus
  822. */
  823. /**
  824. * Set the marker's fixed width on hover state.
  825. *
  826. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  827. * 5 pixels wider lineWidth on hover
  828. *
  829. * @type {number|undefined}
  830. * @default 0
  831. * @product highcharts highmaps
  832. * @apioption series.heatmap.data.marker.states.hover.lineWidthPlus
  833. */
  834. /**
  835. * Set the marker's fixed width on hover state.
  836. *
  837. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  838. * 70px fixed marker's width and height on hover
  839. *
  840. * @type {number|undefined}
  841. * @default undefined
  842. * @product highcharts highmaps
  843. * @apioption series.heatmap.data.marker.states.hover.width
  844. */
  845. /**
  846. * Set the marker's fixed height on hover state.
  847. *
  848. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  849. * 70px fixed marker's width and height on hover
  850. *
  851. * @type {number|undefined}
  852. * @default undefined
  853. * @product highcharts highmaps
  854. * @apioption series.heatmap.data.marker.states.hover.height
  855. */
  856. /**
  857. * The number of pixels to increase the width of the
  858. * hovered point.
  859. *
  860. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  861. * One day
  862. *
  863. * @type {number|undefined}
  864. * @default undefined
  865. * @product highcharts highstock
  866. * @apioption series.heatmap.data.marker.states.hover.widthPlus
  867. */
  868. /**
  869. * The number of pixels to increase the height of the
  870. * hovered point.
  871. *
  872. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  873. * One day
  874. *
  875. * @type {number|undefined}
  876. * @default undefined
  877. * @product highcharts highstock
  878. * @apioption series.heatmap.data.marker.states.hover.heightPlus
  879. */
  880. /**
  881. * Set the marker's fixed width on select state.
  882. *
  883. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  884. * 70px fixed marker's width and height on hover
  885. *
  886. * @type {number|undefined}
  887. * @default undefined
  888. * @product highcharts highmaps
  889. * @apioption series.heatmap.data.marker.states.select.width
  890. */
  891. /**
  892. * Set the marker's fixed height on select state.
  893. *
  894. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  895. * 70px fixed marker's width and height on hover
  896. *
  897. * @type {number|undefined}
  898. * @default undefined
  899. * @product highcharts highmaps
  900. * @apioption series.heatmap.data.marker.states.select.height
  901. */
  902. /**
  903. * The number of pixels to increase the width of the
  904. * hovered point.
  905. *
  906. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  907. * One day
  908. *
  909. * @type {number|undefined}
  910. * @default undefined
  911. * @product highcharts highstock
  912. * @apioption series.heatmap.data.marker.states.select.widthPlus
  913. */
  914. /**
  915. * The number of pixels to increase the height of the
  916. * hovered point.
  917. *
  918. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  919. * One day
  920. *
  921. * @type {number|undefined}
  922. * @default undefined
  923. * @product highcharts highstock
  924. * @apioption series.heatmap.data.marker.states.select.heightPlus
  925. */
  926. ''; // adds doclets above to transpiled file