403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/dev/code/erp/staticfiles/dashboard/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/dev/code/erp/staticfiles/dashboard/joiningChart.js
$(document).ready(function () {
    function hiringChart(dataSet, labels) {
      const data = {
        labels: labels,
        datasets: dataSet,
      };
      // Create chart using the Chart.js library
      // $("#hiringChart").html("<canvas id='hiring'></canvas>")
      window['myChart1'] = {}
      var ctx = document.getElementById("hiringChart");

      if (ctx != null) {
        ctx = ctx.getContext("2d")
        myChart1 = new Chart(ctx, {
          type: 'bar',
          data: data,
          options: {
          },
        });
      }
    }

    function joining(){
      var year = $("#year").val()

      $.ajax({
        url: "/recruitment/dashboard-hiring",
        type: "GET",
        data: {
          id : year
        },
        success: function (response) {
          dataSet = response.dataSet;
          labels = response.labels;
          hiringChart(dataSet, labels);
        },
      });
    }

    $("#year").on("change", function (e) {
      myChart1.destroy();
      joining()
    });

    joining()

    $('#chart2').click(function (e) {
      var chartType = myChart1.config.type
      if (chartType === 'line') {
        chartType = 'bar';
      } else if(chartType==='bar') {
          chartType = 'line';
      }
      myChart1.config.type = chartType;
      myChart1.update();
    });

  });

Youez - 2016 - github.com/yon3zu
LinuXploit