heatmap.src.js 103 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440
  1. /**
  2. * @license Highmaps JS v8.2.2 (2020-10-22)
  3. *
  4. * (c) 2009-2019 Torstein Honsi
  5. *
  6. * License: www.highcharts.com/license
  7. */
  8. 'use strict';
  9. (function (factory) {
  10. if (typeof module === 'object' && module.exports) {
  11. factory['default'] = factory;
  12. module.exports = factory;
  13. } else if (typeof define === 'function' && define.amd) {
  14. define('highcharts/modules/heatmap', ['highcharts'], function (Highcharts) {
  15. factory(Highcharts);
  16. factory.Highcharts = Highcharts;
  17. return factory;
  18. });
  19. } else {
  20. factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
  21. }
  22. }(function (Highcharts) {
  23. var _modules = Highcharts ? Highcharts._modules : {};
  24. function _registerModule(obj, path, args, fn) {
  25. if (!obj.hasOwnProperty(path)) {
  26. obj[path] = fn.apply(null, args);
  27. }
  28. }
  29. _registerModule(_modules, 'Mixins/ColorSeries.js', [], function () {
  30. /* *
  31. *
  32. * (c) 2010-2020 Torstein Honsi
  33. *
  34. * License: www.highcharts.com/license
  35. *
  36. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  37. *
  38. * */
  39. /**
  40. * Mixin for maps and heatmaps
  41. *
  42. * @private
  43. * @mixin Highcharts.colorPointMixin
  44. */
  45. var colorPointMixin = {
  46. /* eslint-disable valid-jsdoc */
  47. /**
  48. * Set the visibility of a single point
  49. * @private
  50. * @function Highcharts.colorPointMixin.setVisible
  51. * @param {boolean} visible
  52. * @return {void}
  53. */
  54. setVisible: function (vis) {
  55. var point = this,
  56. method = vis ? 'show' : 'hide';
  57. point.visible = point.options.visible = Boolean(vis);
  58. // Show and hide associated elements
  59. ['graphic', 'dataLabel'].forEach(function (key) {
  60. if (point[key]) {
  61. point[key][method]();
  62. }
  63. });
  64. this.series.buildKDTree(); // rebuild kdtree #13195
  65. }
  66. /* eslint-enable valid-jsdoc */
  67. };
  68. /**
  69. * @private
  70. * @mixin Highcharts.colorSeriesMixin
  71. */
  72. var colorSeriesMixin = {
  73. optionalAxis: 'colorAxis',
  74. colorAxis: 0,
  75. /* eslint-disable valid-jsdoc */
  76. /**
  77. * In choropleth maps,
  78. the color is a result of the value,
  79. so this needs
  80. * translation too
  81. * @private
  82. * @function Highcharts.colorSeriesMixin.translateColors
  83. * @return {void}
  84. */
  85. translateColors: function () {
  86. var series = this,
  87. points = this.data.length ? this.data : this.points,
  88. nullColor = this.options.nullColor,
  89. colorAxis = this.colorAxis,
  90. colorKey = this.colorKey;
  91. points.forEach(function (point) {
  92. var value = point.getNestedProperty(colorKey),
  93. color;
  94. color = point.options.color ||
  95. (point.isNull || point.value === null ?
  96. nullColor :
  97. (colorAxis && typeof value !== 'undefined') ?
  98. colorAxis.toColor(value, point) :
  99. point.color || series.color);
  100. if (color && point.color !== color) {
  101. point.color = color;
  102. if (series.options.legendType === 'point' && point.legendItem) {
  103. series.chart.legend.colorizeItem(point, point.visible);
  104. }
  105. }
  106. });
  107. }
  108. /* eslint-enable valid-jsdoc */
  109. };
  110. var exports = {
  111. colorPointMixin: colorPointMixin,
  112. colorSeriesMixin: colorSeriesMixin
  113. };
  114. return exports;
  115. });
  116. _registerModule(_modules, 'Core/Axis/ColorAxis.js', [_modules['Core/Axis/Axis.js'], _modules['Core/Chart/Chart.js'], _modules['Core/Color/Color.js'], _modules['Mixins/ColorSeries.js'], _modules['Core/Animation/Fx.js'], _modules['Core/Globals.js'], _modules['Core/Legend.js'], _modules['Mixins/LegendSymbol.js'], _modules['Series/LineSeries.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (Axis, Chart, Color, ColorSeriesModule, Fx, H, Legend, LegendSymbolMixin, LineSeries, Point, U) {
  117. /* *
  118. *
  119. * (c) 2010-2020 Torstein Honsi
  120. *
  121. * License: www.highcharts.com/license
  122. *
  123. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  124. *
  125. * */
  126. var __extends = (this && this.__extends) || (function () {
  127. var extendStatics = function (d,
  128. b) {
  129. extendStatics = Object.setPrototypeOf ||
  130. ({ __proto__: [] } instanceof Array && function (d,
  131. b) { d.__proto__ = b; }) ||
  132. function (d,
  133. b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  134. return extendStatics(d, b);
  135. };
  136. return function (d, b) {
  137. extendStatics(d, b);
  138. function __() { this.constructor = d; }
  139. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  140. };
  141. })();
  142. var color = Color.parse;
  143. var colorPointMixin = ColorSeriesModule.colorPointMixin,
  144. colorSeriesMixin = ColorSeriesModule.colorSeriesMixin;
  145. var noop = H.noop;
  146. var addEvent = U.addEvent,
  147. erase = U.erase,
  148. extend = U.extend,
  149. isNumber = U.isNumber,
  150. merge = U.merge,
  151. pick = U.pick,
  152. splat = U.splat;
  153. /**
  154. * Color axis types
  155. *
  156. * @typedef {"linear"|"logarithmic"} Highcharts.ColorAxisTypeValue
  157. */
  158. ''; // detach doclet above
  159. extend(LineSeries.prototype, colorSeriesMixin);
  160. extend(Point.prototype, colorPointMixin);
  161. Chart.prototype.collectionsWithUpdate.push('colorAxis');
  162. Chart.prototype.collectionsWithInit.colorAxis = [Chart.prototype.addColorAxis];
  163. /* eslint-disable no-invalid-this, valid-jsdoc */
  164. /**
  165. * The ColorAxis object for inclusion in gradient legends.
  166. *
  167. * @class
  168. * @name Highcharts.ColorAxis
  169. * @augments Highcharts.Axis
  170. *
  171. * @param {Highcharts.Chart} chart
  172. * The related chart of the color axis.
  173. *
  174. * @param {Highcharts.ColorAxisOptions} userOptions
  175. * The color axis options for initialization.
  176. */
  177. var ColorAxis = /** @class */ (function (_super) {
  178. __extends(ColorAxis, _super);
  179. /* *
  180. *
  181. * Constructors
  182. *
  183. * */
  184. /**
  185. * @private
  186. */
  187. function ColorAxis(chart, userOptions) {
  188. var _this = _super.call(this,
  189. chart,
  190. userOptions) || this;
  191. _this.beforePadding = false; // Prevents unnecessary padding with `hc-more`
  192. _this.chart = void 0;
  193. _this.coll = 'colorAxis';
  194. _this.dataClasses = void 0;
  195. _this.legendItem = void 0;
  196. _this.legendItems = void 0;
  197. _this.name = ''; // Prevents 'undefined' in legend in IE8
  198. _this.options = void 0;
  199. _this.stops = void 0;
  200. _this.visible = true;
  201. _this.init(chart, userOptions);
  202. return _this;
  203. }
  204. /* *
  205. *
  206. * Static Functions
  207. *
  208. * */
  209. /**
  210. * Build options to keep layout params on init and update.
  211. * @private
  212. */
  213. ColorAxis.buildOptions = function (chart, options, userOptions) {
  214. var legend = chart.options.legend || {},
  215. horiz = userOptions.layout ?
  216. userOptions.layout !== 'vertical' :
  217. legend.layout !== 'vertical';
  218. return merge(options, {
  219. side: horiz ? 2 : 1,
  220. reversed: !horiz
  221. }, userOptions, {
  222. opposite: !horiz,
  223. showEmpty: false,
  224. title: null,
  225. visible: legend.enabled &&
  226. (userOptions ? userOptions.visible !== false : true)
  227. });
  228. };
  229. /* *
  230. *
  231. * Functions
  232. *
  233. * */
  234. /**
  235. * Initializes the color axis.
  236. *
  237. * @function Highcharts.ColorAxis#init
  238. *
  239. * @param {Highcharts.Chart} chart
  240. * The related chart of the color axis.
  241. *
  242. * @param {Highcharts.ColorAxisOptions} userOptions
  243. * The color axis options for initialization.
  244. */
  245. ColorAxis.prototype.init = function (chart, userOptions) {
  246. var axis = this;
  247. var options = ColorAxis.buildOptions(// Build the options
  248. chart,
  249. ColorAxis.defaultOptions,
  250. userOptions);
  251. axis.coll = 'colorAxis';
  252. _super.prototype.init.call(this, chart, options);
  253. // Base init() pushes it to the xAxis array, now pop it again
  254. // chart[this.isXAxis ? 'xAxis' : 'yAxis'].pop();
  255. // Prepare data classes
  256. if (userOptions.dataClasses) {
  257. axis.initDataClasses(userOptions);
  258. }
  259. axis.initStops();
  260. // Override original axis properties
  261. axis.horiz = !options.opposite;
  262. axis.zoomEnabled = false;
  263. };
  264. /**
  265. * @private
  266. */
  267. ColorAxis.prototype.initDataClasses = function (userOptions) {
  268. var axis = this;
  269. var chart = axis.chart,
  270. dataClasses,
  271. colorCounter = 0,
  272. colorCount = chart.options.chart.colorCount,
  273. options = axis.options,
  274. len = userOptions.dataClasses.length;
  275. axis.dataClasses = dataClasses = [];
  276. axis.legendItems = [];
  277. userOptions.dataClasses.forEach(function (dataClass, i) {
  278. var colors;
  279. dataClass = merge(dataClass);
  280. dataClasses.push(dataClass);
  281. if (!chart.styledMode && dataClass.color) {
  282. return;
  283. }
  284. if (options.dataClassColor === 'category') {
  285. if (!chart.styledMode) {
  286. colors = chart.options.colors;
  287. colorCount = colors.length;
  288. dataClass.color = colors[colorCounter];
  289. }
  290. dataClass.colorIndex = colorCounter;
  291. // increase and loop back to zero
  292. colorCounter++;
  293. if (colorCounter === colorCount) {
  294. colorCounter = 0;
  295. }
  296. }
  297. else {
  298. dataClass.color = color(options.minColor).tweenTo(color(options.maxColor), len < 2 ? 0.5 : i / (len - 1) // #3219
  299. );
  300. }
  301. });
  302. };
  303. /**
  304. * Returns true if the series has points at all.
  305. *
  306. * @function Highcharts.ColorAxis#hasData
  307. *
  308. * @return {boolean}
  309. * True, if the series has points, otherwise false.
  310. */
  311. ColorAxis.prototype.hasData = function () {
  312. return !!(this.tickPositions || []).length;
  313. };
  314. /**
  315. * Override so that ticks are not added in data class axes (#6914)
  316. * @private
  317. */
  318. ColorAxis.prototype.setTickPositions = function () {
  319. if (!this.dataClasses) {
  320. return _super.prototype.setTickPositions.call(this);
  321. }
  322. };
  323. /**
  324. * @private
  325. */
  326. ColorAxis.prototype.initStops = function () {
  327. var axis = this;
  328. axis.stops = axis.options.stops || [
  329. [0, axis.options.minColor],
  330. [1, axis.options.maxColor]
  331. ];
  332. axis.stops.forEach(function (stop) {
  333. stop.color = color(stop[1]);
  334. });
  335. };
  336. /**
  337. * Extend the setOptions method to process extreme colors and color stops.
  338. * @private
  339. */
  340. ColorAxis.prototype.setOptions = function (userOptions) {
  341. var axis = this;
  342. _super.prototype.setOptions.call(this, userOptions);
  343. axis.options.crosshair = axis.options.marker;
  344. };
  345. /**
  346. * @private
  347. */
  348. ColorAxis.prototype.setAxisSize = function () {
  349. var axis = this;
  350. var symbol = axis.legendSymbol;
  351. var chart = axis.chart;
  352. var legendOptions = chart.options.legend || {};
  353. var x,
  354. y,
  355. width,
  356. height;
  357. if (symbol) {
  358. this.left = x = symbol.attr('x');
  359. this.top = y = symbol.attr('y');
  360. this.width = width = symbol.attr('width');
  361. this.height = height = symbol.attr('height');
  362. this.right = chart.chartWidth - x - width;
  363. this.bottom = chart.chartHeight - y - height;
  364. this.len = this.horiz ? width : height;
  365. this.pos = this.horiz ? x : y;
  366. }
  367. else {
  368. // Fake length for disabled legend to avoid tick issues
  369. // and such (#5205)
  370. this.len = (this.horiz ?
  371. legendOptions.symbolWidth :
  372. legendOptions.symbolHeight) || ColorAxis.defaultLegendLength;
  373. }
  374. };
  375. /**
  376. * @private
  377. */
  378. ColorAxis.prototype.normalizedValue = function (value) {
  379. var axis = this;
  380. if (axis.logarithmic) {
  381. value = axis.logarithmic.log2lin(value);
  382. }
  383. return 1 - ((axis.max - value) /
  384. ((axis.max - axis.min) || 1));
  385. };
  386. /**
  387. * Translate from a value to a color.
  388. * @private
  389. */
  390. ColorAxis.prototype.toColor = function (value, point) {
  391. var axis = this;
  392. var dataClasses = axis.dataClasses;
  393. var stops = axis.stops;
  394. var pos,
  395. from,
  396. to,
  397. color,
  398. dataClass,
  399. i;
  400. if (dataClasses) {
  401. i = dataClasses.length;
  402. while (i--) {
  403. dataClass = dataClasses[i];
  404. from = dataClass.from;
  405. to = dataClass.to;
  406. if ((typeof from === 'undefined' || value >= from) &&
  407. (typeof to === 'undefined' || value <= to)) {
  408. color = dataClass.color;
  409. if (point) {
  410. point.dataClass = i;
  411. point.colorIndex = dataClass.colorIndex;
  412. }
  413. break;
  414. }
  415. }
  416. }
  417. else {
  418. pos = axis.normalizedValue(value);
  419. i = stops.length;
  420. while (i--) {
  421. if (pos > stops[i][0]) {
  422. break;
  423. }
  424. }
  425. from = stops[i] || stops[i + 1];
  426. to = stops[i + 1] || from;
  427. // The position within the gradient
  428. pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
  429. color = from.color.tweenTo(to.color, pos);
  430. }
  431. return color;
  432. };
  433. /**
  434. * Override the getOffset method to add the whole axis groups inside the
  435. * legend.
  436. * @private
  437. */
  438. ColorAxis.prototype.getOffset = function () {
  439. var axis = this;
  440. var group = axis.legendGroup;
  441. var sideOffset = axis.chart.axisOffset[axis.side];
  442. if (group) {
  443. // Hook for the getOffset method to add groups to this parent
  444. // group
  445. axis.axisParent = group;
  446. // Call the base
  447. _super.prototype.getOffset.call(this);
  448. // First time only
  449. if (!axis.added) {
  450. axis.added = true;
  451. axis.labelLeft = 0;
  452. axis.labelRight = axis.width;
  453. }
  454. // Reset it to avoid color axis reserving space
  455. axis.chart.axisOffset[axis.side] = sideOffset;
  456. }
  457. };
  458. /**
  459. * Create the color gradient.
  460. * @private
  461. */
  462. ColorAxis.prototype.setLegendColor = function () {
  463. var axis = this;
  464. var horiz = axis.horiz;
  465. var reversed = axis.reversed;
  466. var one = reversed ? 1 : 0;
  467. var zero = reversed ? 0 : 1;
  468. var grad = horiz ? [one, 0,
  469. zero, 0] : [0,
  470. zero, 0,
  471. one]; // #3190
  472. axis.legendColor = {
  473. linearGradient: {
  474. x1: grad[0],
  475. y1: grad[1],
  476. x2: grad[2],
  477. y2: grad[3]
  478. },
  479. stops: axis.stops
  480. };
  481. };
  482. /**
  483. * The color axis appears inside the legend and has its own legend symbol.
  484. * @private
  485. */
  486. ColorAxis.prototype.drawLegendSymbol = function (legend, item) {
  487. var axis = this;
  488. var padding = legend.padding;
  489. var legendOptions = legend.options;
  490. var horiz = axis.horiz;
  491. var width = pick(legendOptions.symbolWidth,
  492. horiz ? ColorAxis.defaultLegendLength : 12);
  493. var height = pick(legendOptions.symbolHeight,
  494. horiz ? 12 : ColorAxis.defaultLegendLength);
  495. var labelPadding = pick(legendOptions.labelPadding,
  496. horiz ? 16 : 30);
  497. var itemDistance = pick(legendOptions.itemDistance, 10);
  498. this.setLegendColor();
  499. // Create the gradient
  500. item.legendSymbol = this.chart.renderer.rect(0, legend.baseline - 11, width, height).attr({
  501. zIndex: 1
  502. }).add(item.legendGroup);
  503. // Set how much space this legend item takes up
  504. axis.legendItemWidth = width + padding + (horiz ? itemDistance : labelPadding);
  505. axis.legendItemHeight = height + padding + (horiz ? labelPadding : 0);
  506. };
  507. /**
  508. * Fool the legend.
  509. * @private
  510. */
  511. ColorAxis.prototype.setState = function (state) {
  512. this.series.forEach(function (series) {
  513. series.setState(state);
  514. });
  515. };
  516. /**
  517. * @private
  518. */
  519. ColorAxis.prototype.setVisible = function () {
  520. };
  521. /**
  522. * @private
  523. */
  524. ColorAxis.prototype.getSeriesExtremes = function () {
  525. var axis = this;
  526. var series = axis.series;
  527. var colorValArray,
  528. colorKey,
  529. colorValIndex,
  530. pointArrayMap,
  531. calculatedExtremes,
  532. cSeries,
  533. i = series.length,
  534. yData,
  535. j;
  536. this.dataMin = Infinity;
  537. this.dataMax = -Infinity;
  538. while (i--) { // x, y, value, other
  539. cSeries = series[i];
  540. colorKey = cSeries.colorKey = pick(cSeries.options.colorKey, cSeries.colorKey, cSeries.pointValKey, cSeries.zoneAxis, 'y');
  541. pointArrayMap = cSeries.pointArrayMap;
  542. calculatedExtremes = cSeries[colorKey + 'Min'] &&
  543. cSeries[colorKey + 'Max'];
  544. if (cSeries[colorKey + 'Data']) {
  545. colorValArray = cSeries[colorKey + 'Data'];
  546. }
  547. else {
  548. if (!pointArrayMap) {
  549. colorValArray = cSeries.yData;
  550. }
  551. else {
  552. colorValArray = [];
  553. colorValIndex = pointArrayMap.indexOf(colorKey);
  554. yData = cSeries.yData;
  555. if (colorValIndex >= 0 && yData) {
  556. for (j = 0; j < yData.length; j++) {
  557. colorValArray.push(pick(yData[j][colorValIndex], yData[j]));
  558. }
  559. }
  560. }
  561. }
  562. // If color key extremes are already calculated, use them.
  563. if (calculatedExtremes) {
  564. cSeries.minColorValue = cSeries[colorKey + 'Min'];
  565. cSeries.maxColorValue = cSeries[colorKey + 'Max'];
  566. }
  567. else {
  568. var cExtremes = LineSeries.prototype.getExtremes.call(cSeries,
  569. colorValArray);
  570. cSeries.minColorValue = cExtremes.dataMin;
  571. cSeries.maxColorValue = cExtremes.dataMax;
  572. }
  573. if (typeof cSeries.minColorValue !== 'undefined') {
  574. this.dataMin =
  575. Math.min(this.dataMin, cSeries.minColorValue);
  576. this.dataMax =
  577. Math.max(this.dataMax, cSeries.maxColorValue);
  578. }
  579. if (!calculatedExtremes) {
  580. LineSeries.prototype.applyExtremes.call(cSeries);
  581. }
  582. }
  583. };
  584. /**
  585. * Internal function to draw a crosshair.
  586. *
  587. * @function Highcharts.ColorAxis#drawCrosshair
  588. *
  589. * @param {Highcharts.PointerEventObject} [e]
  590. * The event arguments from the modified pointer event, extended with
  591. * `chartX` and `chartY`
  592. *
  593. * @param {Highcharts.Point} [point]
  594. * The Point object if the crosshair snaps to points.
  595. *
  596. * @fires Highcharts.ColorAxis#event:afterDrawCrosshair
  597. * @fires Highcharts.ColorAxis#event:drawCrosshair
  598. */
  599. ColorAxis.prototype.drawCrosshair = function (e, point) {
  600. var axis = this;
  601. var plotX = point && point.plotX;
  602. var plotY = point && point.plotY;
  603. var axisPos = axis.pos;
  604. var axisLen = axis.len;
  605. var crossPos;
  606. if (point) {
  607. crossPos = axis.toPixels(point.getNestedProperty(point.series.colorKey));
  608. if (crossPos < axisPos) {
  609. crossPos = axisPos - 2;
  610. }
  611. else if (crossPos > axisPos + axisLen) {
  612. crossPos = axisPos + axisLen + 2;
  613. }
  614. point.plotX = crossPos;
  615. point.plotY = axis.len - crossPos;
  616. _super.prototype.drawCrosshair.call(this, e, point);
  617. point.plotX = plotX;
  618. point.plotY = plotY;
  619. if (axis.cross &&
  620. !axis.cross.addedToColorAxis &&
  621. axis.legendGroup) {
  622. axis.cross
  623. .addClass('highcharts-coloraxis-marker')
  624. .add(axis.legendGroup);
  625. axis.cross.addedToColorAxis = true;
  626. if (!axis.chart.styledMode &&
  627. axis.crosshair) {
  628. axis.cross.attr({
  629. fill: axis.crosshair.color
  630. });
  631. }
  632. }
  633. }
  634. };
  635. /**
  636. * @private
  637. */
  638. ColorAxis.prototype.getPlotLinePath = function (options) {
  639. var axis = this,
  640. left = axis.left,
  641. pos = options.translatedValue,
  642. top = axis.top;
  643. // crosshairs only
  644. return isNumber(pos) ? // pos can be 0 (#3969)
  645. (axis.horiz ? [
  646. ['M', pos - 4, top - 6],
  647. ['L', pos + 4, top - 6],
  648. ['L', pos, top],
  649. ['Z']
  650. ] : [
  651. ['M', left, pos],
  652. ['L', left - 6, pos + 6],
  653. ['L', left - 6, pos - 6],
  654. ['Z']
  655. ]) :
  656. _super.prototype.getPlotLinePath.call(this, options);
  657. };
  658. /**
  659. * Updates a color axis instance with a new set of options. The options are
  660. * merged with the existing options, so only new or altered options need to
  661. * be specified.
  662. *
  663. * @function Highcharts.ColorAxis#update
  664. *
  665. * @param {Highcharts.ColorAxisOptions} newOptions
  666. * The new options that will be merged in with existing options on the color
  667. * axis.
  668. *
  669. * @param {boolean} [redraw]
  670. * Whether to redraw the chart after the color axis is altered. If doing
  671. * more operations on the chart, it is a good idea to set redraw to `false`
  672. * and call {@link Highcharts.Chart#redraw} after.
  673. */
  674. ColorAxis.prototype.update = function (newOptions, redraw) {
  675. var axis = this,
  676. chart = axis.chart,
  677. legend = chart.legend,
  678. updatedOptions = ColorAxis.buildOptions(chart, {},
  679. newOptions);
  680. this.series.forEach(function (series) {
  681. // Needed for Axis.update when choropleth colors change
  682. series.isDirtyData = true;
  683. });
  684. // When updating data classes, destroy old items and make sure new
  685. // ones are created (#3207)
  686. if (newOptions.dataClasses && legend.allItems || axis.dataClasses) {
  687. axis.destroyItems();
  688. }
  689. // Keep the options structure updated for export. Unlike xAxis and
  690. // yAxis, the colorAxis is not an array. (#3207)
  691. chart.options[axis.coll] =
  692. merge(axis.userOptions, updatedOptions);
  693. _super.prototype.update.call(this, updatedOptions, redraw);
  694. if (axis.legendItem) {
  695. axis.setLegendColor();
  696. legend.colorizeItem(this, true);
  697. }
  698. };
  699. /**
  700. * Destroy color axis legend items.
  701. * @private
  702. */
  703. ColorAxis.prototype.destroyItems = function () {
  704. var axis = this;
  705. var chart = axis.chart;
  706. if (axis.legendItem) {
  707. chart.legend.destroyItem(axis);
  708. }
  709. else if (axis.legendItems) {
  710. axis.legendItems.forEach(function (item) {
  711. chart.legend.destroyItem(item);
  712. });
  713. }
  714. chart.isDirtyLegend = true;
  715. };
  716. /**
  717. * Removes the color axis and the related legend item.
  718. *
  719. * @function Highcharts.ColorAxis#remove
  720. *
  721. * @param {boolean} [redraw=true]
  722. * Whether to redraw the chart following the remove.
  723. */
  724. ColorAxis.prototype.remove = function (redraw) {
  725. this.destroyItems();
  726. _super.prototype.remove.call(this, redraw);
  727. };
  728. /**
  729. * Get the legend item symbols for data classes.
  730. * @private
  731. */
  732. ColorAxis.prototype.getDataClassLegendSymbols = function () {
  733. var axis = this;
  734. var chart = axis.chart;
  735. var legendItems = axis.legendItems;
  736. var legendOptions = chart.options.legend;
  737. var valueDecimals = legendOptions.valueDecimals;
  738. var valueSuffix = legendOptions.valueSuffix || '';
  739. var name;
  740. if (!legendItems.length) {
  741. axis.dataClasses.forEach(function (dataClass, i) {
  742. var vis = true,
  743. from = dataClass.from,
  744. to = dataClass.to;
  745. var numberFormatter = chart.numberFormatter;
  746. // Assemble the default name. This can be overridden
  747. // by legend.options.labelFormatter
  748. name = '';
  749. if (typeof from === 'undefined') {
  750. name = '< ';
  751. }
  752. else if (typeof to === 'undefined') {
  753. name = '> ';
  754. }
  755. if (typeof from !== 'undefined') {
  756. name += numberFormatter(from, valueDecimals) + valueSuffix;
  757. }
  758. if (typeof from !== 'undefined' && typeof to !== 'undefined') {
  759. name += ' - ';
  760. }
  761. if (typeof to !== 'undefined') {
  762. name += numberFormatter(to, valueDecimals) + valueSuffix;
  763. }
  764. // Add a mock object to the legend items
  765. legendItems.push(extend({
  766. chart: chart,
  767. name: name,
  768. options: {},
  769. drawLegendSymbol: LegendSymbolMixin.drawRectangle,
  770. visible: true,
  771. setState: noop,
  772. isDataClass: true,
  773. setVisible: function () {
  774. vis = axis.visible = !vis;
  775. axis.series.forEach(function (series) {
  776. series.points.forEach(function (point) {
  777. if (point.dataClass === i) {
  778. point.setVisible(vis);
  779. }
  780. });
  781. });
  782. chart.legend.colorizeItem(this, vis);
  783. }
  784. }, dataClass));
  785. });
  786. }
  787. return legendItems;
  788. };
  789. /* *
  790. *
  791. * Static Functions
  792. *
  793. * */
  794. ColorAxis.defaultLegendLength = 200;
  795. /**
  796. * A color axis for series. Visually, the color
  797. * axis will appear as a gradient or as separate items inside the
  798. * legend, depending on whether the axis is scalar or based on data
  799. * classes.
  800. *
  801. * For supported color formats, see the
  802. * [docs article about colors](https://www.highcharts.com/docs/chart-design-and-style/colors).
  803. *
  804. * A scalar color axis is represented by a gradient. The colors either
  805. * range between the [minColor](#colorAxis.minColor) and the
  806. * [maxColor](#colorAxis.maxColor), or for more fine grained control the
  807. * colors can be defined in [stops](#colorAxis.stops). Often times, the
  808. * color axis needs to be adjusted to get the right color spread for the
  809. * data. In addition to stops, consider using a logarithmic
  810. * [axis type](#colorAxis.type), or setting [min](#colorAxis.min) and
  811. * [max](#colorAxis.max) to avoid the colors being determined by
  812. * outliers.
  813. *
  814. * When [dataClasses](#colorAxis.dataClasses) are used, the ranges are
  815. * subdivided into separate classes like categories based on their
  816. * values. This can be used for ranges between two values, but also for
  817. * a true category. However, when your data is categorized, it may be as
  818. * convenient to add each category to a separate series.
  819. *
  820. * Color axis does not work with: `sankey`, `sunburst`, `dependencywheel`,
  821. * `networkgraph`, `wordcloud`, `venn`, `gauge` and `solidgauge` series
  822. * types.
  823. *
  824. * Since v7.2.0 `colorAxis` can also be an array of options objects.
  825. *
  826. * See [the Axis object](/class-reference/Highcharts.Axis) for
  827. * programmatic access to the axis.
  828. *
  829. * @sample {highcharts} highcharts/coloraxis/custom-color-key
  830. * Column chart with color axis
  831. * @sample {highcharts} highcharts/coloraxis/horizontal-layout
  832. * Horizontal layout
  833. * @sample {highmaps} maps/coloraxis/dataclasscolor
  834. * With data classes
  835. * @sample {highmaps} maps/coloraxis/mincolor-maxcolor
  836. * Min color and max color
  837. *
  838. * @extends xAxis
  839. * @excluding alignTicks, allowDecimals, alternateGridColor, breaks,
  840. * categories, crosshair, dateTimeLabelFormats, height, left,
  841. * lineWidth, linkedTo, maxZoom, minRange, minTickInterval,
  842. * offset, opposite, pane, plotBands, plotLines,
  843. * reversedStacks, showEmpty, title, top, width, zoomEnabled
  844. * @product highcharts highstock highmaps
  845. * @type {*|Array<*>}
  846. * @optionparent colorAxis
  847. * @ignore
  848. */
  849. ColorAxis.defaultOptions = {
  850. /**
  851. * Whether to allow decimals on the color axis.
  852. * @type {boolean}
  853. * @default true
  854. * @product highcharts highstock highmaps
  855. * @apioption colorAxis.allowDecimals
  856. */
  857. /**
  858. * Determines how to set each data class' color if no individual
  859. * color is set. The default value, `tween`, computes intermediate
  860. * colors between `minColor` and `maxColor`. The other possible
  861. * value, `category`, pulls colors from the global or chart specific
  862. * [colors](#colors) array.
  863. *
  864. * @sample {highmaps} maps/coloraxis/dataclasscolor/
  865. * Category colors
  866. *
  867. * @type {string}
  868. * @default tween
  869. * @product highcharts highstock highmaps
  870. * @validvalue ["tween", "category"]
  871. * @apioption colorAxis.dataClassColor
  872. */
  873. /**
  874. * An array of data classes or ranges for the choropleth map. If
  875. * none given, the color axis is scalar and values are distributed
  876. * as a gradient between the minimum and maximum colors.
  877. *
  878. * @sample {highmaps} maps/demo/data-class-ranges/
  879. * Multiple ranges
  880. *
  881. * @sample {highmaps} maps/demo/data-class-two-ranges/
  882. * Two ranges
  883. *
  884. * @type {Array<*>}
  885. * @product highcharts highstock highmaps
  886. * @apioption colorAxis.dataClasses
  887. */
  888. /**
  889. * The layout of the color axis. Can be `'horizontal'` or `'vertical'`.
  890. * If none given, the color axis has the same layout as the legend.
  891. *
  892. * @sample highcharts/coloraxis/horizontal-layout/
  893. * Horizontal color axis layout with vertical legend
  894. *
  895. * @type {string|undefined}
  896. * @since 7.2.0
  897. * @product highcharts highstock highmaps
  898. * @apioption colorAxis.layout
  899. */
  900. /**
  901. * The color of each data class. If not set, the color is pulled
  902. * from the global or chart-specific [colors](#colors) array. In
  903. * styled mode, this option is ignored. Instead, use colors defined
  904. * in CSS.
  905. *
  906. * @sample {highmaps} maps/demo/data-class-two-ranges/
  907. * Explicit colors
  908. *
  909. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  910. * @product highcharts highstock highmaps
  911. * @apioption colorAxis.dataClasses.color
  912. */
  913. /**
  914. * The start of the value range that the data class represents,
  915. * relating to the point value.
  916. *
  917. * The range of each `dataClass` is closed in both ends, but can be
  918. * overridden by the next `dataClass`.
  919. *
  920. * @type {number}
  921. * @product highcharts highstock highmaps
  922. * @apioption colorAxis.dataClasses.from
  923. */
  924. /**
  925. * The name of the data class as it appears in the legend.
  926. * If no name is given, it is automatically created based on the
  927. * `from` and `to` values. For full programmatic control,
  928. * [legend.labelFormatter](#legend.labelFormatter) can be used.
  929. * In the formatter, `this.from` and `this.to` can be accessed.
  930. *
  931. * @sample {highmaps} maps/coloraxis/dataclasses-name/
  932. * Named data classes
  933. *
  934. * @sample {highmaps} maps/coloraxis/dataclasses-labelformatter/
  935. * Formatted data classes
  936. *
  937. * @type {string}
  938. * @product highcharts highstock highmaps
  939. * @apioption colorAxis.dataClasses.name
  940. */
  941. /**
  942. * The end of the value range that the data class represents,
  943. * relating to the point value.
  944. *
  945. * The range of each `dataClass` is closed in both ends, but can be
  946. * overridden by the next `dataClass`.
  947. *
  948. * @type {number}
  949. * @product highcharts highstock highmaps
  950. * @apioption colorAxis.dataClasses.to
  951. */
  952. /** @ignore-option */
  953. lineWidth: 0,
  954. /**
  955. * Padding of the min value relative to the length of the axis. A
  956. * padding of 0.05 will make a 100px axis 5px longer.
  957. *
  958. * @product highcharts highstock highmaps
  959. */
  960. minPadding: 0,
  961. /**
  962. * The maximum value of the axis in terms of map point values. If
  963. * `null`, the max value is automatically calculated. If the
  964. * `endOnTick` option is true, the max value might be rounded up.
  965. *
  966. * @sample {highmaps} maps/coloraxis/gridlines/
  967. * Explicit min and max to reduce the effect of outliers
  968. *
  969. * @type {number}
  970. * @product highcharts highstock highmaps
  971. * @apioption colorAxis.max
  972. */
  973. /**
  974. * The minimum value of the axis in terms of map point values. If
  975. * `null`, the min value is automatically calculated. If the
  976. * `startOnTick` option is true, the min value might be rounded
  977. * down.
  978. *
  979. * @sample {highmaps} maps/coloraxis/gridlines/
  980. * Explicit min and max to reduce the effect of outliers
  981. *
  982. * @type {number}
  983. * @product highcharts highstock highmaps
  984. * @apioption colorAxis.min
  985. */
  986. /**
  987. * Padding of the max value relative to the length of the axis. A
  988. * padding of 0.05 will make a 100px axis 5px longer.
  989. *
  990. * @product highcharts highstock highmaps
  991. */
  992. maxPadding: 0,
  993. /**
  994. * Color of the grid lines extending from the axis across the
  995. * gradient.
  996. *
  997. * @sample {highmaps} maps/coloraxis/gridlines/
  998. * Grid lines demonstrated
  999. *
  1000. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1001. * @default #e6e6e6
  1002. * @product highcharts highstock highmaps
  1003. * @apioption colorAxis.gridLineColor
  1004. */
  1005. /**
  1006. * The width of the grid lines extending from the axis across the
  1007. * gradient of a scalar color axis.
  1008. *
  1009. * @sample {highmaps} maps/coloraxis/gridlines/
  1010. * Grid lines demonstrated
  1011. *
  1012. * @product highcharts highstock highmaps
  1013. */
  1014. gridLineWidth: 1,
  1015. /**
  1016. * The interval of the tick marks in axis units. When `null`, the
  1017. * tick interval is computed to approximately follow the
  1018. * `tickPixelInterval`.
  1019. *
  1020. * @type {number}
  1021. * @product highcharts highstock highmaps
  1022. * @apioption colorAxis.tickInterval
  1023. */
  1024. /**
  1025. * If [tickInterval](#colorAxis.tickInterval) is `null` this option
  1026. * sets the approximate pixel interval of the tick marks.
  1027. *
  1028. * @product highcharts highstock highmaps
  1029. */
  1030. tickPixelInterval: 72,
  1031. /**
  1032. * Whether to force the axis to start on a tick. Use this option
  1033. * with the `maxPadding` option to control the axis start.
  1034. *
  1035. * @product highcharts highstock highmaps
  1036. */
  1037. startOnTick: true,
  1038. /**
  1039. * Whether to force the axis to end on a tick. Use this option with
  1040. * the [maxPadding](#colorAxis.maxPadding) option to control the
  1041. * axis end.
  1042. *
  1043. * @product highcharts highstock highmaps
  1044. */
  1045. endOnTick: true,
  1046. /** @ignore */
  1047. offset: 0,
  1048. /**
  1049. * The triangular marker on a scalar color axis that points to the
  1050. * value of the hovered area. To disable the marker, set
  1051. * `marker: null`.
  1052. *
  1053. * @sample {highmaps} maps/coloraxis/marker/
  1054. * Black marker
  1055. *
  1056. * @declare Highcharts.PointMarkerOptionsObject
  1057. * @product highcharts highstock highmaps
  1058. */
  1059. marker: {
  1060. /**
  1061. * Animation for the marker as it moves between values. Set to
  1062. * `false` to disable animation. Defaults to `{ duration: 50 }`.
  1063. *
  1064. * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}
  1065. * @product highcharts highstock highmaps
  1066. */
  1067. animation: {
  1068. /** @internal */
  1069. duration: 50
  1070. },
  1071. /** @internal */
  1072. width: 0.01,
  1073. /**
  1074. * The color of the marker.
  1075. *
  1076. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1077. * @product highcharts highstock highmaps
  1078. */
  1079. color: '#999999'
  1080. },
  1081. /**
  1082. * The axis labels show the number for each tick.
  1083. *
  1084. * For more live examples on label options, see [xAxis.labels in the
  1085. * Highcharts API.](/highcharts#xAxis.labels)
  1086. *
  1087. * @extends xAxis.labels
  1088. * @product highcharts highstock highmaps
  1089. */
  1090. labels: {
  1091. /**
  1092. * How to handle overflowing labels on horizontal color axis. If set
  1093. * to `"allow"`, it will not be aligned at all. By default it
  1094. * `"justify"` labels inside the chart area. If there is room to
  1095. * move it, it will be aligned to the edge, else it will be removed.
  1096. *
  1097. * @validvalue ["allow", "justify"]
  1098. * @product highcharts highstock highmaps
  1099. */
  1100. overflow: 'justify',
  1101. rotation: 0
  1102. },
  1103. /**
  1104. * The color to represent the minimum of the color axis. Unless
  1105. * [dataClasses](#colorAxis.dataClasses) or
  1106. * [stops](#colorAxis.stops) are set, the gradient starts at this
  1107. * value.
  1108. *
  1109. * If dataClasses are set, the color is based on minColor and
  1110. * maxColor unless a color is set for each data class, or the
  1111. * [dataClassColor](#colorAxis.dataClassColor) is set.
  1112. *
  1113. * @sample {highmaps} maps/coloraxis/mincolor-maxcolor/
  1114. * Min and max colors on scalar (gradient) axis
  1115. * @sample {highmaps} maps/coloraxis/mincolor-maxcolor-dataclasses/
  1116. * On data classes
  1117. *
  1118. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1119. * @product highcharts highstock highmaps
  1120. */
  1121. minColor: '#e6ebf5',
  1122. /**
  1123. * The color to represent the maximum of the color axis. Unless
  1124. * [dataClasses](#colorAxis.dataClasses) or
  1125. * [stops](#colorAxis.stops) are set, the gradient ends at this
  1126. * value.
  1127. *
  1128. * If dataClasses are set, the color is based on minColor and
  1129. * maxColor unless a color is set for each data class, or the
  1130. * [dataClassColor](#colorAxis.dataClassColor) is set.
  1131. *
  1132. * @sample {highmaps} maps/coloraxis/mincolor-maxcolor/
  1133. * Min and max colors on scalar (gradient) axis
  1134. * @sample {highmaps} maps/coloraxis/mincolor-maxcolor-dataclasses/
  1135. * On data classes
  1136. *
  1137. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1138. * @product highcharts highstock highmaps
  1139. */
  1140. maxColor: '#003399',
  1141. /**
  1142. * Color stops for the gradient of a scalar color axis. Use this in
  1143. * cases where a linear gradient between a `minColor` and `maxColor`
  1144. * is not sufficient. The stops is an array of tuples, where the
  1145. * first item is a float between 0 and 1 assigning the relative
  1146. * position in the gradient, and the second item is the color.
  1147. *
  1148. * @sample {highmaps} maps/demo/heatmap/
  1149. * Heatmap with three color stops
  1150. *
  1151. * @type {Array<Array<number,Highcharts.ColorString>>}
  1152. * @product highcharts highstock highmaps
  1153. * @apioption colorAxis.stops
  1154. */
  1155. /**
  1156. * The pixel length of the main tick marks on the color axis.
  1157. */
  1158. tickLength: 5,
  1159. /**
  1160. * The type of interpolation to use for the color axis. Can be
  1161. * `linear` or `logarithmic`.
  1162. *
  1163. * @sample highcharts/coloraxis/logarithmic-with-emulate-negative-values/
  1164. * Logarithmic color axis with extension to emulate negative
  1165. * values
  1166. *
  1167. * @type {Highcharts.ColorAxisTypeValue}
  1168. * @default linear
  1169. * @product highcharts highstock highmaps
  1170. * @apioption colorAxis.type
  1171. */
  1172. /**
  1173. * Whether to reverse the axis so that the highest number is closest
  1174. * to the origin. Defaults to `false` in a horizontal legend and
  1175. * `true` in a vertical legend, where the smallest value starts on
  1176. * top.
  1177. *
  1178. * @type {boolean}
  1179. * @product highcharts highstock highmaps
  1180. * @apioption colorAxis.reversed
  1181. */
  1182. /**
  1183. * @product highcharts highstock highmaps
  1184. * @excluding afterBreaks, pointBreak, pointInBreak
  1185. * @apioption colorAxis.events
  1186. */
  1187. /**
  1188. * Fires when the legend item belonging to the colorAxis is clicked.
  1189. * One parameter, `event`, is passed to the function.
  1190. *
  1191. * @type {Function}
  1192. * @product highcharts highstock highmaps
  1193. * @apioption colorAxis.events.legendItemClick
  1194. */
  1195. /**
  1196. * Whether to display the colorAxis in the legend.
  1197. *
  1198. * @sample highcharts/coloraxis/hidden-coloraxis-with-3d-chart/
  1199. * Hidden color axis with 3d chart
  1200. *
  1201. * @see [heatmap.showInLegend](#series.heatmap.showInLegend)
  1202. *
  1203. * @since 4.2.7
  1204. * @product highcharts highstock highmaps
  1205. */
  1206. showInLegend: true
  1207. };
  1208. /**
  1209. * @private
  1210. */
  1211. ColorAxis.keepProps = [
  1212. 'legendGroup',
  1213. 'legendItemHeight',
  1214. 'legendItemWidth',
  1215. 'legendItem',
  1216. 'legendSymbol'
  1217. ];
  1218. return ColorAxis;
  1219. }(Axis));
  1220. // Properties to preserve after destroy, for Axis.update (#5881, #6025).
  1221. Array.prototype.push.apply(Axis.keepProps, ColorAxis.keepProps);
  1222. H.ColorAxis = ColorAxis;
  1223. /**
  1224. * Handle animation of the color attributes directly
  1225. *
  1226. * @private
  1227. * @function Highcharts.Fx#fillSetter
  1228. */ /**
  1229. * Handle animation of the color attributes directly
  1230. *
  1231. * @private
  1232. * @function Highcharts.Fx#strokeSetter
  1233. */
  1234. ['fill', 'stroke'].forEach(function (prop) {
  1235. Fx.prototype[prop + 'Setter'] = function () {
  1236. this.elem.attr(prop, color(this.start).tweenTo(color(this.end), this.pos), null, true);
  1237. };
  1238. });
  1239. // Extend the chart getAxes method to also get the color axis
  1240. addEvent(Chart, 'afterGetAxes', function () {
  1241. var chart = this,
  1242. options = chart.options;
  1243. this.colorAxis = [];
  1244. if (options.colorAxis) {
  1245. options.colorAxis = splat(options.colorAxis);
  1246. options.colorAxis.forEach(function (axisOptions, i) {
  1247. axisOptions.index = i;
  1248. new ColorAxis(chart, axisOptions); // eslint-disable-line no-new
  1249. });
  1250. }
  1251. });
  1252. // Add colorAxis to series axisTypes
  1253. addEvent(LineSeries, 'bindAxes', function () {
  1254. var axisTypes = this.axisTypes;
  1255. if (!axisTypes) {
  1256. this.axisTypes = ['colorAxis'];
  1257. }
  1258. else if (axisTypes.indexOf('colorAxis') === -1) {
  1259. axisTypes.push('colorAxis');
  1260. }
  1261. });
  1262. // Add the color axis. This also removes the axis' own series to prevent
  1263. // them from showing up individually.
  1264. addEvent(Legend, 'afterGetAllItems', function (e) {
  1265. var colorAxisItems = [],
  1266. colorAxes = this.chart.colorAxis || [],
  1267. options,
  1268. i;
  1269. colorAxes.forEach(function (colorAxis) {
  1270. options = colorAxis.options;
  1271. if (options && options.showInLegend) {
  1272. // Data classes
  1273. if (options.dataClasses && options.visible) {
  1274. colorAxisItems = colorAxisItems.concat(colorAxis.getDataClassLegendSymbols());
  1275. // Gradient legend
  1276. }
  1277. else if (options.visible) {
  1278. // Add this axis on top
  1279. colorAxisItems.push(colorAxis);
  1280. }
  1281. // If dataClasses are defined or showInLegend option is not set to
  1282. // true, do not add color axis' series to legend.
  1283. colorAxis.series.forEach(function (series) {
  1284. if (!series.options.showInLegend || options.dataClasses) {
  1285. if (series.options.legendType === 'point') {
  1286. series.points.forEach(function (point) {
  1287. erase(e.allItems, point);
  1288. });
  1289. }
  1290. else {
  1291. erase(e.allItems, series);
  1292. }
  1293. }
  1294. });
  1295. }
  1296. });
  1297. i = colorAxisItems.length;
  1298. while (i--) {
  1299. e.allItems.unshift(colorAxisItems[i]);
  1300. }
  1301. });
  1302. addEvent(Legend, 'afterColorizeItem', function (e) {
  1303. if (e.visible && e.item.legendColor) {
  1304. e.item.legendSymbol.attr({
  1305. fill: e.item.legendColor
  1306. });
  1307. }
  1308. });
  1309. // Updates in the legend need to be reflected in the color axis (6888)
  1310. addEvent(Legend, 'afterUpdate', function () {
  1311. var colorAxes = this.chart.colorAxis;
  1312. if (colorAxes) {
  1313. colorAxes.forEach(function (colorAxis) {
  1314. colorAxis.update({}, arguments[2]);
  1315. });
  1316. }
  1317. });
  1318. // Calculate and set colors for points
  1319. addEvent(LineSeries, 'afterTranslate', function () {
  1320. if (this.chart.colorAxis &&
  1321. this.chart.colorAxis.length ||
  1322. this.colorAttribs) {
  1323. this.translateColors();
  1324. }
  1325. });
  1326. return ColorAxis;
  1327. });
  1328. _registerModule(_modules, 'Mixins/ColorMapSeries.js', [_modules['Core/Globals.js'], _modules['Core/Series/Point.js'], _modules['Core/Utilities.js']], function (H, Point, U) {
  1329. /* *
  1330. *
  1331. * (c) 2010-2020 Torstein Honsi
  1332. *
  1333. * License: www.highcharts.com/license
  1334. *
  1335. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  1336. *
  1337. * */
  1338. var defined = U.defined;
  1339. var noop = H.noop,
  1340. seriesTypes = H.seriesTypes;
  1341. /**
  1342. * Mixin for maps and heatmaps
  1343. *
  1344. * @private
  1345. * @mixin Highcharts.colorMapPointMixin
  1346. */
  1347. var colorMapPointMixin = {
  1348. dataLabelOnNull: true,
  1349. /* eslint-disable valid-jsdoc */
  1350. /**
  1351. * Color points have a value option that determines whether or not it is
  1352. * a null point
  1353. * @private
  1354. * @function Highcharts.colorMapPointMixin.isValid
  1355. * @return {boolean}
  1356. */
  1357. isValid: function () {
  1358. // undefined is allowed
  1359. return (this.value !== null &&
  1360. this.value !== Infinity &&
  1361. this.value !== -Infinity);
  1362. },
  1363. /**
  1364. * @private
  1365. * @function Highcharts.colorMapPointMixin.setState
  1366. * @param {string} state
  1367. * @return {void}
  1368. */
  1369. setState: function (state) {
  1370. Point.prototype.setState.call(this, state);
  1371. if (this.graphic) {
  1372. this.graphic.attr({
  1373. zIndex: state === 'hover' ? 1 : 0
  1374. });
  1375. }
  1376. }
  1377. /* eslint-enable valid-jsdoc */
  1378. };
  1379. /**
  1380. * @private
  1381. * @mixin Highcharts.colorMapSeriesMixin
  1382. */
  1383. var colorMapSeriesMixin = {
  1384. pointArrayMap: ['value'],
  1385. axisTypes: ['xAxis', 'yAxis', 'colorAxis'],
  1386. trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
  1387. getSymbol: noop,
  1388. parallelArrays: ['x', 'y', 'value'],
  1389. colorKey: 'value',
  1390. pointAttribs: seriesTypes.column.prototype.pointAttribs,
  1391. /* eslint-disable valid-jsdoc */
  1392. /**
  1393. * Get the color attibutes to apply on the graphic
  1394. * @private
  1395. * @function Highcharts.colorMapSeriesMixin.colorAttribs
  1396. * @param {Highcharts.Point} point
  1397. * @return {Highcharts.SVGAttributes}
  1398. */
  1399. colorAttribs: function (point) {
  1400. var ret = {};
  1401. if (defined(point.color)) {
  1402. ret[this.colorProp || 'fill'] = point.color;
  1403. }
  1404. return ret;
  1405. }
  1406. };
  1407. var exports = {
  1408. colorMapPointMixin: colorMapPointMixin,
  1409. colorMapSeriesMixin: colorMapSeriesMixin
  1410. };
  1411. return exports;
  1412. });
  1413. _registerModule(_modules, 'Series/HeatmapSeries.js', [_modules['Core/Series/Series.js'], _modules['Mixins/ColorMapSeries.js'], _modules['Core/Globals.js'], _modules['Mixins/LegendSymbol.js'], _modules['Core/Renderer/SVG/SVGRenderer.js'], _modules['Core/Utilities.js']], function (BaseSeries, ColorMapMixin, H, LegendSymbolMixin, SVGRenderer, U) {
  1414. /* *
  1415. *
  1416. * (c) 2010-2020 Torstein Honsi
  1417. *
  1418. * License: www.highcharts.com/license
  1419. *
  1420. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  1421. *
  1422. * */
  1423. var colorMapPointMixin = ColorMapMixin.colorMapPointMixin,
  1424. colorMapSeriesMixin = ColorMapMixin.colorMapSeriesMixin;
  1425. var noop = H.noop;
  1426. var clamp = U.clamp,
  1427. extend = U.extend,
  1428. fireEvent = U.fireEvent,
  1429. isNumber = U.isNumber,
  1430. merge = U.merge,
  1431. pick = U.pick;
  1432. var Series = H.Series,
  1433. seriesTypes = BaseSeries.seriesTypes,
  1434. symbols = SVGRenderer.prototype.symbols;
  1435. /* *
  1436. * @interface Highcharts.PointOptionsObject in parts/Point.ts
  1437. */ /**
  1438. * Heatmap series only. Point padding for a single point.
  1439. * @name Highcharts.PointOptionsObject#pointPadding
  1440. * @type {number|undefined}
  1441. */ /**
  1442. * Heatmap series only. The value of the point, resulting in a color controled
  1443. * by options as set in the colorAxis configuration.
  1444. * @name Highcharts.PointOptionsObject#value
  1445. * @type {number|null|undefined}
  1446. */
  1447. ''; // detach doclets above
  1448. /**
  1449. * @private
  1450. * @class
  1451. * @name Highcharts.seriesTypes.heatmap
  1452. *
  1453. * @augments Highcharts.Series
  1454. */
  1455. BaseSeries.seriesType('heatmap', 'scatter',
  1456. /**
  1457. * A heatmap is a graphical representation of data where the individual
  1458. * values contained in a matrix are represented as colors.
  1459. *
  1460. * @productdesc {highcharts}
  1461. * Requires `modules/heatmap`.
  1462. *
  1463. * @sample highcharts/demo/heatmap/
  1464. * Simple heatmap
  1465. * @sample highcharts/demo/heatmap-canvas/
  1466. * Heavy heatmap
  1467. *
  1468. * @extends plotOptions.scatter
  1469. * @excluding animationLimit, connectEnds, connectNulls, cropThreshold,
  1470. * dashStyle, findNearestPointBy, getExtremesFromAll, jitter,
  1471. * linecap, lineWidth, pointInterval, pointIntervalUnit,
  1472. * pointRange, pointStart, shadow, softThreshold, stacking,
  1473. * step, threshold, cluster
  1474. * @product highcharts highmaps
  1475. * @optionparent plotOptions.heatmap
  1476. */
  1477. {
  1478. /**
  1479. * Animation is disabled by default on the heatmap series.
  1480. */
  1481. animation: false,
  1482. /**
  1483. * The border width for each heat map item.
  1484. */
  1485. borderWidth: 0,
  1486. /**
  1487. * Padding between the points in the heatmap.
  1488. *
  1489. * @type {number}
  1490. * @default 0
  1491. * @since 6.0
  1492. * @apioption plotOptions.heatmap.pointPadding
  1493. */
  1494. /**
  1495. * @default value
  1496. * @apioption plotOptions.heatmap.colorKey
  1497. */
  1498. /**
  1499. * The main color of the series. In heat maps this color is rarely used,
  1500. * as we mostly use the color to denote the value of each point. Unless
  1501. * options are set in the [colorAxis](#colorAxis), the default value
  1502. * is pulled from the [options.colors](#colors) array.
  1503. *
  1504. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1505. * @since 4.0
  1506. * @product highcharts
  1507. * @apioption plotOptions.heatmap.color
  1508. */
  1509. /**
  1510. * The column size - how many X axis units each column in the heatmap
  1511. * should span.
  1512. *
  1513. * @sample {highcharts} maps/demo/heatmap/
  1514. * One day
  1515. * @sample {highmaps} maps/demo/heatmap/
  1516. * One day
  1517. *
  1518. * @type {number}
  1519. * @default 1
  1520. * @since 4.0
  1521. * @product highcharts highmaps
  1522. * @apioption plotOptions.heatmap.colsize
  1523. */
  1524. /**
  1525. * The row size - how many Y axis units each heatmap row should span.
  1526. *
  1527. * @sample {highcharts} maps/demo/heatmap/
  1528. * 1 by default
  1529. * @sample {highmaps} maps/demo/heatmap/
  1530. * 1 by default
  1531. *
  1532. * @type {number}
  1533. * @default 1
  1534. * @since 4.0
  1535. * @product highcharts highmaps
  1536. * @apioption plotOptions.heatmap.rowsize
  1537. */
  1538. /**
  1539. * The color applied to null points. In styled mode, a general CSS class
  1540. * is applied instead.
  1541. *
  1542. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  1543. */
  1544. nullColor: '#f7f7f7',
  1545. dataLabels: {
  1546. formatter: function () {
  1547. return this.point.value;
  1548. },
  1549. inside: true,
  1550. verticalAlign: 'middle',
  1551. crop: false,
  1552. overflow: false,
  1553. padding: 0 // #3837
  1554. },
  1555. /**
  1556. * @excluding radius, enabledThreshold
  1557. * @since 8.1
  1558. */
  1559. marker: {
  1560. /**
  1561. * A predefined shape or symbol for the marker. When undefined, the
  1562. * symbol is pulled from options.symbols. Other possible values are
  1563. * `'circle'`, `'square'`,`'diamond'`, `'triangle'`,
  1564. * `'triangle-down'`, `'rect'`, and `'ellipse'`.
  1565. *
  1566. * Additionally, the URL to a graphic can be given on this form:
  1567. * `'url(graphic.png)'`. Note that for the image to be applied to
  1568. * exported charts, its URL needs to be accessible by the export
  1569. * server.
  1570. *
  1571. * Custom callbacks for symbol path generation can also be added to
  1572. * `Highcharts.SVGRenderer.prototype.symbols`. The callback is then
  1573. * used by its method name, as shown in the demo.
  1574. *
  1575. * @sample {highcharts} highcharts/plotoptions/series-marker-symbol/
  1576. * Predefined, graphic and custom markers
  1577. * @sample {highstock} highcharts/plotoptions/series-marker-symbol/
  1578. * Predefined, graphic and custom markers
  1579. */
  1580. symbol: 'rect',
  1581. /** @ignore-option */
  1582. radius: 0,
  1583. lineColor: void 0,
  1584. states: {
  1585. /**
  1586. * @excluding radius, radiusPlus
  1587. */
  1588. hover: {
  1589. /**
  1590. * Set the marker's fixed width on hover state.
  1591. *
  1592. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  1593. * 70px fixed marker's width and height on hover
  1594. *
  1595. * @type {number|undefined}
  1596. * @default undefined
  1597. * @product highcharts highmaps
  1598. * @apioption plotOptions.heatmap.marker.states.hover.width
  1599. */
  1600. /**
  1601. * Set the marker's fixed height on hover state.
  1602. *
  1603. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  1604. * 70px fixed marker's width and height on hover
  1605. *
  1606. * @type {number|undefined}
  1607. * @default undefined
  1608. * @product highcharts highmaps
  1609. * @apioption plotOptions.heatmap.marker.states.hover.height
  1610. */
  1611. /**
  1612. * The number of pixels to increase the width of the
  1613. * selected point.
  1614. *
  1615. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  1616. * 20px greater width and height on hover
  1617. *
  1618. * @type {number|undefined}
  1619. * @default undefined
  1620. * @product highcharts highmaps
  1621. * @apioption plotOptions.heatmap.marker.states.hover.widthPlus
  1622. */
  1623. /**
  1624. * The number of pixels to increase the height of the
  1625. * selected point.
  1626. *
  1627. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  1628. * 20px greater width and height on hover
  1629. *
  1630. * @type {number|undefined}
  1631. * @default undefined
  1632. * @product highcharts highmaps
  1633. * @apioption plotOptions.heatmap.marker.states.hover.heightPlus
  1634. */
  1635. /**
  1636. * The additional line width for a hovered point.
  1637. *
  1638. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  1639. * 5 pixels wider lineWidth on hover
  1640. * @sample {highmaps} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  1641. * 5 pixels wider lineWidth on hover
  1642. */
  1643. lineWidthPlus: 0
  1644. },
  1645. /**
  1646. * @excluding radius
  1647. */
  1648. select: {
  1649. /**
  1650. * Set the marker's fixed width on select state.
  1651. *
  1652. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  1653. * 70px fixed marker's width and height on hover
  1654. *
  1655. * @type {number|undefined}
  1656. * @default undefined
  1657. * @product highcharts highmaps
  1658. * @apioption plotOptions.heatmap.marker.states.select.width
  1659. */
  1660. /**
  1661. * Set the marker's fixed height on select state.
  1662. *
  1663. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  1664. * 70px fixed marker's width and height on hover
  1665. *
  1666. * @type {number|undefined}
  1667. * @default undefined
  1668. * @product highcharts highmaps
  1669. * @apioption plotOptions.heatmap.marker.states.select.height
  1670. */
  1671. /**
  1672. * The number of pixels to increase the width of the
  1673. * selected point.
  1674. *
  1675. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  1676. * 20px greater width and height on hover
  1677. *
  1678. * @type {number|undefined}
  1679. * @default undefined
  1680. * @product highcharts highmaps
  1681. * @apioption plotOptions.heatmap.marker.states.select.widthPlus
  1682. */
  1683. /**
  1684. * The number of pixels to increase the height of the
  1685. * selected point.
  1686. *
  1687. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  1688. * 20px greater width and height on hover
  1689. *
  1690. * @type {number|undefined}
  1691. * @default undefined
  1692. * @product highcharts highmaps
  1693. * @apioption plotOptions.heatmap.marker.states.select.heightPlus
  1694. */
  1695. }
  1696. }
  1697. },
  1698. clip: true,
  1699. /** @ignore-option */
  1700. pointRange: null,
  1701. tooltip: {
  1702. pointFormat: '{point.x}, {point.y}: {point.value}<br/>'
  1703. },
  1704. states: {
  1705. hover: {
  1706. /** @ignore-option */
  1707. halo: false,
  1708. /**
  1709. * How much to brighten the point on interaction. Requires the
  1710. * main color to be defined in hex or rgb(a) format.
  1711. *
  1712. * In styled mode, the hover brightening is by default replaced
  1713. * with a fill-opacity set in the `.highcharts-point:hover`
  1714. * rule.
  1715. */
  1716. brightness: 0.2
  1717. }
  1718. }
  1719. }, merge(colorMapSeriesMixin, {
  1720. pointArrayMap: ['y', 'value'],
  1721. hasPointSpecificOptions: true,
  1722. getExtremesFromAll: true,
  1723. directTouch: true,
  1724. /* eslint-disable valid-jsdoc */
  1725. /**
  1726. * Override the init method to add point ranges on both axes.
  1727. *
  1728. * @private
  1729. * @function Highcharts.seriesTypes.heatmap#init
  1730. * @return {void}
  1731. */
  1732. init: function () {
  1733. var options;
  1734. Series.prototype.init.apply(this, arguments);
  1735. options = this.options;
  1736. // #3758, prevent resetting in setData
  1737. options.pointRange = pick(options.pointRange, options.colsize || 1);
  1738. // general point range
  1739. this.yAxis.axisPointRange = options.rowsize || 1;
  1740. // Bind new symbol names
  1741. extend(symbols, {
  1742. ellipse: symbols.circle,
  1743. rect: symbols.square
  1744. });
  1745. },
  1746. getSymbol: Series.prototype.getSymbol,
  1747. /**
  1748. * @private
  1749. * @function Highcharts.seriesTypes.heatmap#setClip
  1750. * @return {void}
  1751. */
  1752. setClip: function (animation) {
  1753. var series = this,
  1754. chart = series.chart;
  1755. Series.prototype.setClip.apply(series, arguments);
  1756. if (series.options.clip !== false || animation) {
  1757. series.markerGroup
  1758. .clip((animation || series.clipBox) && series.sharedClipKey ?
  1759. chart[series.sharedClipKey] :
  1760. chart.clipRect);
  1761. }
  1762. },
  1763. /**
  1764. * @private
  1765. * @function Highcharts.seriesTypes.heatmap#translate
  1766. * @return {void}
  1767. */
  1768. translate: function () {
  1769. 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;
  1770. series.generatePoints();
  1771. series.points.forEach(function (point) {
  1772. var pointAttr,
  1773. sizeDiff,
  1774. hasImage,
  1775. cellAttr = point.getCellAttributes(),
  1776. shapeArgs = {
  1777. x: Math.min(cellAttr.x1,
  1778. cellAttr.x2),
  1779. y: Math.min(cellAttr.y1,
  1780. cellAttr.y2),
  1781. width: Math.max(Math.abs(cellAttr.x2 - cellAttr.x1), 0),
  1782. height: Math.max(Math.abs(cellAttr.y2 - cellAttr.y1), 0)
  1783. };
  1784. hasImage = point.hasImage =
  1785. (point.marker && point.marker.symbol || symbol || '')
  1786. .indexOf('url') === 0;
  1787. // If marker shape is regular (symetric), find shorter
  1788. // cell's side.
  1789. if (hasRegularShape) {
  1790. sizeDiff = Math.abs(shapeArgs.width - shapeArgs.height);
  1791. shapeArgs.x = Math.min(cellAttr.x1, cellAttr.x2) +
  1792. (shapeArgs.width < shapeArgs.height ? 0 : sizeDiff / 2);
  1793. shapeArgs.y = Math.min(cellAttr.y1, cellAttr.y2) +
  1794. (shapeArgs.width < shapeArgs.height ? sizeDiff / 2 : 0);
  1795. shapeArgs.width = shapeArgs.height =
  1796. Math.min(shapeArgs.width, shapeArgs.height);
  1797. }
  1798. pointAttr = {
  1799. plotX: (cellAttr.x1 + cellAttr.x2) / 2,
  1800. plotY: (cellAttr.y1 + cellAttr.y2) / 2,
  1801. clientX: (cellAttr.x1 + cellAttr.x2) / 2,
  1802. shapeType: 'path',
  1803. shapeArgs: merge(true, shapeArgs, {
  1804. d: symbols[shape](shapeArgs.x, shapeArgs.y, shapeArgs.width, shapeArgs.height)
  1805. })
  1806. };
  1807. if (hasImage) {
  1808. point.marker = {
  1809. width: shapeArgs.width,
  1810. height: shapeArgs.height
  1811. };
  1812. }
  1813. extend(point, pointAttr);
  1814. });
  1815. fireEvent(series, 'afterTranslate');
  1816. },
  1817. /**
  1818. * @private
  1819. * @function Highcharts.seriesTypes.heatmap#pointAttribs
  1820. * @param {Highcharts.HeatmapPoint} point
  1821. * @param {string} state
  1822. * @return {Highcharts.SVGAttributes}
  1823. */
  1824. pointAttribs: function (point, state) {
  1825. var series = this,
  1826. attr = Series.prototype.pointAttribs
  1827. .call(series,
  1828. point,
  1829. state),
  1830. seriesOptions = series.options || {},
  1831. plotOptions = series.chart.options.plotOptions || {},
  1832. seriesPlotOptions = plotOptions.series || {},
  1833. heatmapPlotOptions = plotOptions.heatmap || {},
  1834. stateOptions,
  1835. brightness,
  1836. // Get old properties in order to keep backward compatibility
  1837. borderColor = seriesOptions.borderColor ||
  1838. heatmapPlotOptions.borderColor ||
  1839. seriesPlotOptions.borderColor,
  1840. borderWidth = seriesOptions.borderWidth ||
  1841. heatmapPlotOptions.borderWidth ||
  1842. seriesPlotOptions.borderWidth ||
  1843. attr['stroke-width'];
  1844. // Apply lineColor, or set it to default series color.
  1845. attr.stroke = ((point && point.marker && point.marker.lineColor) ||
  1846. (seriesOptions.marker && seriesOptions.marker.lineColor) ||
  1847. borderColor ||
  1848. this.color);
  1849. // Apply old borderWidth property if exists.
  1850. attr['stroke-width'] = borderWidth;
  1851. if (state) {
  1852. stateOptions =
  1853. merge(seriesOptions.states[state], seriesOptions.marker &&
  1854. seriesOptions.marker.states[state], point.options.states &&
  1855. point.options.states[state] || {});
  1856. brightness = stateOptions.brightness;
  1857. attr.fill =
  1858. stateOptions.color ||
  1859. H.color(attr.fill).brighten(brightness || 0).get();
  1860. attr.stroke = stateOptions.lineColor;
  1861. }
  1862. return attr;
  1863. },
  1864. /**
  1865. * @private
  1866. * @function Highcharts.seriesTypes.heatmap#markerAttribs
  1867. * @param {Highcharts.HeatmapPoint} point
  1868. * @return {Highcharts.SVGAttributes}
  1869. */
  1870. markerAttribs: function (point, state) {
  1871. var pointMarkerOptions = point.marker || {},
  1872. seriesMarkerOptions = this.options.marker || {},
  1873. seriesStateOptions,
  1874. pointStateOptions,
  1875. shapeArgs = point.shapeArgs || {},
  1876. hasImage = point.hasImage,
  1877. attribs = {};
  1878. if (hasImage) {
  1879. return {
  1880. x: point.plotX,
  1881. y: point.plotY
  1882. };
  1883. }
  1884. // Setting width and height attributes on image does not affect
  1885. // on its dimensions.
  1886. if (state) {
  1887. seriesStateOptions = seriesMarkerOptions.states[state] || {};
  1888. pointStateOptions = pointMarkerOptions.states &&
  1889. pointMarkerOptions.states[state] || {};
  1890. [['width', 'x'], ['height', 'y']].forEach(function (dimension) {
  1891. // Set new width and height basing on state options.
  1892. attribs[dimension[0]] = (pointStateOptions[dimension[0]] ||
  1893. seriesStateOptions[dimension[0]] ||
  1894. shapeArgs[dimension[0]]) + (pointStateOptions[dimension[0] + 'Plus'] ||
  1895. seriesStateOptions[dimension[0] + 'Plus'] || 0);
  1896. // Align marker by a new size.
  1897. attribs[dimension[1]] = shapeArgs[dimension[1]] +
  1898. (shapeArgs[dimension[0]] - attribs[dimension[0]]) / 2;
  1899. });
  1900. }
  1901. return state ? attribs : shapeArgs;
  1902. },
  1903. /**
  1904. * @private
  1905. * @function Highcharts.seriesTypes.heatmap#drawPoints
  1906. * @return {void}
  1907. */
  1908. drawPoints: function () {
  1909. var _this = this;
  1910. // In styled mode, use CSS, otherwise the fill used in the style
  1911. // sheet will take precedence over the fill attribute.
  1912. var seriesMarkerOptions = this.options.marker || {};
  1913. if (seriesMarkerOptions.enabled || this._hasPointMarkers) {
  1914. Series.prototype.drawPoints.call(this);
  1915. this.points.forEach(function (point) {
  1916. point.graphic &&
  1917. point.graphic[_this.chart.styledMode ? 'css' : 'animate'](_this.colorAttribs(point));
  1918. });
  1919. }
  1920. },
  1921. // Define hasData function for non-cartesian series.
  1922. // Returns true if the series has points at all.
  1923. hasData: function () {
  1924. return !!this.processedXData.length; // != 0
  1925. },
  1926. // Override to also allow null points, used when building the k-d-tree
  1927. // for tooltips in boost mode.
  1928. getValidPoints: function (points, insideOnly) {
  1929. return Series.prototype.getValidPoints.call(this, points, insideOnly, true);
  1930. },
  1931. /**
  1932. * @ignore
  1933. * @deprecated
  1934. * @function Highcharts.seriesTypes.heatmap#getBox
  1935. */
  1936. getBox: noop,
  1937. /**
  1938. * @private
  1939. * @borrows Highcharts.LegendSymbolMixin.drawRectangle as Highcharts.seriesTypes.heatmap#drawLegendSymbol
  1940. */
  1941. drawLegendSymbol: LegendSymbolMixin.drawRectangle,
  1942. /**
  1943. * @private
  1944. * @borrows Highcharts.seriesTypes.column#alignDataLabel as Highcharts.seriesTypes.heatmap#alignDataLabel
  1945. */
  1946. alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
  1947. /**
  1948. * @private
  1949. * @function Highcharts.seriesTypes.heatmap#getExtremes
  1950. * @return {void}
  1951. */
  1952. getExtremes: function () {
  1953. // Get the extremes from the value data
  1954. var _a = Series.prototype.getExtremes
  1955. .call(this,
  1956. this.valueData),
  1957. dataMin = _a.dataMin,
  1958. dataMax = _a.dataMax;
  1959. if (isNumber(dataMin)) {
  1960. this.valueMin = dataMin;
  1961. }
  1962. if (isNumber(dataMax)) {
  1963. this.valueMax = dataMax;
  1964. }
  1965. // Get the extremes from the y data
  1966. return Series.prototype.getExtremes.call(this);
  1967. }
  1968. /* eslint-enable valid-jsdoc */
  1969. }), merge(colorMapPointMixin, {
  1970. /**
  1971. * Heatmap series only. Padding between the points in the heatmap.
  1972. * @name Highcharts.Point#pointPadding
  1973. * @type {number|undefined}
  1974. */
  1975. /**
  1976. * Heatmap series only. The value of the point, resulting in a color
  1977. * controled by options as set in the colorAxis configuration.
  1978. * @name Highcharts.Point#value
  1979. * @type {number|null|undefined}
  1980. */
  1981. /* eslint-disable valid-jsdoc */
  1982. /**
  1983. * @private
  1984. * @function Highcharts.Point#applyOptions
  1985. * @param {Highcharts.HeatmapPointOptions} options
  1986. * @param {number} x
  1987. * @return {Highcharts.SVGPathArray}
  1988. */
  1989. applyOptions: function (options, x) {
  1990. var point = H.Point.prototype
  1991. .applyOptions.call(this,
  1992. options,
  1993. x);
  1994. point.formatPrefix =
  1995. point.isNull || point.value === null ?
  1996. 'null' : 'point';
  1997. return point;
  1998. },
  1999. /**
  2000. * Color points have a value option that determines whether or not it is
  2001. * a null point
  2002. * @private
  2003. * @function Highcharts.HeatmapPoint.isValid
  2004. * @return {boolean}
  2005. */
  2006. isValid: function () {
  2007. // undefined is allowed
  2008. return (this.value !== Infinity &&
  2009. this.value !== -Infinity);
  2010. },
  2011. /**
  2012. * @private
  2013. * @function Highcharts.Point#haloPath
  2014. * @param {number} size
  2015. * @return {Highcharts.SVGPathArray}
  2016. */
  2017. haloPath: function (size) {
  2018. if (!size) {
  2019. return [];
  2020. }
  2021. var rect = this.shapeArgs;
  2022. return [
  2023. 'M',
  2024. rect.x - size,
  2025. rect.y - size,
  2026. 'L',
  2027. rect.x - size,
  2028. rect.y + rect.height + size,
  2029. rect.x + rect.width + size,
  2030. rect.y + rect.height + size,
  2031. rect.x + rect.width + size,
  2032. rect.y - size,
  2033. 'Z'
  2034. ];
  2035. },
  2036. getCellAttributes: function () {
  2037. var point = this,
  2038. series = point.series,
  2039. seriesOptions = series.options,
  2040. xPad = (seriesOptions.colsize || 1) / 2,
  2041. yPad = (seriesOptions.rowsize || 1) / 2,
  2042. xAxis = series.xAxis,
  2043. yAxis = series.yAxis,
  2044. markerOptions = point.options.marker || series.options.marker,
  2045. pointPlacement = series.pointPlacementToXValue(), // #7860
  2046. pointPadding = pick(point.pointPadding,
  2047. seriesOptions.pointPadding, 0),
  2048. cellAttr = {
  2049. x1: clamp(Math.round(xAxis.len -
  2050. (xAxis.translate(point.x - xPad,
  2051. false,
  2052. true,
  2053. false,
  2054. true, -pointPlacement) || 0)), -xAxis.len, 2 * xAxis.len),
  2055. x2: clamp(Math.round(xAxis.len -
  2056. (xAxis.translate(point.x + xPad,
  2057. false,
  2058. true,
  2059. false,
  2060. true, -pointPlacement) || 0)), -xAxis.len, 2 * xAxis.len),
  2061. y1: clamp(Math.round((yAxis.translate(point.y - yPad,
  2062. false,
  2063. true,
  2064. false,
  2065. true) || 0)), -yAxis.len, 2 * yAxis.len),
  2066. y2: clamp(Math.round((yAxis.translate(point.y + yPad,
  2067. false,
  2068. true,
  2069. false,
  2070. true) || 0)), -yAxis.len, 2 * yAxis.len)
  2071. };
  2072. // Handle marker's fixed width, and height values including border
  2073. // and pointPadding while calculating cell attributes.
  2074. [['width', 'x'], ['height', 'y']].forEach(function (dimension) {
  2075. var prop = dimension[0],
  2076. direction = dimension[1];
  2077. var start = direction + '1', end = direction + '2';
  2078. var side = Math.abs(cellAttr[start] - cellAttr[end]),
  2079. borderWidth = markerOptions &&
  2080. markerOptions.lineWidth || 0,
  2081. plotPos = Math.abs(cellAttr[start] + cellAttr[end]) / 2;
  2082. if (markerOptions[prop] &&
  2083. markerOptions[prop] < side) {
  2084. cellAttr[start] = plotPos - (markerOptions[prop] / 2) -
  2085. (borderWidth / 2);
  2086. cellAttr[end] = plotPos + (markerOptions[prop] / 2) +
  2087. (borderWidth / 2);
  2088. }
  2089. // Handle pointPadding
  2090. if (pointPadding) {
  2091. if (direction === 'y') {
  2092. start = end;
  2093. end = direction + '1';
  2094. }
  2095. cellAttr[start] += pointPadding;
  2096. cellAttr[end] -= pointPadding;
  2097. }
  2098. });
  2099. return cellAttr;
  2100. }
  2101. /* eslint-enable valid-jsdoc */
  2102. }));
  2103. /**
  2104. * A `heatmap` series. If the [type](#series.heatmap.type) option is
  2105. * not specified, it is inherited from [chart.type](#chart.type).
  2106. *
  2107. * @productdesc {highcharts}
  2108. * Requires `modules/heatmap`.
  2109. *
  2110. * @extends series,plotOptions.heatmap
  2111. * @excluding cropThreshold, dataParser, dataURL, pointRange, stack,
  2112. * @product highcharts highmaps
  2113. * @apioption series.heatmap
  2114. */
  2115. /**
  2116. * An array of data points for the series. For the `heatmap` series
  2117. * type, points can be given in the following ways:
  2118. *
  2119. * 1. An array of arrays with 3 or 2 values. In this case, the values
  2120. * correspond to `x,y,value`. If the first value is a string, it is
  2121. * applied as the name of the point, and the `x` value is inferred.
  2122. * The `x` value can also be omitted, in which case the inner arrays
  2123. * should be of length 2\. Then the `x` value is automatically calculated,
  2124. * either starting at 0 and incremented by 1, or from `pointStart`
  2125. * and `pointInterval` given in the series options.
  2126. *
  2127. * ```js
  2128. * data: [
  2129. * [0, 9, 7],
  2130. * [1, 10, 4],
  2131. * [2, 6, 3]
  2132. * ]
  2133. * ```
  2134. *
  2135. * 2. An array of objects with named values. The following snippet shows only a
  2136. * few settings, see the complete options set below. If the total number of data
  2137. * points exceeds the series' [turboThreshold](#series.heatmap.turboThreshold),
  2138. * this option is not available.
  2139. *
  2140. * ```js
  2141. * data: [{
  2142. * x: 1,
  2143. * y: 3,
  2144. * value: 10,
  2145. * name: "Point2",
  2146. * color: "#00FF00"
  2147. * }, {
  2148. * x: 1,
  2149. * y: 7,
  2150. * value: 10,
  2151. * name: "Point1",
  2152. * color: "#FF00FF"
  2153. * }]
  2154. * ```
  2155. *
  2156. * @sample {highcharts} highcharts/chart/reflow-true/
  2157. * Numerical values
  2158. * @sample {highcharts} highcharts/series/data-array-of-arrays/
  2159. * Arrays of numeric x and y
  2160. * @sample {highcharts} highcharts/series/data-array-of-arrays-datetime/
  2161. * Arrays of datetime x and y
  2162. * @sample {highcharts} highcharts/series/data-array-of-name-value/
  2163. * Arrays of point.name and y
  2164. * @sample {highcharts} highcharts/series/data-array-of-objects/
  2165. * Config objects
  2166. *
  2167. * @type {Array<Array<number>|*>}
  2168. * @extends series.line.data
  2169. * @product highcharts highmaps
  2170. * @apioption series.heatmap.data
  2171. */
  2172. /**
  2173. * The color of the point. In heat maps the point color is rarely set
  2174. * explicitly, as we use the color to denote the `value`. Options for
  2175. * this are set in the [colorAxis](#colorAxis) configuration.
  2176. *
  2177. * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
  2178. * @product highcharts highmaps
  2179. * @apioption series.heatmap.data.color
  2180. */
  2181. /**
  2182. * The value of the point, resulting in a color controled by options
  2183. * as set in the [colorAxis](#colorAxis) configuration.
  2184. *
  2185. * @type {number}
  2186. * @product highcharts highmaps
  2187. * @apioption series.heatmap.data.value
  2188. */
  2189. /**
  2190. * The x value of the point. For datetime axes,
  2191. * the X value is the timestamp in milliseconds since 1970.
  2192. *
  2193. * @type {number}
  2194. * @product highcharts highmaps
  2195. * @apioption series.heatmap.data.x
  2196. */
  2197. /**
  2198. * The y value of the point.
  2199. *
  2200. * @type {number}
  2201. * @product highcharts highmaps
  2202. * @apioption series.heatmap.data.y
  2203. */
  2204. /**
  2205. * Point padding for a single point.
  2206. *
  2207. * @sample maps/plotoptions/tilemap-pointpadding
  2208. * Point padding on tiles
  2209. *
  2210. * @type {number}
  2211. * @product highcharts highmaps
  2212. * @apioption series.heatmap.data.pointPadding
  2213. */
  2214. /**
  2215. * @excluding radius, enabledThreshold
  2216. * @product highcharts highmaps
  2217. * @since 8.1
  2218. * @apioption series.heatmap.data.marker
  2219. */
  2220. /**
  2221. * @excluding radius, enabledThreshold
  2222. * @product highcharts highmaps
  2223. * @since 8.1
  2224. * @apioption series.heatmap.marker
  2225. */
  2226. /**
  2227. * @excluding radius, radiusPlus
  2228. * @product highcharts highmaps
  2229. * @apioption series.heatmap.marker.states.hover
  2230. */
  2231. /**
  2232. * @excluding radius
  2233. * @product highcharts highmaps
  2234. * @apioption series.heatmap.marker.states.select
  2235. */
  2236. /**
  2237. * @excluding radius, radiusPlus
  2238. * @product highcharts highmaps
  2239. * @apioption series.heatmap.data.marker.states.hover
  2240. */
  2241. /**
  2242. * @excluding radius
  2243. * @product highcharts highmaps
  2244. * @apioption series.heatmap.data.marker.states.select
  2245. */
  2246. /**
  2247. * Set the marker's fixed width on hover state.
  2248. *
  2249. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  2250. * 5 pixels wider lineWidth on hover
  2251. *
  2252. * @type {number|undefined}
  2253. * @default 0
  2254. * @product highcharts highmaps
  2255. * @apioption series.heatmap.marker.states.hover.lineWidthPlus
  2256. */
  2257. /**
  2258. * Set the marker's fixed width on hover state.
  2259. *
  2260. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  2261. * 70px fixed marker's width and height on hover
  2262. *
  2263. * @type {number|undefined}
  2264. * @default undefined
  2265. * @product highcharts highmaps
  2266. * @apioption series.heatmap.marker.states.hover.width
  2267. */
  2268. /**
  2269. * Set the marker's fixed height on hover state.
  2270. *
  2271. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  2272. * 70px fixed marker's width and height on hover
  2273. *
  2274. * @type {number|undefined}
  2275. * @default undefined
  2276. * @product highcharts highmaps
  2277. * @apioption series.heatmap.marker.states.hover.height
  2278. */
  2279. /**
  2280. * The number of pixels to increase the width of the
  2281. * hovered point.
  2282. *
  2283. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2284. * One day
  2285. *
  2286. * @type {number|undefined}
  2287. * @default undefined
  2288. * @product highcharts highmaps
  2289. * @apioption series.heatmap.marker.states.hover.widthPlus
  2290. */
  2291. /**
  2292. * The number of pixels to increase the height of the
  2293. * hovered point.
  2294. *
  2295. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2296. * One day
  2297. *
  2298. * @type {number|undefined}
  2299. * @default undefined
  2300. * @product highcharts highmaps
  2301. * @apioption series.heatmap.marker.states.hover.heightPlus
  2302. */
  2303. /**
  2304. * The number of pixels to increase the width of the
  2305. * hovered point.
  2306. *
  2307. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2308. * One day
  2309. *
  2310. * @type {number|undefined}
  2311. * @default undefined
  2312. * @product highcharts highmaps
  2313. * @apioption series.heatmap.marker.states.select.widthPlus
  2314. */
  2315. /**
  2316. * The number of pixels to increase the height of the
  2317. * hovered point.
  2318. *
  2319. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2320. * One day
  2321. *
  2322. * @type {number|undefined}
  2323. * @default undefined
  2324. * @product highcharts highmaps
  2325. * @apioption series.heatmap.marker.states.select.heightPlus
  2326. */
  2327. /**
  2328. * Set the marker's fixed width on hover state.
  2329. *
  2330. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-linewidthplus
  2331. * 5 pixels wider lineWidth on hover
  2332. *
  2333. * @type {number|undefined}
  2334. * @default 0
  2335. * @product highcharts highmaps
  2336. * @apioption series.heatmap.data.marker.states.hover.lineWidthPlus
  2337. */
  2338. /**
  2339. * Set the marker's fixed width on hover state.
  2340. *
  2341. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  2342. * 70px fixed marker's width and height on hover
  2343. *
  2344. * @type {number|undefined}
  2345. * @default undefined
  2346. * @product highcharts highmaps
  2347. * @apioption series.heatmap.data.marker.states.hover.width
  2348. */
  2349. /**
  2350. * Set the marker's fixed height on hover state.
  2351. *
  2352. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  2353. * 70px fixed marker's width and height on hover
  2354. *
  2355. * @type {number|undefined}
  2356. * @default undefined
  2357. * @product highcharts highmaps
  2358. * @apioption series.heatmap.data.marker.states.hover.height
  2359. */
  2360. /**
  2361. * The number of pixels to increase the width of the
  2362. * hovered point.
  2363. *
  2364. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2365. * One day
  2366. *
  2367. * @type {number|undefined}
  2368. * @default undefined
  2369. * @product highcharts highstock
  2370. * @apioption series.heatmap.data.marker.states.hover.widthPlus
  2371. */
  2372. /**
  2373. * The number of pixels to increase the height of the
  2374. * hovered point.
  2375. *
  2376. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2377. * One day
  2378. *
  2379. * @type {number|undefined}
  2380. * @default undefined
  2381. * @product highcharts highstock
  2382. * @apioption series.heatmap.data.marker.states.hover.heightPlus
  2383. */
  2384. /**
  2385. * Set the marker's fixed width on select state.
  2386. *
  2387. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  2388. * 70px fixed marker's width and height on hover
  2389. *
  2390. * @type {number|undefined}
  2391. * @default undefined
  2392. * @product highcharts highmaps
  2393. * @apioption series.heatmap.data.marker.states.select.width
  2394. */
  2395. /**
  2396. * Set the marker's fixed height on select state.
  2397. *
  2398. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-width
  2399. * 70px fixed marker's width and height on hover
  2400. *
  2401. * @type {number|undefined}
  2402. * @default undefined
  2403. * @product highcharts highmaps
  2404. * @apioption series.heatmap.data.marker.states.select.height
  2405. */
  2406. /**
  2407. * The number of pixels to increase the width of the
  2408. * hovered point.
  2409. *
  2410. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2411. * One day
  2412. *
  2413. * @type {number|undefined}
  2414. * @default undefined
  2415. * @product highcharts highstock
  2416. * @apioption series.heatmap.data.marker.states.select.widthPlus
  2417. */
  2418. /**
  2419. * The number of pixels to increase the height of the
  2420. * hovered point.
  2421. *
  2422. * @sample {highcharts} maps/plotoptions/heatmap-marker-states-hover-widthplus
  2423. * One day
  2424. *
  2425. * @type {number|undefined}
  2426. * @default undefined
  2427. * @product highcharts highstock
  2428. * @apioption series.heatmap.data.marker.states.select.heightPlus
  2429. */
  2430. ''; // adds doclets above to transpiled file
  2431. });
  2432. _registerModule(_modules, 'masters/modules/heatmap.src.js', [], function () {
  2433. });
  2434. }));