TilemapSeries.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. /* *
  2. *
  3. * Tilemaps module
  4. *
  5. * (c) 2010-2017 Highsoft AS
  6. * Author: Øystein Moseng
  7. *
  8. * License: www.highcharts.com/license
  9. *
  10. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  11. *
  12. * */
  13. 'use strict';
  14. import H from '../Core/Globals.js';
  15. /**
  16. * @typedef {"circle"|"diamond"|"hexagon"|"square"} Highcharts.TilemapShapeValue
  17. */
  18. ''; // detach doclets above
  19. import U from '../Core/Utilities.js';
  20. var addEvent = U.addEvent, clamp = U.clamp, extend = U.extend, pick = U.pick, seriesType = U.seriesType;
  21. import '../Series/HeatmapSeries.js';
  22. /**
  23. * Utility func to get padding definition from tile size division
  24. * @private
  25. * @param {Highcharts.TilemapSeries} series
  26. * series
  27. * @param {Highcharts.number} xDiv
  28. * xDiv
  29. * @param {Highcharts.number} yDiv
  30. * yDiv
  31. * @return {Highcharts.TilemapPaddingObject}
  32. */
  33. function tilePaddingFromTileSize(series, xDiv, yDiv) {
  34. var options = series.options;
  35. return {
  36. xPad: (options.colsize || 1) / -xDiv,
  37. yPad: (options.rowsize || 1) / -yDiv
  38. };
  39. }
  40. // Map of shape types.
  41. H.tileShapeTypes = {
  42. // Hexagon shape type.
  43. hexagon: {
  44. alignDataLabel: H.seriesTypes.scatter.prototype.alignDataLabel,
  45. getSeriesPadding: function (series) {
  46. return tilePaddingFromTileSize(series, 3, 2);
  47. },
  48. haloPath: function (size) {
  49. if (!size) {
  50. return [];
  51. }
  52. var hexagon = this.tileEdges;
  53. return [
  54. ['M', hexagon.x2 - size, hexagon.y1 + size],
  55. ['L', hexagon.x3 + size, hexagon.y1 + size],
  56. ['L', hexagon.x4 + size * 1.5, hexagon.y2],
  57. ['L', hexagon.x3 + size, hexagon.y3 - size],
  58. ['L', hexagon.x2 - size, hexagon.y3 - size],
  59. ['L', hexagon.x1 - size * 1.5, hexagon.y2],
  60. ['Z']
  61. ];
  62. },
  63. translate: function () {
  64. var series = this, options = series.options, xAxis = series.xAxis, yAxis = series.yAxis, seriesPointPadding = options.pointPadding || 0, xPad = (options.colsize || 1) / 3, yPad = (options.rowsize || 1) / 2, yShift;
  65. series.generatePoints();
  66. series.points.forEach(function (point) {
  67. var x1 = clamp(Math.floor(xAxis.len -
  68. xAxis.translate(point.x - xPad * 2, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len), x2 = clamp(Math.floor(xAxis.len -
  69. xAxis.translate(point.x - xPad, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len), x3 = clamp(Math.floor(xAxis.len -
  70. xAxis.translate(point.x + xPad, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len), x4 = clamp(Math.floor(xAxis.len -
  71. xAxis.translate(point.x + xPad * 2, 0, 1, 0, 1)), -xAxis.len, 2 * xAxis.len), y1 = clamp(Math.floor(yAxis.translate(point.y - yPad, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len), y2 = clamp(Math.floor(yAxis.translate(point.y, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len), y3 = clamp(Math.floor(yAxis.translate(point.y + yPad, 0, 1, 0, 1)), -yAxis.len, 2 * yAxis.len), pointPadding = pick(point.pointPadding, seriesPointPadding),
  72. // We calculate the point padding of the midpoints to
  73. // preserve the angles of the shape.
  74. midPointPadding = pointPadding *
  75. Math.abs(x2 - x1) / Math.abs(y3 - y2), xMidPadding = xAxis.reversed ?
  76. -midPointPadding : midPointPadding, xPointPadding = xAxis.reversed ?
  77. -pointPadding : pointPadding, yPointPadding = yAxis.reversed ?
  78. -pointPadding : pointPadding;
  79. // Shift y-values for every second grid column
  80. if (point.x % 2) {
  81. yShift = yShift || Math.round(Math.abs(y3 - y1) / 2) *
  82. // We have to reverse the shift for reversed y-axes
  83. (yAxis.reversed ? -1 : 1);
  84. y1 += yShift;
  85. y2 += yShift;
  86. y3 += yShift;
  87. }
  88. // Set plotX and plotY for use in K-D-Tree and more
  89. point.plotX = point.clientX = (x2 + x3) / 2;
  90. point.plotY = y2;
  91. // Apply point padding to translated coordinates
  92. x1 += xMidPadding + xPointPadding;
  93. x2 += xPointPadding;
  94. x3 -= xPointPadding;
  95. x4 -= xMidPadding + xPointPadding;
  96. y1 -= yPointPadding;
  97. y3 += yPointPadding;
  98. // Store points for halo creation
  99. point.tileEdges = {
  100. x1: x1, x2: x2, x3: x3, x4: x4, y1: y1, y2: y2, y3: y3
  101. };
  102. // Finally set the shape for this point
  103. point.shapeType = 'path';
  104. point.shapeArgs = {
  105. d: [
  106. ['M', x2, y1],
  107. ['L', x3, y1],
  108. ['L', x4, y2],
  109. ['L', x3, y3],
  110. ['L', x2, y3],
  111. ['L', x1, y2],
  112. ['Z']
  113. ]
  114. };
  115. });
  116. series.translateColors();
  117. }
  118. },
  119. // Diamond shape type.
  120. diamond: {
  121. alignDataLabel: H.seriesTypes.scatter.prototype.alignDataLabel,
  122. getSeriesPadding: function (series) {
  123. return tilePaddingFromTileSize(series, 2, 2);
  124. },
  125. haloPath: function (size) {
  126. if (!size) {
  127. return [];
  128. }
  129. var diamond = this.tileEdges;
  130. return [
  131. ['M', diamond.x2, diamond.y1 + size],
  132. ['L', diamond.x3 + size, diamond.y2],
  133. ['L', diamond.x2, diamond.y3 - size],
  134. ['L', diamond.x1 - size, diamond.y2],
  135. ['Z']
  136. ];
  137. },
  138. translate: function () {
  139. var series = this, options = series.options, xAxis = series.xAxis, yAxis = series.yAxis, seriesPointPadding = options.pointPadding || 0, xPad = (options.colsize || 1), yPad = (options.rowsize || 1) / 2, yShift;
  140. series.generatePoints();
  141. series.points.forEach(function (point) {
  142. var x1 = clamp(Math.round(xAxis.len -
  143. xAxis.translate(point.x - xPad, 0, 1, 0, 0)), -xAxis.len, 2 * xAxis.len), x2 = clamp(Math.round(xAxis.len -
  144. xAxis.translate(point.x, 0, 1, 0, 0)), -xAxis.len, 2 * xAxis.len), x3 = clamp(Math.round(xAxis.len -
  145. xAxis.translate(point.x + xPad, 0, 1, 0, 0)), -xAxis.len, 2 * xAxis.len), y1 = clamp(Math.round(yAxis.translate(point.y - yPad, 0, 1, 0, 0)), -yAxis.len, 2 * yAxis.len), y2 = clamp(Math.round(yAxis.translate(point.y, 0, 1, 0, 0)), -yAxis.len, 2 * yAxis.len), y3 = clamp(Math.round(yAxis.translate(point.y + yPad, 0, 1, 0, 0)), -yAxis.len, 2 * yAxis.len), pointPadding = pick(point.pointPadding, seriesPointPadding),
  146. // We calculate the point padding of the midpoints to
  147. // preserve the angles of the shape.
  148. midPointPadding = pointPadding *
  149. Math.abs(x2 - x1) / Math.abs(y3 - y2), xPointPadding = xAxis.reversed ?
  150. -midPointPadding : midPointPadding, yPointPadding = yAxis.reversed ?
  151. -pointPadding : pointPadding;
  152. // Shift y-values for every second grid column
  153. // We have to reverse the shift for reversed y-axes
  154. if (point.x % 2) {
  155. yShift = Math.abs(y3 - y1) / 2 * (yAxis.reversed ? -1 : 1);
  156. y1 += yShift;
  157. y2 += yShift;
  158. y3 += yShift;
  159. }
  160. // Set plotX and plotY for use in K-D-Tree and more
  161. point.plotX = point.clientX = x2;
  162. point.plotY = y2;
  163. // Apply point padding to translated coordinates
  164. x1 += xPointPadding;
  165. x3 -= xPointPadding;
  166. y1 -= yPointPadding;
  167. y3 += yPointPadding;
  168. // Store points for halo creation
  169. point.tileEdges = {
  170. x1: x1, x2: x2, x3: x3, y1: y1, y2: y2, y3: y3
  171. };
  172. // Set this point's shape parameters
  173. point.shapeType = 'path';
  174. point.shapeArgs = {
  175. d: [
  176. ['M', x2, y1],
  177. ['L', x3, y2],
  178. ['L', x2, y3],
  179. ['L', x1, y2],
  180. ['Z']
  181. ]
  182. };
  183. });
  184. series.translateColors();
  185. }
  186. },
  187. // Circle shape type.
  188. circle: {
  189. alignDataLabel: H.seriesTypes.scatter.prototype.alignDataLabel,
  190. getSeriesPadding: function (series) {
  191. return tilePaddingFromTileSize(series, 2, 2);
  192. },
  193. haloPath: function (size) {
  194. return H.seriesTypes.scatter.prototype.pointClass.prototype.haloPath
  195. .call(this, size + (size && this.radius));
  196. },
  197. translate: function () {
  198. var series = this, options = series.options, xAxis = series.xAxis, yAxis = series.yAxis, seriesPointPadding = options.pointPadding || 0, yRadius = (options.rowsize || 1) / 2, colsize = (options.colsize || 1), colsizePx, yRadiusPx, xRadiusPx, radius, forceNextRadiusCompute = false;
  199. series.generatePoints();
  200. series.points.forEach(function (point) {
  201. var x = clamp(Math.round(xAxis.len -
  202. xAxis.translate(point.x, 0, 1, 0, 0)), -xAxis.len, 2 * xAxis.len), y = clamp(Math.round(yAxis.translate(point.y, 0, 1, 0, 0)), -yAxis.len, 2 * yAxis.len), pointPadding = seriesPointPadding, hasPerPointPadding = false;
  203. // If there is point padding defined on a single point, add it
  204. if (typeof point.pointPadding !== 'undefined') {
  205. pointPadding = point.pointPadding;
  206. hasPerPointPadding = true;
  207. forceNextRadiusCompute = true;
  208. }
  209. // Find radius if not found already.
  210. // Use the smallest one (x vs y) to avoid overlap.
  211. // Note that the radius will be recomputed for each series.
  212. // Ideal (max) x radius is dependent on y radius:
  213. /*
  214. * (circle 2)
  215. * (circle 3)
  216. | yRadiusPx
  217. (circle 1) *-------|
  218. colsizePx
  219. The distance between circle 1 and 3 (and circle 2 and 3) is
  220. 2r, which is the hypotenuse of the triangle created by
  221. colsizePx and yRadiusPx. If the distance between circle 2
  222. and circle 1 is less than 2r, we use half of that distance
  223. instead (yRadiusPx).
  224. */
  225. if (!radius || forceNextRadiusCompute) {
  226. colsizePx = Math.abs(clamp(Math.floor(xAxis.len -
  227. xAxis.translate(point.x + colsize, 0, 1, 0, 0)), -xAxis.len, 2 * xAxis.len) - x);
  228. yRadiusPx = Math.abs(clamp(Math.floor(yAxis.translate(point.y + yRadius, 0, 1, 0, 0)), -yAxis.len, 2 * yAxis.len) - y);
  229. xRadiusPx = Math.floor(Math.sqrt((colsizePx * colsizePx + yRadiusPx * yRadiusPx)) / 2);
  230. radius = Math.min(colsizePx, xRadiusPx, yRadiusPx) - pointPadding;
  231. // If we have per point padding we need to always compute
  232. // the radius for this point and the next. If we used to
  233. // have per point padding but don't anymore, don't force
  234. // compute next radius.
  235. if (forceNextRadiusCompute && !hasPerPointPadding) {
  236. forceNextRadiusCompute = false;
  237. }
  238. }
  239. // Shift y-values for every second grid column.
  240. // Note that we always use the optimal y axis radius for this.
  241. // Also note: We have to reverse the shift for reversed y-axes.
  242. if (point.x % 2) {
  243. y += yRadiusPx * (yAxis.reversed ? -1 : 1);
  244. }
  245. // Set plotX and plotY for use in K-D-Tree and more
  246. point.plotX = point.clientX = x;
  247. point.plotY = y;
  248. // Save radius for halo
  249. point.radius = radius;
  250. // Set this point's shape parameters
  251. point.shapeType = 'circle';
  252. point.shapeArgs = {
  253. x: x,
  254. y: y,
  255. r: radius
  256. };
  257. });
  258. series.translateColors();
  259. }
  260. },
  261. // Square shape type.
  262. square: {
  263. alignDataLabel: H.seriesTypes.heatmap.prototype.alignDataLabel,
  264. translate: H.seriesTypes.heatmap.prototype.translate,
  265. getSeriesPadding: function () {
  266. },
  267. haloPath: H.seriesTypes.heatmap.prototype.pointClass.prototype.haloPath
  268. }
  269. };
  270. /* eslint-disable no-invalid-this */
  271. // Extension to add pixel padding for series. Uses getSeriesPixelPadding on each
  272. // series and adds the largest padding required. If no series has this function
  273. // defined, we add nothing.
  274. addEvent(H.Axis, 'afterSetAxisTranslation', function () {
  275. if (this.recomputingForTilemap || this.coll === 'colorAxis') {
  276. return;
  277. }
  278. var axis = this,
  279. // Find which series' padding to use
  280. seriesPadding = axis.series
  281. .map(function (series) {
  282. return series.getSeriesPixelPadding &&
  283. series.getSeriesPixelPadding(axis);
  284. })
  285. .reduce(function (a, b) {
  286. return (a && a.padding) > (b && b.padding) ?
  287. a :
  288. b;
  289. }, void 0) ||
  290. {
  291. padding: 0,
  292. axisLengthFactor: 1
  293. }, lengthPadding = Math.round(seriesPadding.padding * seriesPadding.axisLengthFactor);
  294. // Don't waste time on this if we're not adding extra padding
  295. if (seriesPadding.padding) {
  296. // Recompute translation with new axis length now (minus padding)
  297. axis.len -= lengthPadding;
  298. axis.recomputingForTilemap = true;
  299. axis.setAxisTranslation();
  300. delete axis.recomputingForTilemap;
  301. axis.minPixelPadding += seriesPadding.padding;
  302. axis.len += lengthPadding;
  303. }
  304. });
  305. /**
  306. * @private
  307. * @class
  308. * @name Highcharts.seriesTypes.tilemap
  309. *
  310. * @augments Highcharts.Series
  311. */
  312. seriesType('tilemap', 'heatmap'
  313. /**
  314. * A tilemap series is a type of heatmap where the tile shapes are
  315. * configurable.
  316. *
  317. * @sample highcharts/demo/honeycomb-usa/
  318. * Honeycomb tilemap, USA
  319. * @sample maps/plotoptions/honeycomb-brazil/
  320. * Honeycomb tilemap, Brazil
  321. * @sample maps/plotoptions/honeycomb-china/
  322. * Honeycomb tilemap, China
  323. * @sample maps/plotoptions/honeycomb-europe/
  324. * Honeycomb tilemap, Europe
  325. * @sample maps/demo/circlemap-africa/
  326. * Circlemap tilemap, Africa
  327. * @sample maps/demo/diamondmap
  328. * Diamondmap tilemap
  329. *
  330. * @extends plotOptions.heatmap
  331. * @since 6.0.0
  332. * @excluding jitter, joinBy, shadow, allAreas, mapData, marker, data,
  333. * dataSorting, boostThreshold, boostBlending
  334. * @product highcharts highmaps
  335. * @requires modules/tilemap.js
  336. * @optionparent plotOptions.tilemap
  337. */
  338. , {
  339. // Remove marker from tilemap default options, as it was before
  340. // heatmap refactoring.
  341. marker: null,
  342. states: {
  343. hover: {
  344. halo: {
  345. enabled: true,
  346. size: 2,
  347. opacity: 0.5,
  348. attributes: {
  349. zIndex: 3
  350. }
  351. }
  352. }
  353. },
  354. /**
  355. * The padding between points in the tilemap.
  356. *
  357. * @sample maps/plotoptions/tilemap-pointpadding
  358. * Point padding on tiles
  359. */
  360. pointPadding: 2,
  361. /**
  362. * The column size - how many X axis units each column in the tilemap
  363. * should span. Works as in [Heatmaps](#plotOptions.heatmap.colsize).
  364. *
  365. * @sample {highcharts} maps/demo/heatmap/
  366. * One day
  367. * @sample {highmaps} maps/demo/heatmap/
  368. * One day
  369. *
  370. * @type {number}
  371. * @default 1
  372. * @product highcharts highmaps
  373. * @apioption plotOptions.tilemap.colsize
  374. */
  375. /**
  376. * The row size - how many Y axis units each tilemap row should span.
  377. * Analogous to [colsize](#plotOptions.tilemap.colsize).
  378. *
  379. * @sample {highcharts} maps/demo/heatmap/
  380. * 1 by default
  381. * @sample {highmaps} maps/demo/heatmap/
  382. * 1 by default
  383. *
  384. * @type {number}
  385. * @default 1
  386. * @product highcharts highmaps
  387. * @apioption plotOptions.tilemap.rowsize
  388. */
  389. /**
  390. * The shape of the tiles in the tilemap. Possible values are `hexagon`,
  391. * `circle`, `diamond`, and `square`.
  392. *
  393. * @sample maps/demo/circlemap-africa
  394. * Circular tile shapes
  395. * @sample maps/demo/diamondmap
  396. * Diamond tile shapes
  397. *
  398. * @type {Highcharts.TilemapShapeValue}
  399. */
  400. tileShape: 'hexagon'
  401. }, {
  402. // Use drawPoints, markerAttribs, pointAttribs methods from the old
  403. // heatmap implementation.
  404. // TODO: Consider standarizing heatmap and tilemap into more
  405. // consistent form.
  406. markerAttribs: H.seriesTypes.scatter.prototype.markerAttribs,
  407. pointAttribs: H.seriesTypes.column.prototype.pointAttribs,
  408. // Revert the noop on getSymbol.
  409. getSymbol: H.noop,
  410. drawPoints: function () {
  411. var _this = this;
  412. // In styled mode, use CSS, otherwise the fill used in the style
  413. // sheet will take precedence over the fill attribute.
  414. H.seriesTypes.column.prototype.drawPoints.call(this);
  415. this.points.forEach(function (point) {
  416. point.graphic &&
  417. point.graphic[_this.chart.styledMode ? 'css' : 'animate'](_this.colorAttribs(point));
  418. });
  419. },
  420. // Set tile shape object on series
  421. setOptions: function () {
  422. // Call original function
  423. var ret = H.seriesTypes.heatmap.prototype.setOptions.apply(this, Array.prototype.slice.call(arguments));
  424. this.tileShape = H.tileShapeTypes[ret.tileShape];
  425. return ret;
  426. },
  427. // Use the shape's defined data label alignment function
  428. alignDataLabel: function () {
  429. return this.tileShape.alignDataLabel.apply(this, Array.prototype.slice.call(arguments));
  430. },
  431. // Get metrics for padding of axis for this series
  432. getSeriesPixelPadding: function (axis) {
  433. var isX = axis.isXAxis, padding = this.tileShape.getSeriesPadding(this), coord1, coord2;
  434. // If the shape type does not require padding, return no-op padding
  435. if (!padding) {
  436. return {
  437. padding: 0,
  438. axisLengthFactor: 1
  439. };
  440. }
  441. // Use translate to compute how far outside the points we
  442. // draw, and use this difference as padding.
  443. coord1 = Math.round(axis.translate(isX ?
  444. padding.xPad * 2 :
  445. padding.yPad, 0, 1, 0, 1));
  446. coord2 = Math.round(axis.translate(isX ? padding.xPad : 0, 0, 1, 0, 1));
  447. return {
  448. padding: Math.abs(coord1 - coord2) || 0,
  449. // Offset the yAxis length to compensate for shift. Setting the
  450. // length factor to 2 would add the same margin to max as min.
  451. // Now we only add a slight bit of the min margin to max, as we
  452. // don't actually draw outside the max bounds. For the xAxis we
  453. // draw outside on both sides so we add the same margin to min
  454. // and max.
  455. axisLengthFactor: isX ? 2 : 1.1
  456. };
  457. },
  458. // Use translate from tileShape
  459. translate: function () {
  460. return this.tileShape.translate.apply(this, Array.prototype.slice.call(arguments));
  461. }
  462. }, extend({
  463. // eslint-disable-next-line valid-jsdoc
  464. /**
  465. * @private
  466. * @function Highcharts.Point#haloPath
  467. *
  468. * @return {Highcharts.SVGElement|Highcharts.SVGPathArray|Array<Highcharts.SVGElement>}
  469. */
  470. haloPath: function () {
  471. return this.series.tileShape.haloPath.apply(this, Array.prototype.slice.call(arguments));
  472. }
  473. }, H.colorPointMixin));
  474. /**
  475. * A `tilemap` series. If the [type](#series.tilemap.type) option is
  476. * not specified, it is inherited from [chart.type](#chart.type).
  477. *
  478. * @extends series,plotOptions.tilemap
  479. * @excluding allAreas, dataParser, dataURL, joinBy, mapData, marker,
  480. * pointRange, shadow, stack, dataSorting, boostThreshold,
  481. * boostBlending
  482. * @product highcharts highmaps
  483. * @requires modules/tilemap.js
  484. * @apioption series.tilemap
  485. */
  486. /**
  487. * An array of data points for the series. For the `tilemap` series
  488. * type, points can be given in the following ways:
  489. *
  490. * 1. An array of arrays with 3 or 2 values. In this case, the values correspond
  491. * to `x,y,value`. If the first value is a string, it is applied as the name
  492. * of the point, and the `x` value is inferred. The `x` value can also be
  493. * omitted, in which case the inner arrays should be of length 2\. Then the
  494. * `x` value is automatically calculated, either starting at 0 and
  495. * incremented by 1, or from `pointStart` and `pointInterval` given in the
  496. * series options.
  497. * ```js
  498. * data: [
  499. * [0, 9, 7],
  500. * [1, 10, 4],
  501. * [2, 6, 3]
  502. * ]
  503. * ```
  504. *
  505. * 2. An array of objects with named values. The objects are point configuration
  506. * objects as seen below. If the total number of data points exceeds the
  507. * series' [turboThreshold](#series.tilemap.turboThreshold), this option is
  508. * not available.
  509. * ```js
  510. * data: [{
  511. * x: 1,
  512. * y: 3,
  513. * value: 10,
  514. * name: "Point2",
  515. * color: "#00FF00"
  516. * }, {
  517. * x: 1,
  518. * y: 7,
  519. * value: 10,
  520. * name: "Point1",
  521. * color: "#FF00FF"
  522. * }]
  523. * ```
  524. *
  525. * Note that for some [tileShapes](#plotOptions.tilemap.tileShape) the grid
  526. * coordinates are offset.
  527. *
  528. * @sample maps/series/tilemap-gridoffset
  529. * Offset grid coordinates
  530. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  531. * Arrays of numeric x and y
  532. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  533. * Arrays of datetime x and y
  534. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  535. * Arrays of point.name and y
  536. * @sample {highcharts} highcharts/series/data-array-of-objects/
  537. * Config objects
  538. *
  539. * @type {Array<Array<(number|string),number>|Array<(number|string),number,number>|*>}
  540. * @extends series.heatmap.data
  541. * @excluding marker
  542. * @product highcharts highmaps
  543. * @apioption series.tilemap.data
  544. */
  545. /**
  546. * The color of the point. In tilemaps the point color is rarely set
  547. * explicitly, as we use the color to denote the `value`. Options for
  548. * this are set in the [colorAxis](#colorAxis) configuration.
  549. *
  550. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  551. * @product highcharts highmaps
  552. * @apioption series.tilemap.data.color
  553. */
  554. /**
  555. * The x coordinate of the point.
  556. *
  557. * Note that for some [tileShapes](#plotOptions.tilemap.tileShape) the grid
  558. * coordinates are offset.
  559. *
  560. * @sample maps/series/tilemap-gridoffset
  561. * Offset grid coordinates
  562. *
  563. * @type {number}
  564. * @product highcharts highmaps
  565. * @apioption series.tilemap.data.x
  566. */
  567. /**
  568. * The y coordinate of the point.
  569. *
  570. * Note that for some [tileShapes](#plotOptions.tilemap.tileShape) the grid
  571. * coordinates are offset.
  572. *
  573. * @sample maps/series/tilemap-gridoffset
  574. * Offset grid coordinates
  575. *
  576. * @type {number}
  577. * @product highcharts highmaps
  578. * @apioption series.tilemap.data.y
  579. */
  580. ''; // adds doclets above to the transpiled file