Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

438
Views
Failed to load resource: the server responded with a status of 404 (Not Found) In Javascript Datatable

Am trying to draw pie chart by getting data from sql server. The issue is that when I run the code I get error "Failed to load resource: the server responded with a status of 404 (Not Found)". The service is under ClientsService Here is my code

$(document).ready(function () {

           $.ajax({
               type: "POST",
               dataType: "json",
               contentType: "application/json; charset=utf-8",
               url: "/Clients/GetStoresCount",
               data: "",
               success: function(data){
                   chartData;
               },
               error: function(){
                   alert("Error Loading data! please try again.");
               }
           }).done(function (){
               google.charts.setOnLoadCallback(drawChart);
           });
       });
      function drawChart() {

        var data =new google.visualization.DataTable();
         data.addColumn('string','CityID');
         data.addColumn('string','Stores');
         for(var i = 0; i < chartData.length; i++){
             if(i != 0){
             data.addRow([chartData[i].CityID,chartData[i].Stores]);
         }
         }
        var chart = new google.visualization.PieChart(document.getElementById('piechart'));
           draw(data, {title: "Stores Per region"});
          chart.draw(data, options);

service for getting data from sql is:
    public IEnumerable<Store> GetStoresCount()
        {
            using (IDbConnection conn = Connection)
            {
                string sQuery = "; exec GetStoreCountPerRejion";

                var s = conn.Query<Store>(sQuery);
                return s;
            }
        }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!