{"version":3,"sources":["webpack:///C:/Dropbox/www/amcharts4dev/node_modules/regression/dist/regression.js","webpack:///../../../../../src/.internal/plugins/regression/Regression.ts","webpack:///./plugins/regression.js"],"names":["__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","global","factory","module","undefined","apply","exports","this","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","DEFAULT_OPTIONS","order","precision","period","determinationCoefficient","data","results","predictions","observations","forEach","d","push","mean","reduce","a","observation","ssyy","difference","accum","index","prediction","residual","round","number","factor","Math","pow","methods","linear","options","sum","len","n","run","rise","gradient","intercept","predict","x","points","map","point","equation","r2","string","exponential","log","denominator","exp","b","coeffA","coeffB","logarithmic","power","polynomial","lhs","rhs","k","l","c","j","_l","coefficients","input","matrix","maxrow","abs","tmp","_j","_k","_j2","total","_k2","gaussianElimination","v","coeff","_i","concat","arr","Array","isArray","arr2","from","_toConsumableArray","reverse","keys","accumulator","name","_round","obj","value","defineProperty","enumerable","configurable","writable","_defineProperty","supplied","Regression_Regression","_super","Regression","_this","events","EventDispatcher","_method","_options","_simplify","_reorder","_originalDataHash","_skipValidatedEvent","tslib_es6","init","processSeries","invalidateData","_disposers","on","ev","saveOriginalData","calcData","chart","adapter","add","_data","disableKey","_originalData","enableKey","series","seriesData","baseSprite","pivot","dataFields","valueX","valueY","valueField","positionField","newData","item","utils_Object","this_1","val","Type","reorder","sort","y","result","method","regression","hash","btoa","JSON","stringify","dispatchImmediately","type","this_2","simplify","out_i_1","Plugin","Registry","registeredClasses","window","am4plugins_regression","regression_namespaceObject"],"mappings":";;;;;;;;;;;;;;;;;;;0DAAA,IAAAA,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,GAEIH,GAAQI,QAAkBC,KAAAJ,EAAA,mBAATF,EAAA,GAASA,EAAAO,MAAAC,EAAAP,GAAAD,KAAAK,EAAAG,QAAAN,GAF9B,CAYCO,EAAA,SAA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hB,GACdvG,KAAKuH,UAAYhB,IACpBvG,KAAKuH,SAAWhB,EAChBvG,KAAK6H,mDAWRb,EAhVA,CAAgCwD,EAAA,GAwVhCC,EAAA,EAASC,kBAA8B,WAAI5D,EC/a3C6D,OAAAC,sBAA+BC","file":"./plugins/regression.js","sourcesContent":["(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['module'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(module);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod);\n global.regression = mod.exports;\n }\n})(this, function (module) {\n 'use strict';\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n var DEFAULT_OPTIONS = { order: 2, precision: 2, period: null };\n\n /**\n * Determine the coefficient of determination (r^2) of a fit from the observations\n * and predictions.\n *\n * @param {Array>} data - Pairs of observed x-y values\n * @param {Array>} results - Pairs of observed predicted x-y values\n *\n * @return {number} - The r^2 value, or NaN if one cannot be calculated.\n */\n function determinationCoefficient(data, results) {\n var predictions = [];\n var observations = [];\n\n data.forEach(function (d, i) {\n if (d[1] !== null) {\n observations.push(d);\n predictions.push(results[i]);\n }\n });\n\n var sum = observations.reduce(function (a, observation) {\n return a + observation[1];\n }, 0);\n var mean = sum / observations.length;\n\n var ssyy = observations.reduce(function (a, observation) {\n var difference = observation[1] - mean;\n return a + difference * difference;\n }, 0);\n\n var sse = observations.reduce(function (accum, observation, index) {\n var prediction = predictions[index];\n var residual = observation[1] - prediction[1];\n return accum + residual * residual;\n }, 0);\n\n return 1 - sse / ssyy;\n }\n\n /**\n * Determine the solution of a system of linear equations A * x = b using\n * Gaussian elimination.\n *\n * @param {Array>} input - A 2-d matrix of data in row-major form [ A | b ]\n * @param {number} order - How many degrees to solve for\n *\n * @return {Array} - Vector of normalized solution coefficients matrix (x)\n */\n function gaussianElimination(input, order) {\n var matrix = input;\n var n = input.length - 1;\n var coefficients = [order];\n\n for (var i = 0; i < n; i++) {\n var maxrow = i;\n for (var j = i + 1; j < n; j++) {\n if (Math.abs(matrix[i][j]) > Math.abs(matrix[i][maxrow])) {\n maxrow = j;\n }\n }\n\n for (var k = i; k < n + 1; k++) {\n var tmp = matrix[k][i];\n matrix[k][i] = matrix[k][maxrow];\n matrix[k][maxrow] = tmp;\n }\n\n for (var _j = i + 1; _j < n; _j++) {\n for (var _k = n; _k >= i; _k--) {\n matrix[_k][_j] -= matrix[_k][i] * matrix[i][_j] / matrix[i][i];\n }\n }\n }\n\n for (var _j2 = n - 1; _j2 >= 0; _j2--) {\n var total = 0;\n for (var _k2 = _j2 + 1; _k2 < n; _k2++) {\n total += matrix[_k2][_j2] * coefficients[_k2];\n }\n\n coefficients[_j2] = (matrix[n][_j2] - total) / matrix[_j2][_j2];\n }\n\n return coefficients;\n }\n\n /**\n * Round a number to a precision, specificed in number of decimal places\n *\n * @param {number} number - The number to round\n * @param {number} precision - The number of decimal places to round to:\n * > 0 means decimals, < 0 means powers of 10\n *\n *\n * @return {numbr} - The number, rounded\n */\n function round(number, precision) {\n var factor = Math.pow(10, precision);\n return Math.round(number * factor) / factor;\n }\n\n /**\n * The set of all fitting methods\n *\n * @namespace\n */\n var methods = {\n linear: function linear(data, options) {\n var sum = [0, 0, 0, 0, 0];\n var len = 0;\n\n for (var n = 0; n < data.length; n++) {\n if (data[n][1] !== null) {\n len++;\n sum[0] += data[n][0];\n sum[1] += data[n][1];\n sum[2] += data[n][0] * data[n][0];\n sum[3] += data[n][0] * data[n][1];\n sum[4] += data[n][1] * data[n][1];\n }\n }\n\n var run = len * sum[2] - sum[0] * sum[0];\n var rise = len * sum[3] - sum[0] * sum[1];\n var gradient = run === 0 ? 0 : round(rise / run, options.precision);\n var intercept = round(sum[1] / len - gradient * sum[0] / len, options.precision);\n\n var predict = function predict(x) {\n return [round(x, options.precision), round(gradient * x + intercept, options.precision)];\n };\n\n var points = data.map(function (point) {\n return predict(point[0]);\n });\n\n return {\n points: points,\n predict: predict,\n equation: [gradient, intercept],\n r2: round(determinationCoefficient(data, points), options.precision),\n string: intercept === 0 ? 'y = ' + gradient + 'x' : 'y = ' + gradient + 'x + ' + intercept\n };\n },\n exponential: function exponential(data, options) {\n var sum = [0, 0, 0, 0, 0, 0];\n\n for (var n = 0; n < data.length; n++) {\n if (data[n][1] !== null) {\n sum[0] += data[n][0];\n sum[1] += data[n][1];\n sum[2] += data[n][0] * data[n][0] * data[n][1];\n sum[3] += data[n][1] * Math.log(data[n][1]);\n sum[4] += data[n][0] * data[n][1] * Math.log(data[n][1]);\n sum[5] += data[n][0] * data[n][1];\n }\n }\n\n var denominator = sum[1] * sum[2] - sum[5] * sum[5];\n var a = Math.exp((sum[2] * sum[3] - sum[5] * sum[4]) / denominator);\n var b = (sum[1] * sum[4] - sum[5] * sum[3]) / denominator;\n var coeffA = round(a, options.precision);\n var coeffB = round(b, options.precision);\n var predict = function predict(x) {\n return [round(x, options.precision), round(coeffA * Math.exp(coeffB * x), options.precision)];\n };\n\n var points = data.map(function (point) {\n return predict(point[0]);\n });\n\n return {\n points: points,\n predict: predict,\n equation: [coeffA, coeffB],\n string: 'y = ' + coeffA + 'e^(' + coeffB + 'x)',\n r2: round(determinationCoefficient(data, points), options.precision)\n };\n },\n logarithmic: function logarithmic(data, options) {\n var sum = [0, 0, 0, 0];\n var len = data.length;\n\n for (var n = 0; n < len; n++) {\n if (data[n][1] !== null) {\n sum[0] += Math.log(data[n][0]);\n sum[1] += data[n][1] * Math.log(data[n][0]);\n sum[2] += data[n][1];\n sum[3] += Math.pow(Math.log(data[n][0]), 2);\n }\n }\n\n var a = (len * sum[1] - sum[2] * sum[0]) / (len * sum[3] - sum[0] * sum[0]);\n var coeffB = round(a, options.precision);\n var coeffA = round((sum[2] - coeffB * sum[0]) / len, options.precision);\n\n var predict = function predict(x) {\n return [round(x, options.precision), round(round(coeffA + coeffB * Math.log(x), options.precision), options.precision)];\n };\n\n var points = data.map(function (point) {\n return predict(point[0]);\n });\n\n return {\n points: points,\n predict: predict,\n equation: [coeffA, coeffB],\n string: 'y = ' + coeffA + ' + ' + coeffB + ' ln(x)',\n r2: round(determinationCoefficient(data, points), options.precision)\n };\n },\n power: function power(data, options) {\n var sum = [0, 0, 0, 0, 0];\n var len = data.length;\n\n for (var n = 0; n < len; n++) {\n if (data[n][1] !== null) {\n sum[0] += Math.log(data[n][0]);\n sum[1] += Math.log(data[n][1]) * Math.log(data[n][0]);\n sum[2] += Math.log(data[n][1]);\n sum[3] += Math.pow(Math.log(data[n][0]), 2);\n }\n }\n\n var b = (len * sum[1] - sum[0] * sum[2]) / (len * sum[3] - Math.pow(sum[0], 2));\n var a = (sum[2] - b * sum[0]) / len;\n var coeffA = round(Math.exp(a), options.precision);\n var coeffB = round(b, options.precision);\n\n var predict = function predict(x) {\n return [round(x, options.precision), round(round(coeffA * Math.pow(x, coeffB), options.precision), options.precision)];\n };\n\n var points = data.map(function (point) {\n return predict(point[0]);\n });\n\n return {\n points: points,\n predict: predict,\n equation: [coeffA, coeffB],\n string: 'y = ' + coeffA + 'x^' + coeffB,\n r2: round(determinationCoefficient(data, points), options.precision)\n };\n },\n polynomial: function polynomial(data, options) {\n var lhs = [];\n var rhs = [];\n var a = 0;\n var b = 0;\n var len = data.length;\n var k = options.order + 1;\n\n for (var i = 0; i < k; i++) {\n for (var l = 0; l < len; l++) {\n if (data[l][1] !== null) {\n a += Math.pow(data[l][0], i) * data[l][1];\n }\n }\n\n lhs.push(a);\n a = 0;\n\n var c = [];\n for (var j = 0; j < k; j++) {\n for (var _l = 0; _l < len; _l++) {\n if (data[_l][1] !== null) {\n b += Math.pow(data[_l][0], i + j);\n }\n }\n c.push(b);\n b = 0;\n }\n rhs.push(c);\n }\n rhs.push(lhs);\n\n var coefficients = gaussianElimination(rhs, k).map(function (v) {\n return round(v, options.precision);\n });\n\n var predict = function predict(x) {\n return [round(x, options.precision), round(coefficients.reduce(function (sum, coeff, power) {\n return sum + coeff * Math.pow(x, power);\n }, 0), options.precision)];\n };\n\n var points = data.map(function (point) {\n return predict(point[0]);\n });\n\n var string = 'y = ';\n for (var _i = coefficients.length - 1; _i >= 0; _i--) {\n if (_i > 1) {\n string += coefficients[_i] + 'x^' + _i + ' + ';\n } else if (_i === 1) {\n string += coefficients[_i] + 'x + ';\n } else {\n string += coefficients[_i];\n }\n }\n\n return {\n string: string,\n points: points,\n predict: predict,\n equation: [].concat(_toConsumableArray(coefficients)).reverse(),\n r2: round(determinationCoefficient(data, points), options.precision)\n };\n }\n };\n\n function createWrapper() {\n var reduce = function reduce(accumulator, name) {\n return _extends({\n _round: round\n }, accumulator, _defineProperty({}, name, function (data, supplied) {\n return methods[name](data, _extends({}, DEFAULT_OPTIONS, supplied));\n }));\n };\n\n return Object.keys(methods).reduce(reduce, {});\n }\n\n module.exports = createWrapper();\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// C:/Dropbox/www/amcharts4dev/node_modules/regression/dist/regression.js\n// module id = 1NAr\n// module chunks = 6b72","/**\r\n * Regression plugin.\r\n *\r\n * Uses regression-js library by Tom Alexander\r\n * http://tom-alexander.github.io/regression-js/\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport * as regression from \"regression\";\r\nimport { Plugin } from \"../../core/utils/Plugin\";\r\nimport { XYSeries } from \"../../charts/series/XYSeries\";\r\nimport { Optional } from \"../../core/utils/Type\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { EventDispatcher, AMEvent } from \"../../core/utils/EventDispatcher\";\r\nimport * as $object from \"../../core/utils/Object\";\r\nimport * as $type from \"../../core/utils/Type\";\r\n\r\n/**\r\n * Defines events for [[BaseObjectEvents]].\r\n */\r\nexport interface IRegressionEvents {\r\n\t/**\r\n\t * Invoked when regression finishes calculating data.\r\n\t */\r\n\tprocessed: {};\r\n};\r\n\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * A module which automatically calculates data for for trend lines using\r\n * various regression algorithms.\r\n *\r\n * By pushing an instance of [[Regression]] into `plugin` list of\r\n * any [[XYSeries]], it automatically recalculates and overrides its\r\n * data to show regression trend line, inestead of the source values.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * let regseries = chart.series.push(new am4charts.LineSeries());\r\n * regseries.dataFields.valueY = \"value\";\r\n * regseries.dataFields.dateX = \"date\";\r\n *\r\n * let reg = regseries.plugins.push(new am4plugins_regression.Regression());\r\n * reg.method = \"polynomial\";\r\n * ```\r\n * ```JavaScript\r\n * var regseries = chart.series.push(new am4charts.LineSeries());\r\n * regseries.dataFields.valueY = \"value\";\r\n * regseries.dataFields.dateX = \"date\";\r\n *\r\n * var reg = regseries.plugins.push(new am4plugins_regression.Regression());\r\n * reg.method = \"polynomial\";\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * }, {\r\n * \"type\": \"LineSeries\",\r\n * \"dataFields\": {\r\n * \"valueY\": \"value\",\r\n * \"dateX\": \"date\"\r\n * },\r\n * \"plugins\": [{\r\n * \"type\": \"Regression\",\r\n * \"method\": \"polynomial\"\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.2.2\r\n */\r\nexport class Regression extends Plugin {\r\n\r\n\t/**\r\n\t * A series object that will be used for the trend line.\r\n\t */\r\n\tpublic target: Optional;\r\n\r\n\t/**\r\n\t * An [[EventDispatcher]] instance.\r\n\t *\r\n\t * @since 4.3.14\r\n\t */\r\n\tpublic events: EventDispatcher> = new EventDispatcher();\r\n\r\n\t/**\r\n\t * Method\r\n\t */\r\n\tprotected _method: \"linear\" | \"polynomial\" = \"linear\";\r\n\r\n\t/**\r\n\t * Options\r\n\t */\r\n\tprotected _options: { [index: string]: any } = {};\r\n\r\n\t/**\r\n\t * Simplify output data.\r\n\t */\r\n\tprotected _simplify: boolean = false;\r\n\r\n\t/**\r\n\t * Reorder data after calculation\r\n\t */\r\n\tprotected _reorder: boolean = false;\r\n\r\n\t/**\r\n\t * Calculated data.\r\n\t */\r\n\tprotected _data: Optional;\r\n\r\n\t/**\r\n\t * An object containing results of the calculation.\r\n\t *\r\n\t * @since 4.3.14\r\n\t */\r\n\tpublic result: Optional;\r\n\r\n\t/**\r\n\t * Original series data.\r\n\t */\r\n\tprotected _originalData: Optional;\r\n\r\n\t/**\r\n\t * Hash of the data original data. Used to check whether we need to\r\n\t * recalculate, or the data did not change.\r\n\t */\r\n\tprotected _originalDataHash: string = \"\";\r\n\r\n\t/**\r\n\t * Should skip next \"beforedatavalidated\" event?\r\n\t */\r\n\tprotected _skipValidatedEvent: boolean = false;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\t// Nothing to do here\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic init() {\r\n\t\tsuper.init();\r\n\t\tthis.processSeries();\r\n\t}\r\n\r\n\t/**\r\n\t * Decorates series with required events and adapters used to hijack its\r\n\t * data.\r\n\t */\r\n\tprivate processSeries(): void {\r\n\r\n\t\tthis.invalidateData();\r\n\r\n\t\t// Invalidate calculated data whenever data updates\r\n\t\tthis._disposers.push(this.target.events.on(\"beforedatavalidated\", (ev) => {\r\n\t\t\tif (this._skipValidatedEvent) {\r\n\t\t\t\tthis._skipValidatedEvent = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Update data\r\n\t\t\tthis.saveOriginalData();\r\n\t\t\tthis.calcData();\r\n\t\t}));\r\n\r\n\t\tif (this.target.chart) {\r\n\t\t\tthis._disposers.push(this.target.chart.events.on(\"beforedatavalidated\", (ev) => {\r\n\t\t\t\tthis.target.invalidateData();\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\t// Add data adapter\r\n\t\tthis.target.adapter.add(\"data\", () => {\r\n\t\t\tif (this._data === undefined) {\r\n\t\t\t\tthis.calcData();\r\n\t\t\t}\r\n\t\t\treturn this._data;\r\n\t\t});\r\n\r\n\t\t// Save original series data\r\n\t\tthis.saveOriginalData();\r\n\t}\r\n\r\n\t/**\r\n\t * Saves series' original data and (re)adds data adapter.\r\n\t */\r\n\tprivate saveOriginalData(): void {\r\n\r\n\t\t// Temporarily disable the data adapter\r\n\t\tthis.target.adapter.disableKey(\"data\");\r\n\r\n\t\t// Save\r\n\t\tif (this.target.data && this.target.data.length) {\r\n\t\t\tthis._originalData = this.target.data;\r\n\t\t}\r\n\r\n\t\t// Re-enabled the adapter\r\n\t\tthis.target.adapter.enableKey(\"data\");\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Invalidates data.\r\n\t */\r\n\tprivate invalidateData(): void {\r\n\t\tthis._data = undefined;\r\n\t}\r\n\r\n\t/**\r\n\t * Calculates regression series data.\r\n\t */\r\n\tprivate calcData(): void {\r\n\t\tthis._data = [];\r\n\t\tconst series = this.target;\r\n\r\n\t\t// Get series' data (global or series own)\r\n\t\tlet seriesData: any = this._originalData;\r\n\t\tif (!seriesData || seriesData.length == 0) {\r\n\t\t\tseriesData = (this.target.baseSprite).data;\r\n\t\t}\r\n\r\n\t\t// Determine if this line is pivoted (horizontal value axis)\r\n\t\t// If both axes are value, we consider the line to be horizontal.\r\n\t\tconst pivot = series.dataFields.valueX && !series.dataFields.valueY ? true : false;\r\n\t\tconst valueField = pivot ? series.dataFields.valueX : series.dataFields.valueY;\r\n\t\tconst positionField = pivot ? series.dataFields.valueY : series.dataFields.valueX;\r\n\r\n\t\t// Assemble series' own data\r\n\t\tlet newData: any[] = [];\r\n\r\n\t\tfor (let i = 0; i < seriesData.length; i++) {\r\n\t\t\tconst item: any = {};\r\n\t\t\t$object.each(this.target.dataFields, (key, val) => {\r\n\t\t\t\titem[val] = seriesData[i][val];\r\n\t\t\t});\r\n\t\t\tif ($type.hasValue(item[valueField])) {\r\n\t\t\t\tnewData.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Order data points\r\n\t\tif (this.reorder) {\r\n\t\t\tnewData.sort(function(a: any, b: any) {\r\n\t\t\t\tif (a[positionField] > b[positionField]) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\telse if (a[positionField] < b[positionField]) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// Build matrix for the regression function\r\n\t\tlet matrix: any = [];\r\n\t\t//const pivot = series.dataFields.valueX && !series.dataFields.valueY ? true : false;\r\n\t\tfor (let i = 0; i < newData.length; i++) {\r\n\t\t\tlet x = series.dataFields.valueX && pivot ? newData[i][series.dataFields.valueX] : i;\r\n\t\t\tlet y = series.dataFields.valueY && !pivot ? newData[i][series.dataFields.valueY] : i;\r\n\t\t\t\tmatrix.push(pivot ? [y, x] : [x, y]);\r\n\t\t}\r\n\r\n\t\t// Calculate regression values\r\n\t\tlet result: any = [];\r\n\t\tswitch (this.method) {\r\n\t\t\tcase \"polynomial\":\r\n\t\t\t\tresult = regression.polynomial(matrix, this.options);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tresult = regression.linear(matrix, this.options);\r\n\t\t}\r\n\r\n\t\t// Set results\r\n\t\tthis.result = result;\r\n\r\n\t\t// Invoke event\r\n\t\tconst hash = btoa(JSON.stringify(newData));\r\n\t\tif (hash != this._originalDataHash) {\r\n\t\t\tthis.events.dispatchImmediately(\"processed\", {\r\n\t\t\t\ttype: \"processed\",\r\n\t\t\t\ttarget: this\r\n\t\t\t});\r\n\t\t}\r\n\t\tthis._originalDataHash = hash;\r\n\r\n\r\n\t\t// Build data\r\n\t\tthis._data = [];\r\n\t\tfor (let i = 0; i < result.points.length; i++) {\r\n\t\t\tif (this.simplify && i) {\r\n\t\t\t\ti = result.points.length - 1;\r\n\t\t\t}\r\n\t\t\tlet item: any = {};\r\n\t\t\t$object.each(this.target.dataFields, (key, val) => {\r\n\t\t\t\tif ((key == \"valueY\" && !pivot) || (key == \"valueX\" && pivot)) {\r\n\t\t\t\t\titem[val] = result.points[i][1];\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\titem[val] = newData[i][val];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis._data.push(item);\r\n\t\t}\r\n\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Method to calculate regression.\r\n\t *\r\n\t * Supported values: \"linear\" (default), \"polynomial\".\r\n\t *\r\n\t * @default linear\r\n\t * @param value Method\r\n\t */\r\n\tpublic set method(value: \"linear\" | \"polynomial\") {\r\n\t\tif (this._method != value) {\r\n\t\t\tthis._method = value;\r\n\t\t\tthis.invalidateData();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Method\r\n\t */\r\n\tpublic get method(): \"linear\" | \"polynomial\" {\r\n\t\treturn this._method;\r\n\t}\r\n\r\n\t/**\r\n\t * Regression output options.\r\n\t *\r\n\t * Below are default values.\r\n\t *\r\n\t * ```JSON\r\n\t * {\r\n\t * order: 2,\r\n\t * precision: 2,\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @see {@link https://github.com/Tom-Alexander/regression-js#configuration-options} About options\r\n\t * @param value Options\r\n\t */\r\n\tpublic set options(value: { [index: string]: any }) {\r\n\t\tif (this._options != value) {\r\n\t\t\tthis._options = value;\r\n\t\t\tthis.invalidateData();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Options\r\n\t */\r\n\tpublic get options(): { [index: string]: any } {\r\n\t\treturn this._options;\r\n\t}\r\n\r\n\t/**\r\n\t * Simplify regression line data? If set to `true` it will use only two\r\n\t * result data points: first and last.\r\n\t *\r\n\t * NOTE: this does make sense with \"linear\" method only.\r\n\t *\r\n\t * @default false\r\n\t * @since 4.2.3\r\n\t * @param value Simplify?\r\n\t */\r\n\tpublic set simplify(value: boolean) {\r\n\t\tif (this._simplify != value) {\r\n\t\t\tthis._simplify = value;\r\n\t\t\tthis.invalidateData();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Simplify?\r\n\t */\r\n\tpublic get simplify(): boolean {\r\n\t\treturn this._simplify;\r\n\t}\r\n\r\n\t/**\r\n\t * Orders data points after calculation. This can make sense in scatter plot\r\n\t * scenarios where data points can come in non-linear fashion.\r\n\t *\r\n\t * @default false\r\n\t * @since 4.2.3\r\n\t * @param value Reorder data?\r\n\t */\r\n\tpublic set reorder(value: boolean) {\r\n\t\tif (this._reorder != value) {\r\n\t\t\tthis._reorder = value;\r\n\t\t\tthis.invalidateData();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Reorder data?\r\n\t */\r\n\tpublic get reorder(): boolean {\r\n\t\treturn this._reorder;\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Regression\"] = Regression;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/regression/Regression.ts","import * as m from \"../../es2015/plugins/regression\";\nwindow.am4plugins_regression = m;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./plugins/regression.js\n// module id = null\n// module chunks = "],"sourceRoot":""}