-
Notifications
You must be signed in to change notification settings - Fork 0
/
listeners.a7fa46cd5beeba0d9aa0.js
278 lines (247 loc) · 83 KB
/
listeners.a7fa46cd5beeba0d9aa0.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is not neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/css-loader/dist/cjs.js!./src/style/develop.css":
/*!*********************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js!./src/style/develop.css ***!
\*********************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap);\"]);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".wrapper {\\r\\n margin: 0 auto;\\r\\n position: relative;\\r\\n}\\r\\n.bar, .area, .donut {\\r\\n stroke: none;\\r\\n}\\r\\n.line {\\r\\n fill: none;\\r\\n stroke-width: 4;\\r\\n}\\r\\n.donut-block * {\\r\\n transition: filter 0.15s;\\r\\n}\\r\\n.arc {\\r\\n transition: opacity 0.3s;\\r\\n}\\r\\n.data-label {\\r\\n font-family: \\\"Roboto\\\";\\r\\n font-style: normal;\\r\\n font-weight: 300;\\r\\n font-size: 12px;\\r\\n line-height: 140.62%;\\r\\n color: #444444;\\r\\n cursor: default;\\r\\n}\\r\\n.bar-item {\\r\\n transition: opacity 0.3s, filter 0.3s;\\r\\n}\\r\\n\\r\\n\\r\\n/*========================================================================== Common classes */\\r\\n.charts-opacity-inactive {\\r\\n opacity: 0.6;\\r\\n}\\r\\n\\r\\n/* EXTENDED FOR SPECIFIC STYLES */\\r\\n.legend-item.charts-opacity-inactive {\\r\\n opacity: 0.45;\\r\\n}\\r\\n\\r\\n\\r\\n/*========================================================================== Legend */\\r\\n.legend-item {\\r\\n cursor: default;\\r\\n transition: opacity 0.1s;\\r\\n /* will-change: opacity; */\\r\\n}\\r\\n.legend-item-inline {\\r\\n white-space: nowrap;\\r\\n}\\r\\n.legend-item-inline:not(:first-of-type) {\\r\\n margin-left: 20px;\\r\\n}\\r\\n.legend-item-row {\\r\\n display: flex;\\r\\n}\\r\\n.legend-item-row > span {\\r\\n display: block;\\r\\n}\\r\\n.mt-15 {\\r\\n margin-top: 15px;\\r\\n}\\r\\n.mt-10 {\\r\\n margin-top: 10px;\\r\\n}\\r\\n\\r\\n.legend-label {\\r\\n font-size: 12px;\\r\\n font-family: \\\"Roboto\\\", sans-serif;\\r\\n font-weight: 300;\\r\\n color: #444444;\\r\\n width: calc(100% - 19px);\\r\\n overflow: hidden;\\r\\n line-height: normal;\\r\\n}\\r\\n.legend-label-nowrap {\\r\\n white-space: nowrap;\\r\\n text-overflow: ellipsis;\\r\\n}\\r\\n.legend-circle {\\r\\n position: relative;\\r\\n bottom: -1px;\\r\\n display: inline-block;\\r\\n width: 11px;\\r\\n height: 11px;\\r\\n border-radius: 50%;\\r\\n margin-right: 8px;\\r\\n}\\r\\n\\r\\n\\r\\n/*========================================================================= Tooltip */\\r\\n.tooltip-block {\\r\\n pointer-events: none;\\r\\n z-index: 100;\\r\\n filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.1));\\r\\n}\\r\\n.tooltip-content {\\r\\n position: relative;\\r\\n pointer-events: none;\\r\\n font-family: \\\"Roboto\\\", sans-serif;\\r\\n line-height: 1;\\r\\n padding: 12px 16px;\\r\\n color: white;\\r\\n z-index: 102;\\r\\n max-width: 500px;\\r\\n background: rgba(0, 0, 0, 0.82);\\r\\n font-size: 11px;\\r\\n}\\r\\n.tooltip-arrow {\\r\\n width: 0;\\r\\n height: 0;\\r\\n border-style: solid;\\r\\n border-color: rgba(0, 0, 0, 0.82) transparent transparent transparent;\\r\\n}\\r\\n\\r\\n/* Tooltip Content */\\r\\n.tooltip-group {\\r\\n display: flex;\\r\\n}\\r\\n.tooltip-group:not(:first-of-type) {\\r\\n margin-top: 6px;\\r\\n}\\r\\n.tooltip-circle {\\r\\n position: relative;\\r\\n display: block;\\r\\n width: 9px;\\r\\n height: 9px;\\r\\n margin-right: 10px;\\r\\n border-radius: 50%;\\r\\n}\\r\\n.tooltip-text-item {\\r\\n font-family: \\\"Roboto\\\" sans-serif;\\r\\n font-style: normal;\\r\\n width: 100%;\\r\\n flex: 1;\\r\\n display: flex;\\r\\n font-weight: 400;\\r\\n}\\r\\n\\r\\n.tooltip-line {\\r\\n stroke: #AAA;\\r\\n stroke-width: 1px;\\r\\n stroke-linecap: round;\\r\\n}\\r\\n.tooltip-content .tooltip-head {\\r\\n font-size: 12px;\\r\\n margin-bottom: 10px;\\r\\n}\\r\\n.tooltip-content .tooltip-texts {\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.tooltip-content .tooltip-text-item > span {\\r\\n display: block;\\r\\n}\\r\\n.tooltip-content .tooltip-text-item > span:first-of-type {\\r\\n flex: 1;\\r\\n}\\r\\n.tooltip-content .tooltip-text-item > span:last-of-type {\\r\\n flex: 0;\\r\\n}\\r\\n.tooltip-field-value {\\r\\n margin-left: 0.5rem;\\r\\n}\\r\\n\\r\\n\\r\\n/*========================================================================= Additional */\\r\\n.charts-axis .domain {\\r\\n stroke: #D2D2D2;\\r\\n}\\r\\n.charts-axis .tick line:first-of-type {\\r\\n stroke: #D2D2D2;\\r\\n}\\r\\n\\r\\n/* Aggregator */\\r\\n.aggregator-value, .aggregator-name {\\r\\n color: #000000;\\r\\n font-family: \\\"Roboto\\\", sans-serif;\\r\\n font-weight: bold;\\r\\n line-height: 1;\\r\\n}\\r\\n.aggregator-value {\\r\\n margin-top: 20px;\\r\\n pointer-events: auto;\\r\\n}\\r\\n.aggregator-name {\\r\\n margin-top: 10px;\\r\\n}\\r\\n\\r\\n/* Grid */\\r\\n.grid-line {\\r\\n stroke: #D2D2D2;\\r\\n stroke-dasharray: 3;\\r\\n}\\r\\n\\r\\n/* Record overflow */\\r\\n.record-overflow-alert {\\r\\n background-color: #FFFFFF;;\\r\\n padding: 5px 10px 5px;\\r\\n border: 1px solid #0F6698;\\r\\n box-sizing: border-box;\\r\\n border-radius: 100px;\\r\\n font-family: \\\"Roboto\\\", sans-serif;\\r\\n font-style: normal;\\r\\n font-weight: 500;\\r\\n font-size: 10px;\\r\\n line-height: 140.62%;\\r\\n color: #0F6698;\\r\\n}\\r\\n.record-overflow-alert .btn-close {\\r\\n border: none;\\r\\n background-color: transparent;\\r\\n cursor: pointer;\\r\\n font-size: 1.3rem;\\r\\n}\\r\\n\\r\\n/* Embedded label */\\r\\n.embedded-label {\\r\\n color: #444444;\\r\\n font-family: \\\"Roboto\\\", sans-serif;\\r\\n font-style: normal;\\r\\n font-weight: 500;\\r\\n font-size: 12px;\\r\\n line-height: 140.62%;\\r\\n}\\r\\n\\r\\n/* Title */\\r\\n.chart-title {\\r\\n font-family: \\\"Roboto\\\", sans-serif;\\r\\n font-style: normal;\\r\\n font-weight: 500;\\r\\n font-size: 18px;\\r\\n line-height: 140.62%;\\r\\n cursor: default;\\r\\n}\\r\\n\\r\\n/* Mark dots */\\r\\n.charts-dot-hidden {\\r\\n display: none;\\r\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://mdt-charts/./src/style/develop.css?./node_modules/css-loader/dist/cjs.js");
/***/ }),
/***/ "./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
\*****************************************************/
/***/ ((module) => {
eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\n//# sourceURL=webpack://mdt-charts/./node_modules/css-loader/dist/runtime/api.js?");
/***/ }),
/***/ "./src/style/develop.css":
/*!*******************************!*\
!*** ./src/style/develop.css ***!
\*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_develop_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!./develop.css */ \"./node_modules/css-loader/dist/cjs.js!./src/style/develop.css\");\n\n \n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_develop_css__WEBPACK_IMPORTED_MODULE_1__.default, options);\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_develop_css__WEBPACK_IMPORTED_MODULE_1__.default.locals || {});\n\n//# sourceURL=webpack://mdt-charts/./src/style/develop.css?");
/***/ }),
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
/*!****************************************************************************!*\
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
\****************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = true ? __webpack_require__.nc : 0;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://mdt-charts/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?");
/***/ }),
/***/ "./src/playground/configsExamples/configExample.ts":
/*!*********************************************************!*\
!*** ./src/playground/configsExamples/configExample.ts ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\nconst configCars = {\r\n canvas: {\r\n class: 'outline',\r\n size: {\r\n width: 800,\r\n height: 510\r\n }\r\n },\r\n // options: {\r\n // type: '2d',\r\n // title: 'Заголовок графика',\r\n // selectable: true,\r\n // axis: {\r\n // key: {\r\n // visibility: true,\r\n // position: 'end',\r\n // ticks: {\r\n // flag: false\r\n // }\r\n // },\r\n // value: {\r\n // visibility: true,\r\n // domain: {\r\n // start: -1,\r\n // end: -1\r\n // },\r\n // position: 'start',\r\n // ticks: {\r\n // flag: false\r\n // }\r\n // }\r\n // },\r\n // additionalElements: {\r\n // gridLine: {\r\n // flag: {\r\n // value: true,\r\n // key: true\r\n // }\r\n // }\r\n // },\r\n // legend: {\r\n // show: true\r\n // },\r\n // orientation: 'vertical',\r\n // data: {\r\n // dataSource: 'dataSet',\r\n // keyField: {\r\n // name: 'brand',\r\n // format: 'string'\r\n // }\r\n // },\r\n // charts: [\r\n // {\r\n // isSegmented: false,\r\n // type: 'bar',\r\n // data: {\r\n // valueFields: [\r\n // {\r\n // name: 'price',\r\n // format: 'money',\r\n // title: 'Стоимость за 2020 год'\r\n // }\r\n // ]\r\n // },\r\n // tooltip: {\r\n // show: true\r\n // },\r\n // embeddedLabels: 'value',\r\n // markers: {\r\n // show: false\r\n // }\r\n // }\r\n // ]\r\n // }\r\n options: {\r\n type: 'polar',\r\n title: 'Title',\r\n selectable: true,\r\n legend: {\r\n show: true\r\n },\r\n data: {\r\n dataSource: 'dataSet',\r\n keyField: {\r\n name: 'brand',\r\n format: 'string'\r\n }\r\n },\r\n chart: {\r\n type: 'donut',\r\n data: {\r\n valueField: {\r\n name: 'price',\r\n format: 'money',\r\n title: 'some title'\r\n }\r\n },\r\n tooltip: {\r\n show: true\r\n }\r\n }\r\n }\r\n};\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (configCars);\r\n\n\n//# sourceURL=webpack://mdt-charts/./src/playground/configsExamples/configExample.ts?");
/***/ }),
/***/ "./src/playground/configsExamples/designerConfigExample.ts":
/*!*****************************************************************!*\
!*** ./src/playground/configsExamples/designerConfigExample.ts ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\nconst designerConfig = {\r\n canvas: {\r\n axisLabel: {\r\n maxSize: {\r\n main: 60\r\n }\r\n },\r\n chartBlockMargin: {\r\n top: 30,\r\n bottom: 20,\r\n left: 20,\r\n right: 20\r\n },\r\n legendBlock: {\r\n maxWidth: 200\r\n },\r\n chartOptions: {\r\n bar: {\r\n minBarWidth: 3,\r\n maxBarWidth: 30,\r\n groupMinDistance: 16,\r\n barDistance: 8,\r\n groupMaxDistance: 35\r\n },\r\n donut: {\r\n padAngle: 0,\r\n minThickness: 40,\r\n maxThickness: 60,\r\n aggregatorPad: 30\r\n }\r\n }\r\n },\r\n chartStyle: {\r\n baseColors: ['#209de3', '#ff3131', '#ffba00', '#20b078']\r\n },\r\n elementsOptions: {\r\n tooltip: {\r\n position: 'followCursor'\r\n }\r\n },\r\n dataFormat: {\r\n formatters: (value, options = {}) => {\r\n var type = typeof value;\r\n if ((value === undefined || value === null || value === \"\") && type != \"boolean\" && options.type != \"boolean\")\r\n return value;\r\n if (type == \"boolean\" || options.type == \"boolean\") {\r\n return value.toString();\r\n }\r\n if (value instanceof Date) {\r\n return value.getFullYear() + '-' + (value.getMonth() + 1) + '-' + value.getDate() + ' ' + value.getHours() + ':' + value.getMinutes();\r\n }\r\n if (options.type === \"markdown\") {\r\n return value.toString();\r\n }\r\n if ((options.type === \"money\" || options.type === \"number\")) {\r\n return Intl.NumberFormat('ru-Ru', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(value);\r\n }\r\n return value;\r\n }\r\n }\r\n};\r\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (designerConfig);\r\n\n\n//# sourceURL=webpack://mdt-charts/./src/playground/configsExamples/designerConfigExample.ts?");
/***/ }),
/***/ "./src/playground/listeners.ts":
/*!*************************************!*\
!*** ./src/playground/listeners.ts ***!
\*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ Listeners\n/* harmony export */ });\n/* harmony import */ var _engine_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../engine/engine */ \"./src/engine/engine.ts\");\n/* harmony import */ var _model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../model/modelBuilder */ \"./src/model/modelBuilder.ts\");\n/* harmony import */ var _style_develop_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../style/develop.css */ \"./src/style/develop.css\");\n/* harmony import */ var _configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./configsExamples/configExample */ \"./src/playground/configsExamples/configExample.ts\");\n/* harmony import */ var _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./configsExamples/designerConfigExample */ \"./src/playground/configsExamples/designerConfigExample.ts\");\n\r\n\r\nclass ListenersHelper {\r\n static randInt(min, max) {\r\n return Math.round(Math.random() * (max - min) + min);\r\n }\r\n static getCopy(obj) {\r\n const newObj = {};\r\n if (typeof obj === 'object') {\r\n for (let key in obj) {\r\n if (Array.isArray(obj[key])) {\r\n newObj[key] = this.getCopyOfArr(obj[key]);\r\n }\r\n else if (typeof obj[key] === 'object') {\r\n newObj[key] = this.getCopy(obj[key]);\r\n }\r\n else {\r\n newObj[key] = obj[key];\r\n }\r\n }\r\n }\r\n else {\r\n return obj;\r\n }\r\n return newObj;\r\n }\r\n static getCopyOfArr(initial) {\r\n const newArr = [];\r\n initial.forEach(d => newArr.push(this.getCopy(d)));\r\n return newArr;\r\n }\r\n static getInputValue(selector) {\r\n var _a;\r\n return (_a = document.querySelector(selector)) === null || _a === void 0 ? void 0 : _a.value;\r\n }\r\n static setInputValue(selector, value) {\r\n document.querySelector(selector).value = value.toString();\r\n }\r\n static setCheckboxValue(selector, value) {\r\n document.querySelector(selector).checked = value;\r\n }\r\n}\r\nclass Listeners {\r\n constructor(engine, config, designerConfig, data) {\r\n this.transition = {};\r\n this.engine = engine;\r\n this.config = config;\r\n this.designerConfig = designerConfig;\r\n this.data = data;\r\n this.setControlsValues();\r\n this.showControlsForNotation(this.config.options.type);\r\n this.setMainListeners();\r\n this.setDesignerListeners();\r\n this.setCommonListeners();\r\n this.setAxisListeners();\r\n this.set2DListeners();\r\n }\r\n updateFull() {\r\n this.dropAxisDomain(this.config);\r\n const model = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getUpdatedModel)(this.config, this.data, this.designerConfig);\r\n const preparedData = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getPreparedData)(model, this.data, this.config);\r\n this.engine.updateFullBlock(model, preparedData);\r\n }\r\n dropAxisDomain(config) {\r\n if (config.options.type === '2d') {\r\n config.options.axis.value.domain.end = -1;\r\n config.options.axis.value.domain.start = -1;\r\n }\r\n }\r\n showControlsForNotation(notationType) {\r\n if (notationType === '2d') {\r\n document.querySelector('.block-polar').style.display = 'none';\r\n document.querySelector('.block-2d').style.display = 'block';\r\n document.querySelector('.block-axis').style.display = 'block';\r\n }\r\n else if (notationType === 'polar') {\r\n document.querySelector('.block-2d').style.display = 'none';\r\n document.querySelector('.block-polar').style.display = 'block';\r\n document.querySelector('.block-axis').style.display = 'none';\r\n }\r\n else if (notationType === 'interval') {\r\n document.querySelector('.block-polar').style.display = 'none';\r\n document.querySelector('.block-2d').style.display = 'none';\r\n document.querySelector('.block-axis').style.display = 'block';\r\n }\r\n }\r\n getDataWithRandomValues(data, maxRand) {\r\n if (this.config.options.type === '2d')\r\n this.config.options.charts.forEach((chart) => {\r\n data[_configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default.options.data.dataSource].forEach((row) => {\r\n row[chart.data.valueFields[0].name] = ListenersHelper.randInt(0, maxRand);\r\n });\r\n });\r\n else if (this.config.options.type === 'polar') {\r\n data[_configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default.options.data.dataSource].forEach((row) => {\r\n if (this.config.options.type === 'polar')\r\n row[this.config.options.chart.data.valueField.name] = ListenersHelper.randInt(0, maxRand);\r\n });\r\n }\r\n return data;\r\n }\r\n getDataConfig(notationType) {\r\n if (notationType === '2d') {\r\n return {\r\n valueFields: [\r\n {\r\n name: 'price',\r\n format: 'money',\r\n title: 'Цена автомобилей на рынке'\r\n },\r\n {\r\n name: 'count',\r\n format: 'integer',\r\n title: 'Количество автомобилей на душу населения'\r\n }\r\n ]\r\n };\r\n }\r\n else if (notationType === 'interval') {\r\n return {\r\n valueField1: {\r\n name: 'start',\r\n format: 'date'\r\n },\r\n valueField2: {\r\n name: 'end',\r\n format: 'date'\r\n }\r\n };\r\n }\r\n else if (notationType === 'polar') {\r\n return {\r\n valueField: {\r\n name: 'price',\r\n format: 'money',\r\n title: 'Количество'\r\n }\r\n };\r\n }\r\n }\r\n getTooltipConfig() {\r\n return {\r\n show: true\r\n };\r\n }\r\n changeConfigOptions(notationType) {\r\n if (notationType === '2d') {\r\n const options = {\r\n title: this.config.options.title,\r\n legend: this.config.options.legend,\r\n selectable: this.config.options.selectable,\r\n orientation: ListenersHelper.getInputValue('#chart-orient'),\r\n type: notationType,\r\n data: {\r\n dataSource: 'dataSet',\r\n keyField: {\r\n format: 'string',\r\n name: 'brand'\r\n }\r\n },\r\n charts: [\r\n {\r\n data: this.getDataConfig(notationType),\r\n isSegmented: false,\r\n tooltip: this.getTooltipConfig(),\r\n type: ListenersHelper.getInputValue('#chart-2d-type') === 'barLine' ? 'bar' : ListenersHelper.getInputValue('#chart-2d-type'),\r\n embeddedLabels: 'none',\r\n markers: {\r\n show: true\r\n }\r\n }\r\n ],\r\n axis: {\r\n key: {\r\n visibility: true,\r\n position: ListenersHelper.getInputValue('#key-axis-orient'),\r\n ticks: {\r\n flag: false\r\n }\r\n },\r\n value: {\r\n visibility: true,\r\n domain: {\r\n start: -1,\r\n end: -1\r\n },\r\n position: ListenersHelper.getInputValue('#value-axis-orient'),\r\n ticks: {\r\n flag: false\r\n }\r\n }\r\n },\r\n additionalElements: {\r\n gridLine: {\r\n flag: {\r\n value: true,\r\n key: false\r\n }\r\n }\r\n },\r\n tooltip: this.config.options.tooltip\r\n };\r\n this.config.options = options;\r\n }\r\n else if (notationType === 'polar') {\r\n const options = {\r\n title: this.config.options.title,\r\n legend: this.config.options.legend,\r\n selectable: this.config.options.selectable,\r\n data: {\r\n dataSource: 'dataSet',\r\n keyField: {\r\n format: 'string',\r\n name: 'brand'\r\n }\r\n },\r\n type: notationType,\r\n chart: {\r\n data: this.getDataConfig(notationType),\r\n tooltip: this.getTooltipConfig(),\r\n type: 'donut'\r\n },\r\n tooltip: this.config.options.tooltip\r\n };\r\n this.config.options = options;\r\n }\r\n else if (notationType === 'interval') {\r\n const options = {\r\n title: this.config.options.title,\r\n legend: this.config.options.legend,\r\n selectable: this.config.options.selectable,\r\n data: {\r\n dataSource: 'dataSet_gantt',\r\n keyField: {\r\n format: 'string',\r\n name: 'task'\r\n }\r\n },\r\n orientation: ListenersHelper.getInputValue('#chart-orient'),\r\n type: notationType,\r\n chart: {\r\n data: this.getDataConfig(notationType),\r\n tooltip: this.getTooltipConfig(),\r\n type: 'gantt'\r\n },\r\n axis: {\r\n key: {\r\n visibility: true,\r\n position: ListenersHelper.getInputValue('#key-axis-orient'),\r\n ticks: {\r\n flag: false\r\n }\r\n },\r\n value: {\r\n visibility: true,\r\n position: ListenersHelper.getInputValue('#value-axis-orient'),\r\n ticks: {\r\n flag: false\r\n }\r\n }\r\n },\r\n additionalElements: {\r\n gridLine: {\r\n flag: {\r\n value: true,\r\n key: false\r\n }\r\n }\r\n },\r\n tooltip: this.config.options.tooltip\r\n };\r\n this.config.options = options;\r\n }\r\n this.updateFull();\r\n }\r\n change2DChartConfig(chartType) {\r\n const config = this.config;\r\n if (config.options.type === '2d') {\r\n if (chartType === 'barLine' && config.options.charts.length === 1) {\r\n config.options.charts.push(ListenersHelper.getCopy(config.options.charts[0]));\r\n config.options.charts[0].type = 'bar';\r\n config.options.charts[1].type = 'line';\r\n }\r\n else if (chartType === 'barLine' && config.options.charts.length === 2) {\r\n config.options.charts[0].type = 'bar';\r\n config.options.charts[1].type = 'line';\r\n }\r\n else if (chartType !== 'barLine') {\r\n config.options.charts.splice(1, 1);\r\n config.options.charts[0].type = chartType;\r\n }\r\n }\r\n }\r\n setMainListeners() {\r\n const thisClass = this;\r\n document.querySelector('#notation').addEventListener('change', function () {\r\n thisClass.showControlsForNotation(this.value);\r\n thisClass.changeConfigOptions(this.value);\r\n thisClass.setControlsValues();\r\n });\r\n document.querySelector('#block-width').addEventListener('input', function () {\r\n thisClass.config.canvas.size.width = parseFloat(ListenersHelper.getInputValue('#block-width')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#block-height').addEventListener('input', function () {\r\n thisClass.config.canvas.size.height = parseFloat(ListenersHelper.getInputValue('#block-height')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#wrapper-border').addEventListener('change', function () {\r\n if (this.checked) {\r\n thisClass.config.canvas.class += ' outline';\r\n }\r\n else {\r\n thisClass.config.canvas.class = thisClass.config.canvas.class.replace('outline', '');\r\n }\r\n thisClass.updateFull();\r\n });\r\n }\r\n setDesignerListeners() {\r\n const thisClass = this;\r\n document.querySelector('#tooltip-position').addEventListener('change', function () {\r\n _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__.default.elementsOptions.tooltip.position = this.value;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#axis-label-width').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.axisLabel.maxSize.main = parseFloat(ListenersHelper.getInputValue('#axis-label-width'));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-margin-top').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartBlockMargin.top = parseFloat(ListenersHelper.getInputValue('#chart-block-margin-top')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-margin-bottom').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartBlockMargin.bottom = parseFloat(ListenersHelper.getInputValue('#chart-block-margin-bottom')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-margin-left').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartBlockMargin.left = parseFloat(ListenersHelper.getInputValue('#chart-block-margin-left')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-margin-right').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartBlockMargin.right = parseFloat(ListenersHelper.getInputValue('#chart-block-margin-right')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-transition-chartUpdate').addEventListener('input', function () {\r\n thisClass.transition.chartUpdate = parseFloat(ListenersHelper.getInputValue('#chart-block-transition-chartUpdate'));\r\n thisClass.designerConfig.transitions = thisClass.transition;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-transition-elementFadeOut').addEventListener('input', function () {\r\n thisClass.transition.elementFadeOut = parseFloat(ListenersHelper.getInputValue('#chart-block-transition-elementFadeOut'));\r\n thisClass.designerConfig.transitions = thisClass.transition;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-transition-tooltipSlide').addEventListener('input', function () {\r\n thisClass.transition.tooltipSlide = parseFloat(ListenersHelper.getInputValue('#chart-block-transition-tooltipSlide'));\r\n thisClass.designerConfig.transitions = thisClass.transition;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-transition-donutHover').addEventListener('input', function () {\r\n thisClass.transition.higlightedScale = parseFloat(ListenersHelper.getInputValue('#chart-block-transition-donutHover'));\r\n thisClass.designerConfig.transitions = thisClass.transition;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#chart-block-transition-markerHover').addEventListener('input', function () {\r\n thisClass.transition.markerHover = parseFloat(ListenersHelper.getInputValue('#chart-block-transition-markerHover'));\r\n thisClass.designerConfig.transitions = thisClass.transition;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#bar-distance').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.bar.barDistance = parseFloat(ListenersHelper.getInputValue('#bar-distance')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#min-bar-group-distance').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.bar.groupMinDistance = parseFloat(ListenersHelper.getInputValue('#min-bar-group-distance'));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#max-bar-group-distance').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.bar.groupMaxDistance = parseFloat(ListenersHelper.getInputValue('#max-bar-group-distance'));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#min-bar-size').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.bar.minBarWidth = parseFloat(ListenersHelper.getInputValue('#min-bar-size')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#max-bar-size').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.bar.maxBarWidth = parseFloat(ListenersHelper.getInputValue('#max-bar-size')) || 0;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#pad-angle').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.donut.padAngle = parseFloat(ListenersHelper.getInputValue('#pad-angle'));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#donut-min-thickness').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.donut.minThickness = parseFloat(ListenersHelper.getInputValue('#donut-min-thickness'));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#donut-max-thickness').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.donut.maxThickness = parseFloat(ListenersHelper.getInputValue('#donut-max-thickness'));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#aggregator-pad').addEventListener('input', function () {\r\n thisClass.designerConfig.canvas.chartOptions.donut.aggregatorPad = parseFloat(this.value);\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#base-colors').addEventListener('keydown', function (e) {\r\n if (e.code === 'Enter') {\r\n thisClass.designerConfig.chartStyle.baseColors = this.value.split(', ');\r\n thisClass.updateFull();\r\n }\r\n });\r\n }\r\n setCommonListeners() {\r\n const thisClass = this;\r\n const config = this.config;\r\n document.querySelector('#data-size').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'polar') {\r\n config.options.data.dataSource = this.value === 'normal' ? 'dataSet' : 'dataSet_large';\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#legend').addEventListener('change', function () {\r\n config.options.legend.show = this.checked;\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#refresh').addEventListener('input', function () {\r\n DataUpdater.updateRefreshValue(parseFloat(ListenersHelper.getInputValue('#refresh')));\r\n thisClass.updateFull();\r\n });\r\n document.querySelector('#update-enabler').addEventListener('change', function () {\r\n DataUpdater.updateIsOn(this.checked);\r\n thisClass.updateFull();\r\n this.checked ? document.querySelector('#refresh').setAttribute('disabled', 'disabled') : document.querySelector('#refresh').removeAttribute('disabled');\r\n });\r\n const randomFunc = function () {\r\n if (config.options.type === '2d' || config.options.type === 'polar') {\r\n const max = parseInt(ListenersHelper.getInputValue('#max-random-value')) || 120;\r\n const dataCopy = ListenersHelper.getCopy(thisClass.data);\r\n const newData = thisClass.getDataWithRandomValues(dataCopy, max);\r\n if (config.options.type === '2d' && config.options.axis.value.domain.end < max)\r\n config.options.axis.value.domain.end = -1;\r\n const model = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getUpdatedModel)(thisClass.config, newData, thisClass.designerConfig);\r\n const preparedData = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getPreparedData)(model, newData, config);\r\n thisClass.engine.updateData(model, preparedData);\r\n }\r\n };\r\n document.querySelector('.btn-random').addEventListener('click', function () {\r\n randomFunc();\r\n });\r\n document.querySelector('#max-random-value').addEventListener('keydown', function (e) {\r\n if (e.code === 'Enter') {\r\n randomFunc();\r\n }\r\n });\r\n }\r\n set2DListeners() {\r\n const thisClass = this;\r\n const config = this.config;\r\n document.querySelector('#chart-2d-type').addEventListener('change', function () {\r\n if (config.options.type === '2d') {\r\n thisClass.change2DChartConfig(this.value);\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#embedded-labels').addEventListener('change', function () {\r\n if (config.options.type === '2d') {\r\n config.options.charts.forEach(chart => chart.embeddedLabels = this.value);\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('.btn-domain').addEventListener('click', function () {\r\n if (config.options.type === '2d') {\r\n const start = ListenersHelper.getInputValue('#domain-start');\r\n const end = ListenersHelper.getInputValue('#domain-end');\r\n config.options.axis.value.domain.start = parseInt(start) || -1;\r\n config.options.axis.value.domain.end = parseInt(end) || -1;\r\n thisClass.engine.updateData((0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getUpdatedModel)(thisClass.config, thisClass.data, thisClass.designerConfig), thisClass.data);\r\n }\r\n });\r\n document.querySelector('#domain-start').addEventListener('keydown', function (e) {\r\n if (e.code === 'Enter') {\r\n if (config.options.type === '2d') {\r\n const start = ListenersHelper.getInputValue('#domain-start');\r\n const end = ListenersHelper.getInputValue('#domain-end');\r\n config.options.axis.value.domain.start = parseInt(start) || -1;\r\n config.options.axis.value.domain.end = parseInt(end) || -1;\r\n thisClass.engine.updateData((0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getUpdatedModel)(thisClass.config, thisClass.data, thisClass.designerConfig), thisClass.data);\r\n }\r\n }\r\n });\r\n document.querySelector('#domain-end').addEventListener('keydown', function (e) {\r\n if (e.code === 'Enter') {\r\n if (config.options.type === '2d') {\r\n const start = ListenersHelper.getInputValue('#domain-start');\r\n const end = ListenersHelper.getInputValue('#domain-end');\r\n config.options.axis.value.domain.start = parseInt(start) || -1;\r\n config.options.axis.value.domain.end = parseInt(end) || -1;\r\n thisClass.engine.updateData((0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getUpdatedModel)(thisClass.config, thisClass.data, thisClass.designerConfig), thisClass.data);\r\n }\r\n }\r\n });\r\n document.querySelector('#is-segmented').addEventListener('change', function () {\r\n if (config.options.type === '2d') {\r\n config.options.charts.forEach(chart => {\r\n chart.isSegmented = this.checked;\r\n });\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#markers').addEventListener('change', function () {\r\n if (config.options.type === '2d') {\r\n config.options.charts.forEach(chart => {\r\n chart.markers.show = this.checked;\r\n });\r\n thisClass.updateFull();\r\n }\r\n });\r\n }\r\n setAxisListeners() {\r\n const thisClass = this;\r\n const config = this.config;\r\n document.querySelector('#chart-orient').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.orientation = this.value;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#key-axis-orient').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.axis.key.position = this.value;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#key-axis-visibility').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.axis.key.visibility = this.checked;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#value-axis-orient').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.axis.value.position = this.value;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#value-axis-visibility').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.axis.value.visibility = this.checked;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#config-key-grid').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.additionalElements.gridLine.flag.key = this.checked;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#config-value-grid').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.additionalElements.gridLine.flag.value = this.checked;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#config-tick-key').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.axis.key.ticks.flag = this.checked;\r\n thisClass.updateFull();\r\n }\r\n });\r\n document.querySelector('#config-tick-value').addEventListener('change', function () {\r\n if (config.options.type === '2d' || config.options.type === 'interval') {\r\n config.options.axis.value.ticks.flag = this.checked;\r\n thisClass.updateFull();\r\n }\r\n });\r\n }\r\n setControlsValues() {\r\n const config = this.config;\r\n const designerConfig = this.designerConfig;\r\n ListenersHelper.setInputValue('#notation', config.options.type);\r\n ListenersHelper.setInputValue('#block-width', config.canvas.size.width);\r\n ListenersHelper.setInputValue('#block-height', config.canvas.size.height);\r\n ListenersHelper.setCheckboxValue('#wrapper-border', config.canvas.class.includes('outline'));\r\n ListenersHelper.setCheckboxValue('#legend', config.options.legend.show);\r\n ListenersHelper.setInputValue('#data-size', config.options.data.dataSource.includes('large') ? 'large' : 'normal');\r\n ListenersHelper.setInputValue('#axis-label-width', designerConfig.canvas.axisLabel.maxSize.main);\r\n ListenersHelper.setInputValue('#chart-block-margin-top', designerConfig.canvas.chartBlockMargin.top);\r\n ListenersHelper.setInputValue('#chart-block-margin-bottom', designerConfig.canvas.chartBlockMargin.bottom);\r\n ListenersHelper.setInputValue('#chart-block-margin-left', designerConfig.canvas.chartBlockMargin.left);\r\n ListenersHelper.setInputValue('#chart-block-margin-right', designerConfig.canvas.chartBlockMargin.right);\r\n ListenersHelper.setInputValue('#min-bar-group-distance', designerConfig.canvas.chartOptions.bar.groupMinDistance);\r\n ListenersHelper.setInputValue('#max-bar-group-distance', designerConfig.canvas.chartOptions.bar.groupMaxDistance);\r\n ListenersHelper.setInputValue('#bar-distance', designerConfig.canvas.chartOptions.bar.barDistance);\r\n ListenersHelper.setInputValue('#min-bar-size', designerConfig.canvas.chartOptions.bar.minBarWidth);\r\n ListenersHelper.setInputValue('#max-bar-size', designerConfig.canvas.chartOptions.bar.maxBarWidth);\r\n ListenersHelper.setInputValue('#base-colors', designerConfig.chartStyle.baseColors.join(', '));\r\n ListenersHelper.setInputValue('#pad-angle', designerConfig.canvas.chartOptions.donut.padAngle);\r\n ListenersHelper.setInputValue('#pad-angle', designerConfig.canvas.chartOptions.donut.padAngle);\r\n ListenersHelper.setInputValue('#aggregator-pad', designerConfig.canvas.chartOptions.donut.aggregatorPad);\r\n ListenersHelper.setInputValue('#donut-max-thickness', designerConfig.canvas.chartOptions.donut.maxThickness);\r\n ListenersHelper.setInputValue('#donut-min-thickness', designerConfig.canvas.chartOptions.donut.minThickness);\r\n ListenersHelper.setInputValue('#tooltip-position', designerConfig.elementsOptions.tooltip.position);\r\n if (config.options.type === '2d') {\r\n ListenersHelper.setInputValue('#chart-2d-type', config.options.charts[0].type);\r\n ListenersHelper.setInputValue('#chart-orient', config.options.orientation);\r\n ListenersHelper.setInputValue('#key-axis-orient', config.options.axis.key.position);\r\n ListenersHelper.setInputValue('#value-axis-orient', config.options.axis.value.position);\r\n ListenersHelper.setCheckboxValue('#config-value-grid', config.options.additionalElements.gridLine.flag.value);\r\n ListenersHelper.setCheckboxValue('#config-key-grid', config.options.additionalElements.gridLine.flag.key);\r\n ListenersHelper.setCheckboxValue('#config-tick-key', config.options.axis.key.ticks.flag);\r\n ListenersHelper.setCheckboxValue('#config-tick-value', config.options.axis.value.ticks.flag);\r\n ListenersHelper.setCheckboxValue('#is-segmented', config.options.charts.findIndex(ch => ch.isSegmented) !== -1);\r\n ListenersHelper.setCheckboxValue('#markers', config.options.charts.findIndex(ch => ch.markers.show) !== -1);\r\n ListenersHelper.setInputValue('#embedded-labels', config.options.charts[0].embeddedLabels);\r\n ListenersHelper.setCheckboxValue('#key-axis-visibility', config.options.axis.key.visibility);\r\n ListenersHelper.setCheckboxValue('#value-axis-visibility', config.options.axis.value.visibility);\r\n }\r\n else if (config.options.type === 'polar') {\r\n ListenersHelper.setInputValue('#chart-polar-type', config.options.chart.type);\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\nconst data = __webpack_require__(/*! ./assets/dataSet.json */ \"./src/playground/assets/dataSet.json\");\r\n// const chart = new Chart(config, designerConfig, data, false);\r\n// chart.render(document.querySelector('.main-wrapper'));\r\nconst engine = new _engine_engine__WEBPACK_IMPORTED_MODULE_0__.default(2, (rows) => {\r\n console.log('Selected keys:', rows.map(row => row.brand));\r\n}, undefined);\r\nconst model = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.assembleModel)(_configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default, data, _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__.default);\r\nengine.render(model, (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getPreparedData)(model, data, _configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default), document.querySelector('.main-wrapper'));\r\nnew Listeners(engine, _configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default, _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__.default, data);\r\nconst config3 = __webpack_require__(/*! ./configsExamples/configTest2D.json */ \"./src/playground/configsExamples/configTest2D.json\");\r\nconst model3 = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.assembleModel)(config3, data, _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__.default);\r\nconst engine3 = new _engine_engine__WEBPACK_IMPORTED_MODULE_0__.default(3, void 0, undefined);\r\nengine3.render(model3, (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getPreparedData)(model3, data, config3), document.querySelector('.main-wrapper2'));\r\nconst config2 = __webpack_require__(/*! ./configsExamples/configTestPolar.json */ \"./src/playground/configsExamples/configTestPolar.json\");\r\nconst model2 = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.assembleModel)(config2, data, _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__.default);\r\nconst engine2 = new _engine_engine__WEBPACK_IMPORTED_MODULE_0__.default(4, null, undefined);\r\nengine2.render(model2, (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getPreparedData)(model2, data, config2), document.querySelector('.main-wrapper2'));\r\n//====================================================================================================== Data updating\r\nclass DataUpdater {\r\n static updateIsOn(value) {\r\n if (value)\r\n DataUpdater.startDataChanging(DataUpdater.refresh);\r\n else\r\n DataUpdater.destroyDataChanging();\r\n }\r\n static updateRefreshValue(value) {\r\n if (value < 1)\r\n return;\r\n DataUpdater.refresh = value;\r\n }\r\n static startDataChanging(ms) {\r\n this.destroyDataChanging();\r\n const run = () => {\r\n DataUpdater.timeOut = setTimeout(() => {\r\n const newData = ListenersHelper.getCopy(data);\r\n this.changeData(newData);\r\n const newModel = (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getUpdatedModel)(_configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default, newData, _configsExamples_designerConfigExample__WEBPACK_IMPORTED_MODULE_3__.default);\r\n engine.updateData(newModel, (0,_model_modelBuilder__WEBPACK_IMPORTED_MODULE_1__.getPreparedData)(newModel, newData, _configsExamples_configExample__WEBPACK_IMPORTED_MODULE_2__.default));\r\n run();\r\n }, ms);\r\n };\r\n run();\r\n }\r\n static destroyDataChanging() {\r\n clearTimeout(DataUpdater.timeOut);\r\n }\r\n static changeData(newData) {\r\n const random = Math.random();\r\n if (random > 0.66) {\r\n for (let i = 0; i < ListenersHelper.randInt(1, 4); i++) {\r\n const row = {\r\n $id: ListenersHelper.randInt(100, 5000000)\r\n };\r\n row[this.keyFieldName] = this.makeHASH(ListenersHelper.randInt(4, 10)).toUpperCase();\r\n this.valueFieldNames.forEach(vField => row[vField] = ListenersHelper.randInt(0, 150));\r\n newData[this.dataSetName].push(row);\r\n }\r\n }\r\n else if (random < 0.33) {\r\n newData[this.dataSetName].splice(ListenersHelper.randInt(0, 4), ListenersHelper.randInt(1, 3));\r\n }\r\n newData[this.dataSetName][ListenersHelper.randInt(0, newData[this.dataSetName].length - 1)]['price'] = ListenersHelper.randInt(0, 100);\r\n newData[this.dataSetName][ListenersHelper.randInt(0, newData[this.dataSetName].length - 1)]['count'] = ListenersHelper.randInt(0, 100);\r\n }\r\n static makeHASH(length) {\r\n var result = '';\r\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n var charactersLength = characters.length;\r\n for (var i = 0; i < length; i++) {\r\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\r\n }\r\n return result;\r\n }\r\n}\r\nDataUpdater.timeOut = null;\r\nDataUpdater.refresh = 4000;\r\nDataUpdater.dataSetName = 'dataSet';\r\nDataUpdater.keyFieldName = 'brand';\r\nDataUpdater.valueFieldNames = ['price', 'count'];\r\nDataUpdater.counter = 1;\r\n\n\n//# sourceURL=webpack://mdt-charts/./src/playground/listeners.ts?");
/***/ }),
/***/ "./src/playground/assets/dataSet.json":
/*!********************************************!*\
!*** ./src/playground/assets/dataSet.json ***!
\********************************************/
/***/ ((module) => {
eval("module.exports = JSON.parse(\"{\\\"dataSet\\\":[{\\\"$id\\\":1,\\\"brand\\\":\\\"BMW\\\",\\\"price\\\":100,\\\"count\\\":12},{\\\"$id\\\":2,\\\"brand\\\":\\\"LADA\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"$id\\\":3,\\\"brand\\\":\\\"MERCEDES\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"$id\\\":4,\\\"brand\\\":\\\"AUDI\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"$id\\\":5,\\\"brand\\\":\\\"VOLKSWAGEN\\\",\\\"price\\\":115,\\\"count\\\":6},{\\\"$id\\\":6,\\\"brand\\\":\\\"DODGE\\\",\\\"price\\\":115,\\\"count\\\":4},{\\\"$id\\\":7,\\\"brand\\\":\\\"SAAB\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"$id\\\":8,\\\"brand\\\":\\\"HONDA\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"$id\\\":9,\\\"brand\\\":\\\"TOYOTA\\\",\\\"price\\\":40,\\\"count\\\":15}],\\\"dataSet_large\\\":[{\\\"brand\\\":\\\"BMW\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA\\\",\\\"price\\\":20,\\\"count\\\":20},{\\\"brand\\\":\\\"TOYOTA\\\",\\\"price\\\":115,\\\"count\\\":30},{\\\"brand\\\":\\\"BMW2\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA2\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES2\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI2\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN2\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE2\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB2\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA2\\\",\\\"price\\\":20,\\\"count\\\":7},{\\\"brand\\\":\\\"TOYOTA2\\\",\\\"price\\\":115,\\\"count\\\":8}],\\\"dataSet_gantt\\\":[{\\\"task\\\":\\\"Planning\\\",\\\"start\\\":\\\"2020-12-03\\\",\\\"end\\\":\\\"2020-12-05\\\"},{\\\"task\\\":\\\"Build architecture\\\",\\\"start\\\":\\\"2020-12-05\\\",\\\"end\\\":\\\"2020-12-10\\\"},{\\\"task\\\":\\\"Programming\\\",\\\"start\\\":\\\"2020-12-10\\\",\\\"end\\\":\\\"2020-12-11\\\"},{\\\"task\\\":\\\"Testing\\\",\\\"start\\\":\\\"2020-12-12\\\",\\\"end\\\":\\\"2020-12-19\\\"},{\\\"task\\\":\\\"Deploying\\\",\\\"start\\\":\\\"2020-12-20\\\",\\\"end\\\":\\\"2020-12-31\\\"}],\\\"dataSet_72\\\":[{\\\"brand\\\":\\\"BMW\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW2\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA2\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES2\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI2\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN2\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE2\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB2\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA2\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA2\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW3\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA3\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES3\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI3\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN3\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE3\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB3\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA3\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA3\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW4\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA4\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES4\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI4\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN4\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE4\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB4\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA4\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA4\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW5\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA5\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES5\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI5\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN5\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE5\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB5\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA5\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA5\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW6\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA6\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES6\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI6\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN6\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE6\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB6\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA6\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA6\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW7\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA7\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES7\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI7\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN7\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE7\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB7\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA7\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA7\\\",\\\"price\\\":115,\\\"count\\\":1},{\\\"brand\\\":\\\"BMW8\\\",\\\"price\\\":120,\\\"count\\\":12},{\\\"brand\\\":\\\"LADA8\\\",\\\"price\\\":50,\\\"count\\\":10},{\\\"brand\\\":\\\"MERCEDES8\\\",\\\"price\\\":15,\\\"count\\\":12},{\\\"brand\\\":\\\"AUDI8\\\",\\\"price\\\":20,\\\"count\\\":5},{\\\"brand\\\":\\\"VOLKSWAGEN8\\\",\\\"price\\\":40,\\\"count\\\":10},{\\\"brand\\\":\\\"DODGE8\\\",\\\"price\\\":70,\\\"count\\\":4},{\\\"brand\\\":\\\"SAAB8\\\",\\\"price\\\":50,\\\"count\\\":11},{\\\"brand\\\":\\\"HONDA8\\\",\\\"price\\\":20,\\\"count\\\":2},{\\\"brand\\\":\\\"TOYOTA8\\\",\\\"price\\\":115,\\\"count\\\":1}],\\\"dataSet_data\\\":[{\\\"SortOrder\\\":202007,\\\"ec\\\":19000,\\\"ac\\\":8000,\\\"x\\\":\\\"Jul 20\\\"},{\\\"SortOrder\\\":202008,\\\"ec\\\":166000,\\\"ac\\\":31000,\\\"x\\\":\\\"Aug 20\\\"},{\\\"SortOrder\\\":202010,\\\"ec\\\":17000,\\\"ac\\\":0,\\\"x\\\":\\\"Oct 20\\\"},{\\\"SortOrder\\\":202011,\\\"ec\\\":15000,\\\"ac\\\":0,\\\"x\\\":\\\"Nov 20\\\"},{\\\"SortOrder\\\":202012,\\\"ec\\\":317007,\\\"ac\\\":36000,\\\"x\\\":\\\"Dec 20\\\"},{\\\"SortOrder\\\":202101,\\\"ec\\\":4500,\\\"ac\\\":0,\\\"x\\\":\\\"Jan 21\\\"},{\\\"SortOrder\\\":202102,\\\"ec\\\":200000,\\\"ac\\\":0,\\\"x\\\":\\\"Feb 21\\\"}],\\\"data\\\":[{\\\"x\\\":\\\"Выставка Обзор IT-рынка\\\",\\\"y\\\":175007},{\\\"x\\\":\\\"Выездной корпоратив\\\",\\\"y\\\":166000},{\\\"x\\\":\\\"Вечеринка в книжном баре\\\",\\\"y\\\":116000},{\\\"x\\\":\\\"Шашлыки и баня в Чебоксарах\\\",\\\"y\\\":26000},{\\\"x\\\":\\\"ДР Саши и Коли\\\",\\\"y\\\":19000},{\\\"x\\\":\\\"Вечер ужасов\\\",\\\"y\\\":17000},{\\\"x\\\":\\\"ДР Наташи, Петра и Самвела\\\",\\\"y\\\":15000},{\\\"x\\\":\\\"Митап в университете\\\",\\\"y\\\":7000},{\\\"x\\\":\\\"Презентация Roadmap\\\",\\\"y\\\":4500}]}\");\n\n//# sourceURL=webpack://mdt-charts/./src/playground/assets/dataSet.json?");
/***/ }),
/***/ "./src/playground/configsExamples/configTest2D.json":
/*!**********************************************************!*\
!*** ./src/playground/configsExamples/configTest2D.json ***!
\**********************************************************/
/***/ ((module) => {
eval("module.exports = JSON.parse(\"{\\\"canvas\\\":{\\\"class\\\":\\\"svg-chart outline\\\",\\\"size\\\":{\\\"width\\\":800,\\\"height\\\":400}},\\\"options\\\":{\\\"title\\\":\\\"Количество автомобилей\\\",\\\"type\\\":\\\"2d\\\",\\\"isSegmented\\\":false,\\\"axis\\\":{\\\"key\\\":{\\\"position\\\":\\\"end\\\",\\\"ticks\\\":{\\\"flag\\\":false},\\\"visibility\\\":true},\\\"value\\\":{\\\"domain\\\":{\\\"start\\\":-1,\\\"end\\\":-1},\\\"position\\\":\\\"start\\\",\\\"ticks\\\":{\\\"flag\\\":false},\\\"visibility\\\":true}},\\\"additionalElements\\\":{\\\"gridLine\\\":{\\\"flag\\\":{\\\"value\\\":true,\\\"key\\\":true}}},\\\"legend\\\":{\\\"show\\\":true},\\\"orientation\\\":\\\"vertical\\\",\\\"data\\\":{\\\"dataSource\\\":\\\"dataSet\\\",\\\"keyField\\\":{\\\"name\\\":\\\"brand\\\",\\\"format\\\":\\\"string\\\"}},\\\"selectable\\\":true,\\\"charts\\\":[{\\\"title\\\":\\\"Рост стоимости\\\",\\\"type\\\":\\\"bar\\\",\\\"data\\\":{\\\"valueFields\\\":[{\\\"name\\\":\\\"price\\\",\\\"format\\\":\\\"money\\\",\\\"title\\\":\\\"Заголовок\\\"}]},\\\"tooltip\\\":{\\\"show\\\":true},\\\"markers\\\":{\\\"show\\\":true},\\\"embeddedLabels\\\":\\\"key\\\"},{\\\"title\\\":\\\"Рост стоимости\\\",\\\"type\\\":\\\"line\\\",\\\"data\\\":{\\\"valueFields\\\":[{\\\"name\\\":\\\"price\\\",\\\"format\\\":\\\"money\\\",\\\"title\\\":\\\"Заголовок 1\\\"},{\\\"name\\\":\\\"count\\\",\\\"format\\\":\\\"integer\\\",\\\"title\\\":\\\"Заголовок 2\\\"}]},\\\"tooltip\\\":{\\\"show\\\":true},\\\"markers\\\":{\\\"show\\\":true},\\\"embeddedLabels\\\":\\\"key\\\"}]}}\");\n\n//# sourceURL=webpack://mdt-charts/./src/playground/configsExamples/configTest2D.json?");
/***/ }),
/***/ "./src/playground/configsExamples/configTestPolar.json":
/*!*************************************************************!*\
!*** ./src/playground/configsExamples/configTestPolar.json ***!
\*************************************************************/
/***/ ((module) => {
eval("module.exports = JSON.parse(\"{\\\"canvas\\\":{\\\"class\\\":\\\"svg-chart outline\\\",\\\"size\\\":{\\\"width\\\":800,\\\"height\\\":510}},\\\"options\\\":{\\\"title\\\":\\\"Рост стоимости\\\",\\\"type\\\":\\\"polar\\\",\\\"selectable\\\":true,\\\"legend\\\":{\\\"show\\\":true},\\\"data\\\":{\\\"dataSource\\\":\\\"dataSet\\\",\\\"keyField\\\":{\\\"name\\\":\\\"brand\\\",\\\"format\\\":\\\"string\\\"}},\\\"chart\\\":{\\\"title\\\":\\\"Рост стоимости\\\",\\\"type\\\":\\\"donut\\\",\\\"data\\\":{\\\"valueField\\\":{\\\"name\\\":\\\"price\\\",\\\"format\\\":\\\"money\\\",\\\"title\\\":\\\"Стоимость\\\"}},\\\"tooltip\\\":{\\\"show\\\":true}}}}\");\n\n//# sourceURL=webpack://mdt-charts/./src/playground/configsExamples/configTestPolar.json?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ id: moduleId,
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/******/ // the startup function
/******/ // It's empty as some runtime module handles the default behavior
/******/ __webpack_require__.x = x => {}
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => module['default'] :
/******/ () => module;
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "listeners": 0
/******/ };
/******/
/******/ var deferredModules = [
/******/ ["./src/playground/listeners.ts","vendors-node_modules_chroma-js_chroma_js-node_modules_d3-array_src_max_js-node_modules_d3-arr-c3fc24","src_engine_engine_ts"]
/******/ ];
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ var checkDeferredModules = x => {};
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime, executeModules] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) runtime(__webpack_require__);
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ if(executeModules) deferredModules.push.apply(deferredModules, executeModules);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkmdt_charts"] = self["webpackChunkmdt_charts"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/
/******/ function checkDeferredModulesImpl() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/ if(deferredModules.length === 0) {
/******/ __webpack_require__.x();
/******/ __webpack_require__.x = x => {};
/******/ }
/******/ return result;
/******/ }
/******/ var startup = __webpack_require__.x;
/******/ __webpack_require__.x = () => {
/******/ // reset startup function so it can be called again when more startup code is added
/******/ __webpack_require__.x = startup || (x => {});
/******/ return (checkDeferredModules = checkDeferredModulesImpl)();
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/ // run startup
/******/ return __webpack_require__.x();
/******/ })()
;