Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript"> (
  2.     function (global) {
  3.         "use strict";
  4.         Apex.colors = [
  5.             theme.color.primary,
  6.             theme.color.success,
  7.             theme.color.info,
  8.             theme.color.warning,
  9.             theme.color.danger
  10.         ];
  11.         var init = function () {
  12.             // sparkline
  13.             window.Apex = {
  14.                 stroke: {
  15.                     width: 2
  16.                 },
  17.                 markers: {
  18.                     size: 0
  19.                 },
  20.                 tooltip: {
  21.                     fixed: {
  22.                         enabled: true,
  23.  
  24.                     }
  25.                 }
  26.             };
  27.  
  28.             var opts = {
  29.                 annotations: {
  30.                     yaxis: [
  31.                         {
  32.                             y: 260,
  33.                             borderColor: '#00E396',
  34.                             label: {
  35.                                 borderColor: '#00E396',
  36.                                 style: {
  37.                                     color: '#fff',
  38.                                     background: '#00E396',
  39.  
  40.                                 },
  41.                                 text: 'Support',
  42.  
  43.                             }
  44.                         }
  45.                     ]
  46.                 },
  47.                 chart: {
  48.                     type: 'area',
  49.                     stacked: false,
  50.                     height: 350,
  51.                     zoom: {
  52.                         type: 'x',
  53.                         enabled: true,
  54.                         autoScaleYaxis: true
  55.                     },
  56.                     toolbar: {
  57.                         autoSelected: 'zoom'
  58.                     }
  59.                 },
  60.                 dataLabels: {
  61.                     enabled: false
  62.                 },
  63.                 series: [
  64.                     {
  65.                         name: 'XYZ MOTORS',
  66.                         data: [
  67.                             {
  68.                                 x: "2019-10-28T16:00:58.045487+00:00",
  69.                                 y: 664
  70.                             },
  71.                             {
  72.                                 x: "2019-10-28T16:00:57.285005+00:00",
  73.                                 y: 817
  74.                             },
  75.                             {
  76.                                 x: "2019-10-28T16:00:55.664009+00:00",
  77.                                 y: 942
  78.                             },
  79.                             {
  80.                                 x: "2019-10-28T16:00:54.883883+00:00",
  81.                                 y: 338
  82.                             },
  83.                             {
  84.                                 x: "2019-10-28T16:00:53.063869+00:00",
  85.                                 y: 408
  86.                             },
  87.                             {
  88.                                 x: "2019-10-28T16:00:51.405653+00:00",
  89.                                 y: 409
  90.                             },
  91.                             {
  92.                                 x: "2019-10-28T16:00:50.524560+00:00",
  93.                                 y: 808
  94.                             },
  95.                             {
  96.                                 x: "2019-10-28T16:00:49.782930+00:00",
  97.                                 y: 872
  98.                             },
  99.                             {
  100.                                 x: "2019-10-28T16:00:48.162640+00:00",
  101.                                 y: 165
  102.                             },
  103.                             {
  104.                                 x: "2019-10-28T16:00:44.063199+00:00",
  105.                                 y: 381
  106.                             },
  107.                             {
  108.                                 x: "2019-10-28T16:00:43.224259+00:00",
  109.                                 y: 810
  110.                             },
  111.                             {
  112.                                 x: "2019-10-28T16:00:42.384573+00:00",
  113.                                 y: 863
  114.                             },
  115.                             {
  116.                                 x: "2019-10-28T16:00:40.730136+00:00",
  117.                                 y: 864
  118.                             },
  119.                             {
  120.                                 x: "2019-10-28T16:00:39.865737+00:00",
  121.                                 y: 788
  122.                             },
  123.                             {
  124.                                 x: "2019-10-28T16:00:36.644709+00:00",
  125.                                 y: 228
  126.                             }
  127.                         ]
  128.                     }
  129.                 ],
  130.                 markers: {
  131.                     size: 0,
  132.  
  133.                 },
  134.                 title: {
  135.                     text: 'Stock Price Movement',
  136.                     align: 'left'
  137.                 },
  138.                 fill: {
  139.                     type: 'gradient',
  140.                     gradient: {
  141.                         shadeIntensity: 1,
  142.                         inverseColors: false,
  143.                         opacityFrom: 0.5,
  144.                         opacityTo: 0,
  145.                         stops: [
  146.                             0,
  147.                             90,
  148.                             100
  149.                         ]
  150.                     },
  151.  
  152.                 },
  153.                 yaxis: {
  154.                     labels: {
  155.                         formatter: function (val) {
  156.                             return (val / 1000000).toFixed(0);
  157.                         },
  158.  
  159.                     },
  160.                     title: {
  161.                         text: 'Price'
  162.                     },
  163.  
  164.                 },
  165.                 xaxis: {
  166.                     type: 'datetime',
  167.  
  168.                 },
  169.                 tooltip: {
  170.                     shared: false,
  171.                     y: {
  172.                         formatter: function (val) {
  173.                             return (val / 1000000).toFixed(0)
  174.                         }
  175.                     }
  176.                 }
  177.             }
  178.             new ApexCharts(document.querySelector("#asd"),
  179.                 opts).render();
  180.         }
  181.         global.apexcharts = {
  182.             init: init
  183.         };
  184.     }
  185. )(this);
  186. apexcharts.init()
  187. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement