/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "../src/assets/js/pages/components/charts/amcharts/stock-charts.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "../src/assets/js/pages/components/charts/amcharts/stock-charts.js":
/*!*************************************************************************!*\
  !*** ../src/assets/js/pages/components/charts/amcharts/stock-charts.js ***!
  \*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\r\n\r\n// Class definition\r\nvar KTamChartsStockChartsDemo = function() {\r\n\r\n    // Private functions\r\n    var demo1 = function() {\r\n        var chartData1 = [];\r\n        var chartData2 = [];\r\n        var chartData3 = [];\r\n        var chartData4 = [];\r\n\r\n        generateChartData();\r\n\r\n        function generateChartData() {\r\n            var firstDate = new Date();\r\n            firstDate.setDate(firstDate.getDate() - 500);\r\n            firstDate.setHours(0, 0, 0, 0);\r\n\r\n            for (var i = 0; i < 500; i++) {\r\n                var newDate = new Date(firstDate);\r\n                newDate.setDate(newDate.getDate() + i);\r\n\r\n                var a1 = Math.round(Math.random() * (40 + i)) + 100 + i;\r\n                var b1 = Math.round(Math.random() * (1000 + i)) + 500 + i * 2;\r\n\r\n                var a2 = Math.round(Math.random() * (100 + i)) + 200 + i;\r\n                var b2 = Math.round(Math.random() * (1000 + i)) + 600 + i * 2;\r\n\r\n                var a3 = Math.round(Math.random() * (100 + i)) + 200;\r\n                var b3 = Math.round(Math.random() * (1000 + i)) + 600 + i * 2;\r\n\r\n                var a4 = Math.round(Math.random() * (100 + i)) + 200 + i;\r\n                var b4 = Math.round(Math.random() * (100 + i)) + 600 + i;\r\n\r\n                chartData1.push({\r\n                    \"date\": newDate,\r\n                    \"value\": a1,\r\n                    \"volume\": b1\r\n                });\r\n                chartData2.push({\r\n                    \"date\": newDate,\r\n                    \"value\": a2,\r\n                    \"volume\": b2\r\n                });\r\n                chartData3.push({\r\n                    \"date\": newDate,\r\n                    \"value\": a3,\r\n                    \"volume\": b3\r\n                });\r\n                chartData4.push({\r\n                    \"date\": newDate,\r\n                    \"value\": a4,\r\n                    \"volume\": b4\r\n                });\r\n            }\r\n        }\r\n\r\n        var chart = AmCharts.makeChart(\"kt_amcharts_1\", {\r\n            \"rtl\": KTUtil.isRTL(),\r\n            \"type\": \"stock\",\r\n            \"theme\": \"light\",\r\n            \"dataSets\": [{\r\n                \"title\": \"first data set\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }],\r\n                \"dataProvider\": chartData1,\r\n                \"categoryField\": \"date\"\r\n            }, {\r\n                \"title\": \"second data set\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }],\r\n                \"dataProvider\": chartData2,\r\n                \"categoryField\": \"date\"\r\n            }, {\r\n                \"title\": \"third data set\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }],\r\n                \"dataProvider\": chartData3,\r\n                \"categoryField\": \"date\"\r\n            }, {\r\n                \"title\": \"fourth data set\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }],\r\n                \"dataProvider\": chartData4,\r\n                \"categoryField\": \"date\"\r\n            }],\r\n\r\n            \"panels\": [{\r\n                \"showCategoryAxis\": false,\r\n                \"title\": \"Value\",\r\n                \"percentHeight\": 70,\r\n                \"stockGraphs\": [{\r\n                    \"id\": \"g1\",\r\n                    \"valueField\": \"value\",\r\n                    \"comparable\": true,\r\n                    \"compareField\": \"value\",\r\n                    \"balloonText\": \"[[title]]:<b>[[value]]</b>\",\r\n                    \"compareGraphBalloonText\": \"[[title]]:<b>[[value]]</b>\"\r\n                }],\r\n                \"stockLegend\": {\r\n                    \"periodValueTextComparing\": \"[[percents.value.close]]%\",\r\n                    \"periodValueTextRegular\": \"[[value.close]]\"\r\n                }\r\n            }, {\r\n                \"title\": \"Volume\",\r\n                \"percentHeight\": 30,\r\n                \"stockGraphs\": [{\r\n                    \"valueField\": \"volume\",\r\n                    \"type\": \"column\",\r\n                    \"showBalloon\": false,\r\n                    \"fillAlphas\": 1\r\n                }],\r\n                \"stockLegend\": {\r\n                    \"periodValueTextRegular\": \"[[value.close]]\"\r\n                }\r\n            }],\r\n\r\n            \"chartScrollbarSettings\": {\r\n                \"graph\": \"g1\"\r\n            },\r\n\r\n            \"chartCursorSettings\": {\r\n                \"valueBalloonsEnabled\": true,\r\n                \"fullWidth\": true,\r\n                \"cursorAlpha\": 0.1,\r\n                \"valueLineBalloonEnabled\": true,\r\n                \"valueLineEnabled\": true,\r\n                \"valueLineAlpha\": 0.5\r\n            },\r\n\r\n            \"periodSelector\": {\r\n                \"position\": \"left\",\r\n                \"periods\": [{\r\n                    \"period\": \"MM\",\r\n                    \"selected\": true,\r\n                    \"count\": 1,\r\n                    \"label\": \"1 month\"\r\n                }, {\r\n                    \"period\": \"YYYY\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 year\"\r\n                }, {\r\n                    \"period\": \"YTD\",\r\n                    \"label\": \"YTD\"\r\n                }, {\r\n                    \"period\": \"MAX\",\r\n                    \"label\": \"MAX\"\r\n                }]\r\n            },\r\n\r\n            \"dataSetSelector\": {\r\n                \"position\": \"left\"\r\n            },\r\n\r\n            \"export\": {\r\n                \"enabled\": true\r\n            }\r\n        });\r\n    }\r\n\r\n    var demo2 = function() {\r\n        var chartData = [];\r\n        generateChartData();\r\n\r\n        function generateChartData() {\r\n            var firstDate = new Date(2012, 0, 1);\r\n            firstDate.setDate(firstDate.getDate() - 500);\r\n            firstDate.setHours(0, 0, 0, 0);\r\n\r\n            for (var i = 0; i < 500; i++) {\r\n                var newDate = new Date(firstDate);\r\n                newDate.setDate(newDate.getDate() + i);\r\n\r\n                var a = Math.round(Math.random() * (40 + i)) + 100 + i;\r\n                var b = Math.round(Math.random() * 100000000);\r\n\r\n                chartData.push({\r\n                    \"date\": newDate,\r\n                    \"value\": a,\r\n                    \"volume\": b\r\n                });\r\n            }\r\n        }\r\n\r\n        var chart = AmCharts.makeChart(\"kt_amcharts_2\", {\r\n            \"type\": \"stock\",\r\n            \"theme\": \"light\",\r\n            \"dataSets\": [{\r\n                \"color\": \"#b0de09\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }],\r\n                \"dataProvider\": chartData,\r\n                \"categoryField\": \"date\",\r\n                // EVENTS\r\n                \"stockEvents\": [{\r\n                    \"date\": new Date(2010, 8, 19),\r\n                    \"type\": \"sign\",\r\n                    \"backgroundColor\": \"#85CDE6\",\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"S\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2010, 10, 19),\r\n                    \"type\": \"flag\",\r\n                    \"backgroundColor\": \"#FFFFFF\",\r\n                    \"backgroundAlpha\": 0.5,\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"F\",\r\n                    \"description\": \"Some longer\\ntext can also\\n be added\"\r\n                }, {\r\n                    \"date\": new Date(2010, 11, 10),\r\n                    \"showOnAxis\": true,\r\n                    \"backgroundColor\": \"#85CDE6\",\r\n                    \"type\": \"pin\",\r\n                    \"text\": \"X\",\r\n                    \"graph\": \"g1\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2010, 11, 26),\r\n                    \"showOnAxis\": true,\r\n                    \"backgroundColor\": \"#85CDE6\",\r\n                    \"type\": \"pin\",\r\n                    \"text\": \"Z\",\r\n                    \"graph\": \"g1\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 0, 3),\r\n                    \"type\": \"sign\",\r\n                    \"backgroundColor\": \"#85CDE6\",\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"U\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 1, 6),\r\n                    \"type\": \"sign\",\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"D\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 3, 5),\r\n                    \"type\": \"sign\",\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"L\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 3, 5),\r\n                    \"type\": \"sign\",\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"R\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 5, 15),\r\n                    \"type\": \"arrowUp\",\r\n                    \"backgroundColor\": \"#00CC00\",\r\n                    \"graph\": \"g1\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 6, 25),\r\n                    \"type\": \"arrowDown\",\r\n                    \"backgroundColor\": \"#CC0000\",\r\n                    \"graph\": \"g1\",\r\n                    \"description\": \"This is description of an event\"\r\n                }, {\r\n                    \"date\": new Date(2011, 8, 1),\r\n                    \"type\": \"text\",\r\n                    \"graph\": \"g1\",\r\n                    \"text\": \"Longer text can\\nalso be displayed\",\r\n                    \"description\": \"This is description of an event\"\r\n                }]\r\n            }],\r\n\r\n\r\n            \"panels\": [{\r\n                \"title\": \"Value\",\r\n                \"stockGraphs\": [{\r\n                    \"id\": \"g1\",\r\n                    \"valueField\": \"value\"\r\n                }],\r\n                \"stockLegend\": {\r\n                    \"valueTextRegular\": \" \",\r\n                    \"markerType\": \"none\"\r\n                }\r\n            }],\r\n\r\n            \"chartScrollbarSettings\": {\r\n                \"graph\": \"g1\"\r\n            },\r\n\r\n            \"chartCursorSettings\": {\r\n                \"valueBalloonsEnabled\": true,\r\n                \"graphBulletSize\": 1,\r\n                \"valueLineBalloonEnabled\": true,\r\n                \"valueLineEnabled\": true,\r\n                \"valueLineAlpha\": 0.5\r\n            },\r\n\r\n            \"periodSelector\": {\r\n                \"periods\": [{\r\n                    \"period\": \"DD\",\r\n                    \"count\": 10,\r\n                    \"label\": \"10 days\"\r\n                }, {\r\n                    \"period\": \"MM\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 month\"\r\n                }, {\r\n                    \"period\": \"YYYY\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 year\"\r\n                }, {\r\n                    \"period\": \"YTD\",\r\n                    \"label\": \"YTD\"\r\n                }, {\r\n                    \"period\": \"MAX\",\r\n                    \"label\": \"MAX\"\r\n                }]\r\n            },\r\n\r\n            \"panelsSettings\": {\r\n                \"usePrefixes\": true\r\n            },\r\n            \"export\": {\r\n                \"enabled\": true\r\n            }\r\n        });\r\n    }\r\n\r\n    var demo3 = function() {\r\n        var chartData = generateChartData();\r\n\r\n        function generateChartData() {\r\n            var chartData = [];\r\n            var firstDate = new Date(2012, 0, 1);\r\n            firstDate.setDate(firstDate.getDate() - 500);\r\n            firstDate.setHours(0, 0, 0, 0);\r\n\r\n            for (var i = 0; i < 500; i++) {\r\n                var newDate = new Date(firstDate);\r\n                newDate.setDate(newDate.getDate() + i);\r\n\r\n                var value = Math.round(Math.random() * (40 + i)) + 100 + i;\r\n\r\n                chartData.push({\r\n                    \"date\": newDate,\r\n                    \"value\": value\r\n                });\r\n            }\r\n            return chartData;\r\n        }\r\n\r\n\r\n        var chart = AmCharts.makeChart(\"kt_amcharts_3\", {\r\n            \"type\": \"stock\",\r\n            \"theme\": \"light\",\r\n            \"dataSets\": [{\r\n                \"color\": \"#b0de09\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }],\r\n                \"dataProvider\": chartData,\r\n                \"categoryField\": \"date\"\r\n            }],\r\n\r\n            \"panels\": [{\r\n                \"showCategoryAxis\": true,\r\n                \"title\": \"Value\",\r\n                \"eraseAll\": false,\r\n                \"allLabels\": [{\r\n                    \"x\": 0,\r\n                    \"y\": 115,\r\n                    \"text\": \"Click on the pencil icon on top-right to start drawing\",\r\n                    \"align\": \"center\",\r\n                    \"size\": 16\r\n                }],\r\n\r\n                \"stockGraphs\": [{\r\n                    \"id\": \"g1\",\r\n                    \"valueField\": \"value\",\r\n                    \"useDataSetColors\": false\r\n                }],\r\n\r\n                \"stockLegend\": {\r\n                    \"valueTextRegular\": \" \",\r\n                    \"markerType\": \"none\"\r\n                },\r\n\r\n                \"drawingIconsEnabled\": true\r\n            }],\r\n\r\n            \"chartScrollbarSettings\": {\r\n                \"graph\": \"g1\"\r\n            },\r\n            \"chartCursorSettings\": {\r\n                \"valueBalloonsEnabled\": true\r\n            },\r\n            \"periodSelector\": {\r\n                \"position\": \"bottom\",\r\n                \"periods\": [{\r\n                    \"period\": \"DD\",\r\n                    \"count\": 10,\r\n                    \"label\": \"10 days\"\r\n                }, {\r\n                    \"period\": \"MM\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 month\"\r\n                }, {\r\n                    \"period\": \"YYYY\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 year\"\r\n                }, {\r\n                    \"period\": \"YTD\",\r\n                    \"label\": \"YTD\"\r\n                }, {\r\n                    \"period\": \"MAX\",\r\n                    \"label\": \"MAX\"\r\n                }]\r\n            }\r\n        });\r\n    }\r\n\r\n    var demo4 = function() {\r\n        var chartData = generateChartData();\r\n\r\n        function generateChartData() {\r\n            var chartData = [];\r\n            var firstDate = new Date(2012, 0, 1);\r\n            firstDate.setDate(firstDate.getDate() - 1000);\r\n            firstDate.setHours(0, 0, 0, 0);\r\n\r\n            for (var i = 0; i < 1000; i++) {\r\n                var newDate = new Date(firstDate);\r\n                newDate.setHours(0, i, 0, 0);\r\n\r\n                var a = Math.round(Math.random() * (40 + i)) + 100 + i;\r\n                var b = Math.round(Math.random() * 100000000);\r\n\r\n                chartData.push({\r\n                    \"date\": newDate,\r\n                    \"value\": a,\r\n                    \"volume\": b\r\n                });\r\n            }\r\n            return chartData;\r\n        }\r\n\r\n        var chart = AmCharts.makeChart(\"kt_amcharts_4\", {\r\n            \"type\": \"stock\",\r\n            \"theme\": \"light\",\r\n            \"categoryAxesSettings\": {\r\n                \"minPeriod\": \"mm\"\r\n            },\r\n\r\n            \"dataSets\": [{\r\n                \"color\": \"#b0de09\",\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }],\r\n\r\n                \"dataProvider\": chartData,\r\n                \"categoryField\": \"date\"\r\n            }],\r\n\r\n            \"panels\": [{\r\n                \"showCategoryAxis\": false,\r\n                \"title\": \"Value\",\r\n                \"percentHeight\": 70,\r\n\r\n                \"stockGraphs\": [{\r\n                    \"id\": \"g1\",\r\n                    \"valueField\": \"value\",\r\n                    \"type\": \"smoothedLine\",\r\n                    \"lineThickness\": 2,\r\n                    \"bullet\": \"round\"\r\n                }],\r\n\r\n\r\n                \"stockLegend\": {\r\n                    \"valueTextRegular\": \" \",\r\n                    \"markerType\": \"none\"\r\n                }\r\n            }, {\r\n                \"title\": \"Volume\",\r\n                \"percentHeight\": 30,\r\n                \"stockGraphs\": [{\r\n                    \"valueField\": \"volume\",\r\n                    \"type\": \"column\",\r\n                    \"cornerRadiusTop\": 2,\r\n                    \"fillAlphas\": 1\r\n                }],\r\n\r\n                \"stockLegend\": {\r\n                    \"valueTextRegular\": \" \",\r\n                    \"markerType\": \"none\"\r\n                }\r\n            }],\r\n\r\n            \"chartScrollbarSettings\": {\r\n                \"graph\": \"g1\",\r\n                \"usePeriod\": \"10mm\",\r\n                \"position\": \"top\"\r\n            },\r\n\r\n            \"chartCursorSettings\": {\r\n                \"valueBalloonsEnabled\": true\r\n            },\r\n\r\n            \"periodSelector\": {\r\n                \"position\": \"top\",\r\n                \"dateFormat\": \"YYYY-MM-DD JJ:NN\",\r\n                \"inputFieldWidth\": 150,\r\n                \"periods\": [{\r\n                    \"period\": \"hh\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 hour\",\r\n                    \"selected\": true\r\n                }, {\r\n                    \"period\": \"hh\",\r\n                    \"count\": 2,\r\n                    \"label\": \"2 hours\"\r\n                }, {\r\n                    \"period\": \"hh\",\r\n                    \"count\": 5,\r\n                    \"label\": \"5 hour\"\r\n                }, {\r\n                    \"period\": \"hh\",\r\n                    \"count\": 12,\r\n                    \"label\": \"12 hours\"\r\n                }, {\r\n                    \"period\": \"MAX\",\r\n                    \"label\": \"MAX\"\r\n                }]\r\n            },\r\n\r\n            \"panelsSettings\": {\r\n                \"usePrefixes\": true\r\n            },\r\n\r\n            \"export\": {\r\n                \"enabled\": true,\r\n                \"position\": \"bottom-right\"\r\n            }\r\n        });\r\n    }\r\n\r\n    var demo5 = function() {\r\n        var chartData = [];\r\n        generateChartData();\r\n\r\n\r\n        function generateChartData() {\r\n            var firstDate = new Date();\r\n            firstDate.setHours(0, 0, 0, 0);\r\n            firstDate.setDate(firstDate.getDate() - 2000);\r\n\r\n            for (var i = 0; i < 2000; i++) {\r\n                var newDate = new Date(firstDate);\r\n\r\n                newDate.setDate(newDate.getDate() + i);\r\n\r\n                var open = Math.round(Math.random() * (30) + 100);\r\n                var close = open + Math.round(Math.random() * (15) - Math.random() * 10);\r\n\r\n                var low;\r\n                if (open < close) {\r\n                    low = open - Math.round(Math.random() * 5);\r\n                } else {\r\n                    low = close - Math.round(Math.random() * 5);\r\n                }\r\n\r\n                var high;\r\n                if (open < close) {\r\n                    high = close + Math.round(Math.random() * 5);\r\n                } else {\r\n                    high = open + Math.round(Math.random() * 5);\r\n                }\r\n\r\n                var volume = Math.round(Math.random() * (1000 + i)) + 100 + i;\r\n                var value = Math.round(Math.random() * (30) + 100);\r\n\r\n                chartData[i] = ({\r\n                    \"date\": newDate,\r\n                    \"open\": open,\r\n                    \"close\": close,\r\n                    \"high\": high,\r\n                    \"low\": low,\r\n                    \"volume\": volume,\r\n                    \"value\": value\r\n                });\r\n            }\r\n        }\r\n\r\n        var chart = AmCharts.makeChart(\"kt_amcharts_5\", {\r\n            \"type\": \"stock\",\r\n            \"theme\": \"light\",\r\n            \"dataSets\": [{\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"open\",\r\n                    \"toField\": \"open\"\r\n                }, {\r\n                    \"fromField\": \"close\",\r\n                    \"toField\": \"close\"\r\n                }, {\r\n                    \"fromField\": \"high\",\r\n                    \"toField\": \"high\"\r\n                }, {\r\n                    \"fromField\": \"low\",\r\n                    \"toField\": \"low\"\r\n                }, {\r\n                    \"fromField\": \"volume\",\r\n                    \"toField\": \"volume\"\r\n                }, {\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }],\r\n                \"color\": \"#7f8da9\",\r\n                \"dataProvider\": chartData,\r\n                \"title\": \"West Stock\",\r\n                \"categoryField\": \"date\"\r\n            }, {\r\n                \"fieldMappings\": [{\r\n                    \"fromField\": \"value\",\r\n                    \"toField\": \"value\"\r\n                }],\r\n                \"color\": \"#fac314\",\r\n                \"dataProvider\": chartData,\r\n                \"compared\": true,\r\n                \"title\": \"East Stock\",\r\n                \"categoryField\": \"date\"\r\n            }],\r\n\r\n\r\n            \"panels\": [{\r\n                    \"title\": \"Value\",\r\n                    \"showCategoryAxis\": false,\r\n                    \"percentHeight\": 70,\r\n                    \"valueAxes\": [{\r\n                        \"id\": \"v1\",\r\n                        \"dashLength\": 5\r\n                    }],\r\n\r\n                    \"categoryAxis\": {\r\n                        \"dashLength\": 5\r\n                    },\r\n\r\n                    \"stockGraphs\": [{\r\n                        \"type\": \"candlestick\",\r\n                        \"id\": \"g1\",\r\n                        \"openField\": \"open\",\r\n                        \"closeField\": \"close\",\r\n                        \"highField\": \"high\",\r\n                        \"lowField\": \"low\",\r\n                        \"valueField\": \"close\",\r\n                        \"lineColor\": \"#7f8da9\",\r\n                        \"fillColors\": \"#7f8da9\",\r\n                        \"negativeLineColor\": \"#db4c3c\",\r\n                        \"negativeFillColors\": \"#db4c3c\",\r\n                        \"fillAlphas\": 1,\r\n                        \"useDataSetColors\": false,\r\n                        \"comparable\": true,\r\n                        \"compareField\": \"value\",\r\n                        \"showBalloon\": false,\r\n                        \"proCandlesticks\": true\r\n                    }],\r\n\r\n                    \"stockLegend\": {\r\n                        \"valueTextRegular\": undefined,\r\n                        \"periodValueTextComparing\": \"[[percents.value.close]]%\"\r\n                    }\r\n                },\r\n\r\n                {\r\n                    \"title\": \"Volume\",\r\n                    \"percentHeight\": 30,\r\n                    \"marginTop\": 1,\r\n                    \"showCategoryAxis\": true,\r\n                    \"valueAxes\": [{\r\n                        \"dashLength\": 5\r\n                    }],\r\n\r\n                    \"categoryAxis\": {\r\n                        \"dashLength\": 5\r\n                    },\r\n\r\n                    \"stockGraphs\": [{\r\n                        \"valueField\": \"volume\",\r\n                        \"type\": \"column\",\r\n                        \"showBalloon\": false,\r\n                        \"fillAlphas\": 1\r\n                    }],\r\n\r\n                    \"stockLegend\": {\r\n                        \"markerType\": \"none\",\r\n                        \"markerSize\": 0,\r\n                        \"labelText\": \"\",\r\n                        \"periodValueTextRegular\": \"[[value.close]]\"\r\n                    }\r\n                }\r\n            ],\r\n\r\n            \"chartScrollbarSettings\": {\r\n                \"graph\": \"g1\",\r\n                \"graphType\": \"line\",\r\n                \"usePeriod\": \"WW\"\r\n            },\r\n\r\n            \"chartCursorSettings\": {\r\n                \"valueLineBalloonEnabled\": true,\r\n                \"valueLineEnabled\": true\r\n            },\r\n\r\n            \"periodSelector\": {\r\n                \"position\": \"bottom\",\r\n                \"periods\": [{\r\n                    \"period\": \"DD\",\r\n                    \"count\": 10,\r\n                    \"label\": \"10 days\"\r\n                }, {\r\n                    \"period\": \"MM\",\r\n                    \"selected\": true,\r\n                    \"count\": 1,\r\n                    \"label\": \"1 month\"\r\n                }, {\r\n                    \"period\": \"YYYY\",\r\n                    \"count\": 1,\r\n                    \"label\": \"1 year\"\r\n                }, {\r\n                    \"period\": \"YTD\",\r\n                    \"label\": \"YTD\"\r\n                }, {\r\n                    \"period\": \"MAX\",\r\n                    \"label\": \"MAX\"\r\n                }]\r\n            },\r\n            \"export\": {\r\n                \"enabled\": true\r\n            }\r\n        });\r\n    }\r\n    return {\r\n        // public functions\r\n        init: function() {\r\n            demo1();\r\n            demo2();\r\n            demo3();\r\n            demo4();\r\n            demo5();\r\n        }\r\n    };\r\n}();\r\n\r\njQuery(document).ready(function() {\r\n    KTamChartsStockChartsDemo.init();\r\n});\n\n//# sourceURL=webpack:///../src/assets/js/pages/components/charts/amcharts/stock-charts.js?");

/***/ })

/******/ });