We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to embed a dashboard file either from local disk or remote link as Web Service or Web API

By using the following three different formats, you can give the path of the dashboard file to the Dashboard Viewer:

  1. To render the Dashboard, which is placed (or saved) at your local disk, in your web application, give the path of the dashboard file as input to the Dashboard Viewer.

 

Refer to the following code snippet:

 

$("#dashboard").ejDashboardViewer({

    serviceUrl: 'http://localhost:58087/DashboardService.svc',

    dashboardPath: 'E:\\Dashboards\\WorldWideCarSalesDashboard.sydx' //Both the dashboard file and dashboard service are in same (local) machine.

});

 

  1. To render the Dashboard, which is placed in the remote machine and configured as downloadable link, in your web application, give the HTTP link of the dashboard file to the Dashboard Viewer.

 

Refer to the following code snippet:

 

  $("#dashboard").ejDashboardViewer({

        serviceUrl:  'http://dashboardsdkdemo.syncfusion.com/DashboardService/DashboardService.svc',

        dashboardPath: 'http://dashboardsdkdemo.syncfusion.com//Dashboards//Northwind Products and Suppliers.sydx' // Public link, which should download the dashboard file at given Dashboard Service URL.

    });

 

 

  1. To render the Dashboard, which is served from a web service (or Web API), in your web application, give the web service link as dashboard file path to the Dashboard Viewer.

 

For example, the web service has the following code snippet to download the Dashboard file:

 

   public FileContentResult Download () 

        { 

           FileContentResult result       = new FileContentResult(System.IO.File.ReadAllBytes("E:\\ Dashboards\\ WorldWideCarSalesDashboard.sydx"), "application/octet-stream") 

           { 

               FileDownloadName = "WorldWideCarSalesDashboard.sydx"                

           }; 

            return result; 

        }

 

 

And, refer to the code snippet of the Dashboard Viewer side as follows:

 

  $("#dashboard").ejDashboardViewer({

        serviceUrl: 'http://localhost:58087/DashboardService.svc',

        dashboardPath: 'http://localhost:58753/home/Download' //Public link, which should download the dashboard file at given Dashboard Service URL.

  });

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8436 02/14/2018 02/19/2018 Dashboard Platform Dashboard SDK
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon