Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

684 righe
18 KiB

  1. (function () {
  2. 'use strict';
  3. function __$styleInject(css, ref) {
  4. if ( ref === void 0 ) ref = {};
  5. var insertAt = ref.insertAt;
  6. if (!css || typeof document === 'undefined') { return; }
  7. var head = document.head || document.getElementsByTagName('head')[0];
  8. var style = document.createElement('style');
  9. style.type = 'text/css';
  10. if (insertAt === 'top') {
  11. if (head.firstChild) {
  12. head.insertBefore(style, head.firstChild);
  13. } else {
  14. head.appendChild(style);
  15. }
  16. } else {
  17. head.appendChild(style);
  18. }
  19. if (style.styleSheet) {
  20. style.styleSheet.cssText = css;
  21. } else {
  22. style.appendChild(document.createTextNode(css));
  23. }
  24. }
  25. // Fixed 5-color theme,
  26. // More colors are difficult to parse visually
  27. var HEATMAP_COLORS_BLUE = ['#ebedf0', '#c0ddf9', '#73b3f3', '#3886e1', '#17459e'];
  28. var HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001c'];
  29. // Universal constants
  30. /**
  31. * Returns the value of a number upto 2 decimal places.
  32. * @param {Number} d Any number
  33. */
  34. /**
  35. * Returns whether or not two given arrays are equal.
  36. * @param {Array} arr1 First array
  37. * @param {Array} arr2 Second array
  38. */
  39. /**
  40. * Shuffles array in place. ES6 version
  41. * @param {Array} array An array containing the items.
  42. */
  43. function shuffle(array) {
  44. // Awesomeness: https://bost.ocks.org/mike/shuffle/
  45. // https://stackoverflow.com/a/2450976/6495043
  46. // https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array?noredirect=1&lq=1
  47. for (var i = array.length - 1; i > 0; i--) {
  48. var j = Math.floor(Math.random() * (i + 1));
  49. var _ref = [array[j], array[i]];
  50. array[i] = _ref[0];
  51. array[j] = _ref[1];
  52. }
  53. return array;
  54. }
  55. /**
  56. * Fill an array with extra points
  57. * @param {Array} array Array
  58. * @param {Number} count number of filler elements
  59. * @param {Object} element element to fill with
  60. * @param {Boolean} start fill at start?
  61. */
  62. /**
  63. * Returns pixel width of string.
  64. * @param {String} string
  65. * @param {Number} charWidth Width of single char in pixels
  66. */
  67. // https://stackoverflow.com/a/29325222
  68. function getRandomBias(min, max, bias, influence) {
  69. var range = max - min;
  70. var biasValue = range * bias + min;
  71. var rnd = Math.random() * range + min,
  72. // random in range
  73. mix = Math.random() * influence; // random mixer
  74. return rnd * (1 - mix) + biasValue * mix; // mix full range and bias
  75. }
  76. // Playing around with dates
  77. var NO_OF_MILLIS = 1000;
  78. var SEC_IN_DAY = 86400;
  79. var MONTH_NAMES_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
  80. function clone(date) {
  81. return new Date(date.getTime());
  82. }
  83. function timestampSec(date) {
  84. return date.getTime() / NO_OF_MILLIS;
  85. }
  86. function timestampToMidnight(timestamp) {
  87. var roundAhead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  88. var midnightTs = Math.floor(timestamp - timestamp % SEC_IN_DAY);
  89. if (roundAhead) {
  90. return midnightTs + SEC_IN_DAY;
  91. }
  92. return midnightTs;
  93. }
  94. // export function getMonthsBetween(startDate, endDate) {}
  95. // mutates
  96. // mutates
  97. function addDays(date, numberOfDays) {
  98. date.setDate(date.getDate() + numberOfDays);
  99. }
  100. // Composite Chart
  101. // ================================================================================
  102. var reportCountList = [152, 222, 199, 287, 534, 709, 1179, 1256, 1632, 1856, 1850];
  103. var lineCompositeData = {
  104. labels: ["2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017"],
  105. yMarkers: [{
  106. label: "Average 100 reports/month",
  107. value: 1200,
  108. options: { labelPos: 'left' }
  109. }],
  110. datasets: [{
  111. "name": "Events",
  112. "values": reportCountList
  113. }]
  114. };
  115. var fireball_5_25 = [[4, 0, 3, 1, 1, 2, 1, 1, 1, 0, 1, 1], [2, 3, 3, 2, 1, 3, 0, 1, 2, 7, 10, 4], [5, 6, 2, 4, 0, 1, 4, 3, 0, 2, 0, 1], [0, 2, 6, 2, 1, 1, 2, 3, 6, 3, 7, 8], [6, 8, 7, 7, 4, 5, 6, 5, 22, 12, 10, 11], [7, 10, 11, 7, 3, 2, 7, 7, 11, 15, 22, 20], [13, 16, 21, 18, 19, 17, 12, 17, 31, 28, 25, 29], [24, 14, 21, 14, 11, 15, 19, 21, 41, 22, 32, 18], [31, 20, 30, 22, 14, 17, 21, 35, 27, 50, 117, 24], [32, 24, 21, 27, 11, 27, 43, 37, 44, 40, 48, 32], [31, 38, 36, 26, 23, 23, 25, 29, 26, 47, 61, 50]];
  116. var fireball_2_5 = [[22, 6, 6, 9, 7, 8, 6, 14, 19, 10, 8, 20], [11, 13, 12, 8, 9, 11, 9, 13, 10, 22, 40, 24], [20, 13, 13, 19, 13, 10, 14, 13, 20, 18, 5, 9], [7, 13, 16, 19, 12, 11, 21, 27, 27, 24, 33, 33], [38, 25, 28, 22, 31, 21, 35, 42, 37, 32, 46, 53], [50, 33, 36, 34, 35, 28, 27, 52, 58, 59, 75, 69], [54, 67, 67, 45, 66, 51, 38, 64, 90, 113, 116, 87], [84, 52, 56, 51, 55, 46, 50, 87, 114, 83, 152, 93], [73, 58, 59, 63, 56, 51, 83, 140, 103, 115, 265, 89], [106, 95, 94, 71, 77, 75, 99, 136, 129, 154, 168, 156], [81, 102, 95, 72, 58, 91, 89, 122, 124, 135, 183, 171]];
  117. var fireballOver25 = [
  118. // [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  119. [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0], [1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2], [3, 2, 1, 3, 2, 0, 2, 2, 2, 3, 0, 1], [2, 3, 5, 2, 1, 3, 0, 2, 3, 5, 1, 4], [7, 4, 6, 1, 9, 2, 2, 2, 20, 9, 4, 9], [5, 6, 1, 2, 5, 4, 5, 5, 16, 9, 14, 9], [5, 4, 7, 5, 1, 5, 3, 3, 5, 7, 22, 2], [5, 13, 11, 6, 1, 7, 9, 8, 14, 17, 16, 3], [8, 9, 8, 6, 4, 8, 5, 6, 14, 11, 21, 12]];
  120. var barCompositeData = {
  121. labels: MONTH_NAMES_SHORT,
  122. datasets: [{
  123. name: "Over 25 reports",
  124. values: fireballOver25[9]
  125. }, {
  126. name: "5 to 25 reports",
  127. values: fireball_5_25[9]
  128. }, {
  129. name: "2 to 5 reports",
  130. values: fireball_2_5[9]
  131. }]
  132. };
  133. // Demo Chart multitype Chart
  134. // ================================================================================
  135. var typeData = {
  136. labels: ["12am-3am", "3am-6am", "6am-9am", "9am-12pm", "12pm-3pm", "3pm-6pm", "6pm-9pm", "9pm-12am"],
  137. yMarkers: [{
  138. label: "Marker",
  139. value: 43,
  140. options: { labelPos: 'left'
  141. // type: 'dashed'
  142. } }],
  143. yRegions: [{
  144. label: "Region",
  145. start: -10,
  146. end: 50,
  147. options: { labelPos: 'right' }
  148. }],
  149. datasets: [{
  150. name: "Some Data",
  151. values: [18, 40, 30, 35, 8, 52, 17, -4],
  152. axisPosition: 'right',
  153. chartType: 'bar'
  154. }, {
  155. name: "Another Set",
  156. values: [30, 50, -10, 15, 18, 32, 27, 14],
  157. axisPosition: 'right',
  158. chartType: 'bar'
  159. }, {
  160. name: "Yet Another",
  161. values: [15, 20, -3, -15, 58, 12, -17, 37],
  162. chartType: 'line'
  163. }]
  164. };
  165. var trendsData = {
  166. labels: [1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016],
  167. datasets: [{
  168. values: [132.9, 150.0, 149.4, 148.0, 94.4, 97.6, 54.1, 49.2, 22.5, 18.4, 39.3, 131.0, 220.1, 218.9, 198.9, 162.4, 91.0, 60.5, 20.6, 14.8, 33.9, 123.0, 211.1, 191.8, 203.3, 133.0, 76.1, 44.9, 25.1, 11.6, 28.9, 88.3, 136.3, 173.9, 170.4, 163.6, 99.3, 65.3, 45.8, 24.7, 12.6, 4.2, 4.8, 24.9, 80.8, 84.5, 94.0, 113.3, 69.8, 39.8]
  169. }]
  170. };
  171. var moonData = {
  172. names: ["Ganymede", "Callisto", "Io", "Europa"],
  173. masses: [14819000, 10759000, 8931900, 4800000],
  174. distances: [1070.412, 1882.709, 421.700, 671.034],
  175. diameters: [5262.4, 4820.6, 3637.4, 3121.6]
  176. };
  177. // const jupiterMoons = {
  178. // 'Ganymede': {
  179. // mass: '14819000 x 10^16 kg',
  180. // 'semi-major-axis': '1070412 km',
  181. // 'diameter': '5262.4 km'
  182. // },
  183. // 'Callisto': {
  184. // mass: '10759000 x 10^16 kg',
  185. // 'semi-major-axis': '1882709 km',
  186. // 'diameter': '4820.6 km'
  187. // },
  188. // 'Io': {
  189. // mass: '8931900 x 10^16 kg',
  190. // 'semi-major-axis': '421700 km',
  191. // 'diameter': '3637.4 km'
  192. // },
  193. // 'Europa': {
  194. // mass: '4800000 x 10^16 kg',
  195. // 'semi-major-axis': '671034 km',
  196. // 'diameter': '3121.6 km'
  197. // },
  198. // };
  199. // ================================================================================
  200. var demoConfig = {
  201. lineComposite: {
  202. elementID: "#chart-composite-1",
  203. options: {
  204. title: "Fireball/Bolide Events - Yearly (reported)",
  205. data: lineCompositeData,
  206. type: "line",
  207. height: 190,
  208. colors: ["green"],
  209. isNavigable: 1,
  210. valuesOverPoints: 1,
  211. lineOptions: {
  212. dotSize: 8
  213. }
  214. }
  215. },
  216. barComposite: {
  217. elementID: "#chart-composite-2",
  218. options: {
  219. data: barCompositeData,
  220. type: "bar",
  221. height: 210,
  222. colors: ["violet", "light-blue", "#46a9f9"],
  223. valuesOverPoints: 1,
  224. axisOptions: {
  225. xAxisMode: "tick"
  226. },
  227. barOptions: {
  228. stacked: 1
  229. }
  230. }
  231. },
  232. demoMain: {
  233. elementID: "",
  234. options: {
  235. title: "My Awesome Chart",
  236. data: "typeData",
  237. type: "axis-mixed",
  238. height: 300,
  239. colors: ["purple", "magenta", "light-blue"],
  240. maxSlices: 10,
  241. tooltipOptions: {
  242. formatTooltipX: function formatTooltipX(d) {
  243. return (d + '').toUpperCase();
  244. },
  245. formatTooltipY: function formatTooltipY(d) {
  246. return d + ' pts';
  247. }
  248. }
  249. }
  250. }
  251. };
  252. // import { lineComposite, barComposite } from './demoConfig';
  253. // ================================================================================
  254. var Chart = frappe.Chart; // eslint-disable-line no-undef
  255. var lc = demoConfig.lineComposite;
  256. var lineCompositeChart = new Chart(lc.elementID, lc.options);
  257. var bc = demoConfig.barComposite;
  258. var barCompositeChart = new Chart(bc.elementID, bc.options);
  259. lineCompositeChart.parent.addEventListener('data-select', function (e) {
  260. var i = e.index;
  261. barCompositeChart.updateDatasets([fireballOver25[i], fireball_5_25[i], fireball_2_5[i]]);
  262. });
  263. // ================================================================================
  264. var customColors = ['purple', 'magenta', 'light-blue'];
  265. var typeChartArgs = {
  266. title: "My Awesome Chart",
  267. data: typeData,
  268. type: 'axis-mixed',
  269. height: 300,
  270. colors: customColors,
  271. // maxLegendPoints: 6,
  272. maxSlices: 10,
  273. tooltipOptions: {
  274. formatTooltipX: function formatTooltipX(d) {
  275. return (d + '').toUpperCase();
  276. },
  277. formatTooltipY: function formatTooltipY(d) {
  278. return d + ' pts';
  279. }
  280. }
  281. };
  282. var aggrChart = new Chart("#chart-aggr", typeChartArgs);
  283. Array.prototype.slice.call(document.querySelectorAll('.aggr-type-buttons button')).map(function (el) {
  284. el.addEventListener('click', function (e) {
  285. var btn = e.target;
  286. var type = btn.getAttribute('data-type');
  287. typeChartArgs.type = type;
  288. if (type !== 'axis-mixed') {
  289. typeChartArgs.colors = undefined;
  290. } else {
  291. typeChartArgs.colors = customColors;
  292. }
  293. if (type !== 'percentage') {
  294. typeChartArgs.height = 300;
  295. } else {
  296. typeChartArgs.height = undefined;
  297. }
  298. var newChart = new Chart("#chart-aggr", typeChartArgs);
  299. if (newChart) {
  300. aggrChart = newChart;
  301. }
  302. Array.prototype.slice.call(btn.parentNode.querySelectorAll('button')).map(function (el) {
  303. el.classList.remove('active');
  304. });
  305. btn.classList.add('active');
  306. });
  307. });
  308. document.querySelector('.export-aggr').addEventListener('click', function () {
  309. aggrChart.export();
  310. });
  311. // Update values chart
  312. // ================================================================================
  313. var updateDataAllLabels = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Mon"];
  314. var getRandom = function getRandom() {
  315. return Math.floor(getRandomBias(-40, 60, 0.8, 1));
  316. };
  317. var updateDataAllValues = Array.from({ length: 30 }, getRandom);
  318. // We're gonna be shuffling this
  319. var updateDataAllIndices = updateDataAllLabels.map(function (d, i) {
  320. return i;
  321. });
  322. var getUpdateData = function getUpdateData(source_array) {
  323. var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
  324. var indices = updateDataAllIndices.slice(0, length);
  325. return indices.map(function (index) {
  326. return source_array[index];
  327. });
  328. };
  329. var updateData = {
  330. labels: getUpdateData(updateDataAllLabels),
  331. datasets: [{
  332. "values": getUpdateData(updateDataAllValues)
  333. }],
  334. yMarkers: [{
  335. label: "Altitude",
  336. value: 25,
  337. type: 'dashed'
  338. }],
  339. yRegions: [{
  340. label: "Range",
  341. start: 10,
  342. end: 45
  343. }]
  344. };
  345. var updateChart = new Chart("#chart-update", {
  346. data: updateData,
  347. type: 'line',
  348. height: 300,
  349. colors: ['#ff6c03'],
  350. lineOptions: {
  351. // hideLine: 1,
  352. regionFill: 1
  353. }
  354. });
  355. var chartUpdateButtons = document.querySelector('.chart-update-buttons');
  356. chartUpdateButtons.querySelector('[data-update="random"]').addEventListener("click", function () {
  357. shuffle(updateDataAllIndices);
  358. var value = getRandom();
  359. var start = getRandom();
  360. var end = getRandom();
  361. var data = {
  362. labels: updateDataAllLabels.slice(0, 10),
  363. datasets: [{ values: getUpdateData(updateDataAllValues) }],
  364. yMarkers: [{
  365. label: "Altitude",
  366. value: value,
  367. type: 'dashed'
  368. }],
  369. yRegions: [{
  370. label: "Range",
  371. start: start,
  372. end: end
  373. }]
  374. };
  375. updateChart.update(data);
  376. });
  377. chartUpdateButtons.querySelector('[data-update="add"]').addEventListener("click", function () {
  378. var index = updateChart.state.datasetLength; // last index to add
  379. if (index >= updateDataAllIndices.length) return;
  380. updateChart.addDataPoint(updateDataAllLabels[index], [updateDataAllValues[index]]);
  381. });
  382. chartUpdateButtons.querySelector('[data-update="remove"]').addEventListener("click", function () {
  383. updateChart.removeDataPoint();
  384. });
  385. document.querySelector('.export-update').addEventListener('click', function () {
  386. updateChart.export();
  387. });
  388. // Trends Chart
  389. // ================================================================================
  390. var plotChartArgs = {
  391. title: "Mean Total Sunspot Count - Yearly",
  392. data: trendsData,
  393. type: 'line',
  394. height: 300,
  395. colors: ['#238e38'],
  396. lineOptions: {
  397. hideDots: 1,
  398. heatline: 1
  399. },
  400. axisOptions: {
  401. xAxisMode: 'tick',
  402. yAxisMode: 'span',
  403. xIsSeries: 1
  404. }
  405. };
  406. var trendsChart = new Chart("#chart-trends", plotChartArgs);
  407. Array.prototype.slice.call(document.querySelectorAll('.chart-plot-buttons button')).map(function (el) {
  408. el.addEventListener('click', function (e) {
  409. var btn = e.target;
  410. var type = btn.getAttribute('data-type');
  411. var config = {};
  412. config[type] = 1;
  413. if (['regionFill', 'heatline'].includes(type)) {
  414. config.hideDots = 1;
  415. }
  416. // plotChartArgs.init = false;
  417. plotChartArgs.lineOptions = config;
  418. new Chart("#chart-trends", plotChartArgs);
  419. Array.prototype.slice.call(btn.parentNode.querySelectorAll('button')).map(function (el) {
  420. el.classList.remove('active');
  421. });
  422. btn.classList.add('active');
  423. });
  424. });
  425. document.querySelector('.export-trends').addEventListener('click', function () {
  426. trendsChart.export();
  427. });
  428. // Event chart
  429. // ================================================================================
  430. var eventsData = {
  431. labels: ["Ganymede", "Callisto", "Io", "Europa"],
  432. datasets: [{
  433. "values": moonData.distances,
  434. "formatted": moonData.distances.map(function (d) {
  435. return d * 1000 + " km";
  436. })
  437. }]
  438. };
  439. var eventsChart = new Chart("#chart-events", {
  440. title: "Jupiter's Moons: Semi-major Axis (1000 km)",
  441. data: eventsData,
  442. type: 'bar',
  443. height: 330,
  444. colors: ['grey'],
  445. isNavigable: 1
  446. });
  447. var dataDiv = document.querySelector('.chart-events-data');
  448. eventsChart.parent.addEventListener('data-select', function (e) {
  449. var name = moonData.names[e.index];
  450. dataDiv.querySelector('.moon-name').innerHTML = name;
  451. dataDiv.querySelector('.semi-major-axis').innerHTML = moonData.distances[e.index] * 1000;
  452. dataDiv.querySelector('.mass').innerHTML = moonData.masses[e.index];
  453. dataDiv.querySelector('.diameter').innerHTML = moonData.diameters[e.index];
  454. dataDiv.querySelector('img').src = "./assets/img/" + name.toLowerCase() + ".jpg";
  455. });
  456. // Heatmap
  457. // ================================================================================
  458. var today = new Date();
  459. var start = clone(today);
  460. addDays(start, 4);
  461. var end = clone(start);
  462. start.setFullYear(start.getFullYear() - 2);
  463. end.setFullYear(end.getFullYear() - 1);
  464. var dataPoints = {};
  465. var startTs = timestampSec(start);
  466. var endTs = timestampSec(end);
  467. startTs = timestampToMidnight(startTs);
  468. endTs = timestampToMidnight(endTs, true);
  469. while (startTs < endTs) {
  470. dataPoints[parseInt(startTs)] = Math.floor(getRandomBias(0, 5, 0.2, 1));
  471. startTs += SEC_IN_DAY;
  472. }
  473. var heatmapData = {
  474. dataPoints: dataPoints,
  475. start: start,
  476. end: end
  477. };
  478. var heatmapArgs = {
  479. title: "Monthly Distribution",
  480. data: heatmapData,
  481. type: 'heatmap',
  482. discreteDomains: 1,
  483. countLabel: 'Level',
  484. colors: HEATMAP_COLORS_BLUE,
  485. legendScale: [0, 1, 2, 4, 5]
  486. };
  487. var heatmapChart = new Chart("#chart-heatmap", heatmapArgs);
  488. Array.prototype.slice.call(document.querySelectorAll('.heatmap-mode-buttons button')).map(function (el) {
  489. el.addEventListener('click', function (e) {
  490. var btn = e.target;
  491. var mode = btn.getAttribute('data-mode');
  492. var discreteDomains = 0;
  493. if (mode === 'discrete') {
  494. discreteDomains = 1;
  495. }
  496. var colors = [];
  497. var colors_mode = document.querySelector('.heatmap-color-buttons .active').getAttribute('data-color');
  498. if (colors_mode === 'halloween') {
  499. colors = HEATMAP_COLORS_YELLOW;
  500. } else if (colors_mode === 'blue') {
  501. colors = HEATMAP_COLORS_BLUE;
  502. }
  503. heatmapArgs.discreteDomains = discreteDomains;
  504. heatmapArgs.colors = colors;
  505. new Chart("#chart-heatmap", heatmapArgs);
  506. Array.prototype.slice.call(btn.parentNode.querySelectorAll('button')).map(function (el) {
  507. el.classList.remove('active');
  508. });
  509. btn.classList.add('active');
  510. });
  511. });
  512. Array.prototype.slice.call(document.querySelectorAll('.heatmap-color-buttons button')).map(function (el) {
  513. el.addEventListener('click', function (e) {
  514. var btn = e.target;
  515. var colors_mode = btn.getAttribute('data-color');
  516. var colors = [];
  517. if (colors_mode === 'halloween') {
  518. colors = HEATMAP_COLORS_YELLOW;
  519. } else if (colors_mode === 'blue') {
  520. colors = HEATMAP_COLORS_BLUE;
  521. }
  522. var discreteDomains = 1;
  523. var view_mode = document.querySelector('.heatmap-mode-buttons .active').getAttribute('data-mode');
  524. if (view_mode === 'continuous') {
  525. discreteDomains = 0;
  526. }
  527. heatmapArgs.discreteDomains = discreteDomains;
  528. heatmapArgs.colors = colors;
  529. new Chart("#chart-heatmap", heatmapArgs);
  530. Array.prototype.slice.call(btn.parentNode.querySelectorAll('button')).map(function (el) {
  531. el.classList.remove('active');
  532. });
  533. btn.classList.add('active');
  534. });
  535. });
  536. document.querySelector('.export-heatmap').addEventListener('click', function () {
  537. heatmapChart.export();
  538. });
  539. }());
  540. //# sourceMappingURL=index.min.js.map