{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../demo7/src/js/pages/features/charts/amcharts/stock-charts.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,SAAS;AACpC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,SAAS;AACpC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;;;AAGb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,SAAS;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA,aAAa;;AAEb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,UAAU;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;AAGjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,2BAA2B,UAAU;AACrC;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;;;AAGb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC,E","file":"js/pages/features/charts/amcharts/stock-charts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"../demo7/src/js/pages/features/charts/amcharts/stock-charts.js\");\n","\"use strict\";\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]]:[[value]]\",\r\n \"compareGraphBalloonText\": \"[[title]]:[[value]]\"\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});"],"sourceRoot":""}