HeatmapSeries.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  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. });
  142. };
  143. /**
  144. * @private
  145. */
  146. HeatmapSeries.prototype.markerAttribs = function (point, state) {
  147. var pointMarkerOptions = point.marker || {}, seriesMarkerOptions = this.options.marker || {}, seriesStateOptions, pointStateOptions, shapeArgs = point.shapeArgs || {}, hasImage = point.hasImage, attribs = {};
  148. if (hasImage) {
  149. return {
  150. x: point.plotX,
  151. y: point.plotY
  152. };
  153. }
  154. // Setting width and height attributes on image does not affect
  155. // on its dimensions.
  156. if (state) {
  157. seriesStateOptions = seriesMarkerOptions.states[state] || {};
  158. pointStateOptions = pointMarkerOptions.states &&
  159. pointMarkerOptions.states[state] || {};
  160. [['width', 'x'], ['height', 'y']].forEach(function (dimension) {
  161. // Set new width and height basing on state options.
  162. attribs[dimension[0]] = (pointStateOptions[dimension[0]] ||
  163. seriesStateOptions[dimension[0]] ||
  164. shapeArgs[dimension[0]]) + (pointStateOptions[dimension[0] + 'Plus'] ||
  165. seriesStateOptions[dimension[0] + 'Plus'] || 0);
  166. // Align marker by a new size.
  167. attribs[dimension[1]] =
  168. shapeArgs[dimension[1]] +
  169. (shapeArgs[dimension[0]] -
  170. attribs[dimension[0]]) / 2;
  171. });
  172. }
  173. return state ? attribs : shapeArgs;
  174. };
  175. /**
  176. * @private
  177. */
  178. HeatmapSeries.prototype.pointAttribs = function (point, state) {
  179. 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,
  180. // Get old properties in order to keep backward compatibility
  181. borderColor = seriesOptions.borderColor ||
  182. heatmapPlotOptions.borderColor ||
  183. seriesPlotOptions.borderColor, borderWidth = seriesOptions.borderWidth ||
  184. heatmapPlotOptions.borderWidth ||
  185. seriesPlotOptions.borderWidth ||
  186. attr['stroke-width'];
  187. // Apply lineColor, or set it to default series color.
  188. attr.stroke = ((point && point.marker && point.marker.lineColor) ||
  189. (seriesOptions.marker && seriesOptions.marker.lineColor) ||
  190. borderColor ||
  191. this.color);
  192. // Apply old borderWidth property if exists.
  193. attr['stroke-width'] = borderWidth;
  194. if (state) {
  195. stateOptions =
  196. merge(seriesOptions.states[state], seriesOptions.marker &&
  197. seriesOptions.marker.states[state], point &&
  198. point.options.states &&
  199. point.options.states[state] || {});
  200. brightness = stateOptions.brightness;
  201. attr.fill =
  202. stateOptions.color ||
  203. H.color(attr.fill).brighten(brightness || 0).get();
  204. attr.stroke = stateOptions.lineColor;
  205. }
  206. return attr;
  207. };
  208. /**
  209. * @private
  210. */
  211. HeatmapSeries.prototype.setClip = function (animation) {
  212. var series = this, chart = series.chart;
  213. Series.prototype.setClip.apply(series, arguments);
  214. if (series.options.clip !== false || animation) {
  215. series.markerGroup
  216. .clip((animation || series.clipBox) && series.sharedClipKey ?
  217. chart.sharedClips[series.sharedClipKey] :
  218. chart.clipRect);
  219. }
  220. };
  221. /**
  222. * @private
  223. */
  224. HeatmapSeries.prototype.translate = function () {
  225. var series = this, options = series.options, symbol = options.marker && options.marker.symbol || '', shape = symbols[symbol] ? symbol : 'rect', hasRegularShape = ['circle', 'square'].indexOf(shape) !== -1;
  226. series.generatePoints();
  227. series.points.forEach(function (point) {
  228. var pointAttr, sizeDiff, hasImage, cellAttr = point.getCellAttributes(), shapeArgs = {};
  229. shapeArgs.x = Math.min(cellAttr.x1, cellAttr.x2);
  230. shapeArgs.y = Math.min(cellAttr.y1, cellAttr.y2);
  231. shapeArgs.width = Math.max(Math.abs(cellAttr.x2 - cellAttr.x1), 0);
  232. shapeArgs.height = Math.max(Math.abs(cellAttr.y2 - cellAttr.y1), 0);
  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. getExtremesFromAll: true,
  546. getSymbol: Series.prototype.getSymbol,
  547. parallelArrays: colorMapSeriesMixin.parallelArrays,
  548. pointArrayMap: ['y', 'value'],
  549. pointClass: HeatmapPoint,
  550. trackerGroups: colorMapSeriesMixin.trackerGroups
  551. });
  552. SeriesRegistry.registerSeriesType('heatmap', HeatmapSeries);
  553. /* *
  554. *
  555. * Default Export
  556. *
  557. * */
  558. export default HeatmapSeries;
  559. /* *
  560. *
  561. * API Declarations
  562. *
  563. * */
  564. /**
  565. * Heatmap series only. Padding between the points in the heatmap.
  566. * @name Highcharts.Point#pointPadding
  567. * @type {number|undefined}
  568. */
  569. /**
  570. * Heatmap series only. The value of the point, resulting in a color
  571. * controled by options as set in the colorAxis configuration.
  572. * @name Highcharts.Point#value
  573. * @type {number|null|undefined}
  574. */
  575. /* *
  576. * @interface Highcharts.PointOptionsObject in parts/Point.ts
  577. */ /**
  578. * Heatmap series only. Point padding for a single point.
  579. * @name Highcharts.PointOptionsObject#pointPadding
  580. * @type {number|undefined}
  581. */ /**
  582. * Heatmap series only. The value of the point, resulting in a color controled
  583. * by options as set in the colorAxis configuration.
  584. * @name Highcharts.PointOptionsObject#value
  585. * @type {number|null|undefined}
  586. */
  587. ''; // detach doclets above
  588. /* *
  589. *
  590. * API Options
  591. *
  592. * */
  593. /**
  594. * A `heatmap` series. If the [type](#series.heatmap.type) option is
  595. * not specified, it is inherited from [chart.type](#chart.type).
  596. *
  597. * @productdesc {highcharts}
  598. * Requires `modules/heatmap`.
  599. *
  600. * @extends series,plotOptions.heatmap
  601. * @excluding cropThreshold, dataParser, dataURL, pointRange, stack,
  602. * @product highcharts highmaps
  603. * @apioption series.heatmap
  604. */
  605. /**
  606. * An array of data points for the series. For the `heatmap` series
  607. * type, points can be given in the following ways:
  608. *
  609. * 1. An array of arrays with 3 or 2 values. In this case, the values
  610. * correspond to `x,y,value`. If the first value is a string, it is
  611. * applied as the name of the point, and the `x` value is inferred.
  612. * The `x` value can also be omitted, in which case the inner arrays
  613. * should be of length 2\. Then the `x` value is automatically calculated,
  614. * either starting at 0 and incremented by 1, or from `pointStart`
  615. * and `pointInterval` given in the series options.
  616. *
  617. * ```js
  618. * data: [
  619. * [0, 9, 7],
  620. * [1, 10, 4],
  621. * [2, 6, 3]
  622. * ]
  623. * ```
  624. *
  625. * 2. An array of objects with named values. The following snippet shows only a
  626. * few settings, see the complete options set below. If the total number of data
  627. * points exceeds the series' [turboThreshold](#series.heatmap.turboThreshold),
  628. * this option is not available.
  629. *
  630. * ```js
  631. * data: [{
  632. * x: 1,
  633. * y: 3,
  634. * value: 10,
  635. * name: "Point2",
  636. * color: "#00FF00"
  637. * }, {
  638. * x: 1,
  639. * y: 7,
  640. * value: 10,
  641. * name: "Point1",
  642. * color: "#FF00FF"
  643. * }]
  644. * ```
  645. *
  646. * @sample {highcharts} highcharts/chart/reflow-true/
  647. * Numerical values
  648. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  649. * Arrays of numeric x and y
  650. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  651. * Arrays of datetime x and y
  652. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  653. * Arrays of point.name and y
  654. * @sample {highcharts} highcharts/series/data-array-of-objects/
  655. * Config objects
  656. *
  657. * @type {Array<Array<number>|*>}
  658. * @extends series.line.data
  659. * @product highcharts highmaps
  660. * @apioption series.heatmap.data
  661. */
  662. /**
  663. * The color of the point. In heat maps the point color is rarely set
  664. * explicitly, as we use the color to denote the `value`. Options for
  665. * this are set in the [colorAxis](#colorAxis) configuration.
  666. *
  667. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  668. * @product highcharts highmaps
  669. * @apioption series.heatmap.data.color
  670. */
  671. /**
  672. * The value of the point, resulting in a color controled by options
  673. * as set in the [colorAxis](#colorAxis) configuration.
  674. *
  675. * @type {number}
  676. * @product highcharts highmaps
  677. * @apioption series.heatmap.data.value
  678. */
  679. /**
  680. * The x value of the point. For datetime axes,
  681. * the X value is the timestamp in milliseconds since 1970.
  682. *
  683. * @type {number}
  684. * @product highcharts highmaps
  685. * @apioption series.heatmap.data.x
  686. */
  687. /**
  688. * The y value of the point.
  689. *
  690. * @type {number}
  691. * @product highcharts highmaps
  692. * @apioption series.heatmap.data.y
  693. */
  694. /**
  695. * Point padding for a single point.
  696. *
  697. * @sample maps/plotoptions/tilemap-pointpadding
  698. * Point padding on tiles
  699. *
  700. * @type {number}
  701. * @product highcharts highmaps
  702. * @apioption series.heatmap.data.pointPadding
  703. */
  704. /**
  705. * @excluding radius, enabledThreshold
  706. * @product highcharts highmaps
  707. * @since 8.1
  708. * @apioption series.heatmap.data.marker
  709. */
  710. /**
  711. * @excluding radius, enabledThreshold
  712. * @product highcharts highmaps
  713. * @since 8.1
  714. * @apioption series.heatmap.marker
  715. */
  716. /**
  717. * @excluding radius, radiusPlus
  718. * @product highcharts highmaps
  719. * @apioption series.heatmap.marker.states.hover
  720. */
  721. /**
  722. * @excluding radius
  723. * @product highcharts highmaps
  724. * @apioption series.heatmap.marker.states.select
  725. */
  726. /**
  727. * @excluding radius, radiusPlus
  728. * @product highcharts highmaps
  729. * @apioption series.heatmap.data.marker.states.hover
  730. */
  731. /**
  732. * @excluding radius
  733. * @product highcharts highmaps
  734. * @apioption series.heatmap.data.marker.states.select
  735. */
  736. /**
  737. * Set the marker's fixed width on hover state.
  738. *
  739. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  740. * 5 pixels wider lineWidth on hover
  741. *
  742. * @type {number|undefined}
  743. * @default 0
  744. * @product highcharts highmaps
  745. * @apioption series.heatmap.marker.states.hover.lineWidthPlus
  746. */
  747. /**
  748. * Set the marker's fixed width on hover state.
  749. *
  750. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  751. * 70px fixed marker's width and height on hover
  752. *
  753. * @type {number|undefined}
  754. * @default undefined
  755. * @product highcharts highmaps
  756. * @apioption series.heatmap.marker.states.hover.width
  757. */
  758. /**
  759. * Set the marker's fixed height on hover state.
  760. *
  761. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  762. * 70px fixed marker's width and height on hover
  763. *
  764. * @type {number|undefined}
  765. * @default undefined
  766. * @product highcharts highmaps
  767. * @apioption series.heatmap.marker.states.hover.height
  768. */
  769. /**
  770. * The number of pixels to increase the width of the
  771. * hovered point.
  772. *
  773. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  774. * One day
  775. *
  776. * @type {number|undefined}
  777. * @default undefined
  778. * @product highcharts highmaps
  779. * @apioption series.heatmap.marker.states.hover.widthPlus
  780. */
  781. /**
  782. * The number of pixels to increase the height of the
  783. * hovered point.
  784. *
  785. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  786. * One day
  787. *
  788. * @type {number|undefined}
  789. * @default undefined
  790. * @product highcharts highmaps
  791. * @apioption series.heatmap.marker.states.hover.heightPlus
  792. */
  793. /**
  794. * The number of pixels to increase the width of the
  795. * hovered point.
  796. *
  797. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  798. * One day
  799. *
  800. * @type {number|undefined}
  801. * @default undefined
  802. * @product highcharts highmaps
  803. * @apioption series.heatmap.marker.states.select.widthPlus
  804. */
  805. /**
  806. * The number of pixels to increase the height of the
  807. * hovered point.
  808. *
  809. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  810. * One day
  811. *
  812. * @type {number|undefined}
  813. * @default undefined
  814. * @product highcharts highmaps
  815. * @apioption series.heatmap.marker.states.select.heightPlus
  816. */
  817. /**
  818. * Set the marker's fixed width on hover state.
  819. *
  820. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  821. * 5 pixels wider lineWidth on hover
  822. *
  823. * @type {number|undefined}
  824. * @default 0
  825. * @product highcharts highmaps
  826. * @apioption series.heatmap.data.marker.states.hover.lineWidthPlus
  827. */
  828. /**
  829. * Set the marker's fixed width on hover state.
  830. *
  831. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  832. * 70px fixed marker's width and height on hover
  833. *
  834. * @type {number|undefined}
  835. * @default undefined
  836. * @product highcharts highmaps
  837. * @apioption series.heatmap.data.marker.states.hover.width
  838. */
  839. /**
  840. * Set the marker's fixed height on hover state.
  841. *
  842. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  843. * 70px fixed marker's width and height on hover
  844. *
  845. * @type {number|undefined}
  846. * @default undefined
  847. * @product highcharts highmaps
  848. * @apioption series.heatmap.data.marker.states.hover.height
  849. */
  850. /**
  851. * The number of pixels to increase the width of the
  852. * hovered point.
  853. *
  854. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  855. * One day
  856. *
  857. * @type {number|undefined}
  858. * @default undefined
  859. * @product highcharts highstock
  860. * @apioption series.heatmap.data.marker.states.hover.widthPlus
  861. */
  862. /**
  863. * The number of pixels to increase the height of the
  864. * hovered point.
  865. *
  866. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  867. * One day
  868. *
  869. * @type {number|undefined}
  870. * @default undefined
  871. * @product highcharts highstock
  872. * @apioption series.heatmap.data.marker.states.hover.heightPlus
  873. */
  874. /**
  875. * Set the marker's fixed width on select state.
  876. *
  877. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  878. * 70px fixed marker's width and height on hover
  879. *
  880. * @type {number|undefined}
  881. * @default undefined
  882. * @product highcharts highmaps
  883. * @apioption series.heatmap.data.marker.states.select.width
  884. */
  885. /**
  886. * Set the marker's fixed height on select state.
  887. *
  888. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  889. * 70px fixed marker's width and height on hover
  890. *
  891. * @type {number|undefined}
  892. * @default undefined
  893. * @product highcharts highmaps
  894. * @apioption series.heatmap.data.marker.states.select.height
  895. */
  896. /**
  897. * The number of pixels to increase the width of the
  898. * hovered point.
  899. *
  900. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  901. * One day
  902. *
  903. * @type {number|undefined}
  904. * @default undefined
  905. * @product highcharts highstock
  906. * @apioption series.heatmap.data.marker.states.select.widthPlus
  907. */
  908. /**
  909. * The number of pixels to increase the height of the
  910. * hovered point.
  911. *
  912. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  913. * One day
  914. *
  915. * @type {number|undefined}
  916. * @default undefined
  917. * @product highcharts highstock
  918. * @apioption series.heatmap.data.marker.states.select.heightPlus
  919. */
  920. ''; // adds doclets above to transpiled file