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. Image for the cookie policy date
close icon

Web Data Source as connection type: load data from Data Source dynamically by swap parameters

Hi,
I try Syncfusion Dashboard for data visualization.
I use Web Data Source as connection type.
I want to filter data by date range filter (DatePicker).

The problem is that Dashboard loads data from Data Source once and then filtering all at the UI level.. i.e. caches data.
This is a problem because I have a lot of data for several years and I don't want to pull everything at once.

Is it possible to load data from Data Source dynamically by swap startDate and endDate parameters from DatePicker?
Example: 
http://host_name/webservice/some_rest_method?startTime={swapped_startTime}&endTime={swapped_endTime}&group=false

So web data source  will return the data that is required by request.
I'm sure that this should be because this is one of the main things.. I just can't find it.

Thanks!


9 Replies

DG Dhivyabharathi Govindaraj Syncfusion Team August 14, 2017 01:27 PM UTC

Hi Ilya, 
 
We cannot achieve this out of the box using our dashboard designer application. We will consider this feature and it will be available in any one of our future releases. As a work around we can achieve this using our Dashboard SDK platform. We have created a sample application in ASP.Net MVC to demonstrate your requirement. Please find the sample from the following link http://www.syncfusion.com/downloads/support/directtrac/general/ze/LocalEmbeddedDashboard-304170304 . Download and extract the sample from the link. Run the sample in Visual studio. To run the sample Dashboard SDK platform is required. You can download the SDK Platform build from the link https://www.syncfusion.com/products/dashboard After installing the Build follow the steps in the documentation to host the dashboard service in IIS express https://help.syncfusion.com/dashboard-platform/dashboard-sdk/installation-and-deployment#hosting-dashboard-service-in-iis-express  
 
Copy the Dashboard Service hosted URL and paste it in the file "Controllers\DashboardViewerController.cs" as shown below and run the application. 
 
 
In the sample application we have a date picker widget where you can choose the start and end range of the data. Upon selecting the range the query will be generated with the selected value and the dashboard will be showcasing the filtered data. 
 
Please refer the code in the files  “Controllers\DashboardViewerController.cs” and “Views/DashboardViewer/Index.cshtml”. You can find our documentation on change connection string in the link https://help.syncfusion.com/dashboard-platform/dashboard-sdk/how-to/change-data-connection-string-in-dashboard  
 
Regards, 
Dhivya 



IB Ilya Bo August 14, 2017 02:35 PM UTC

Dhivya, thank you for the answer.

Also I have question about Auto Refresh:

When I try to turn on Auto Refresh:

Also Refresh Settings -> Enable Auto Refresh 

It not works in dashboard preview.

I use this doc: https://help.syncfusion.com/dashboard-platform/dashboard-designer/refresh-dashboard

As I understand it will refresh cache of the dashboard preview in browser by timer. I set for each 30 seconds, but nothing happens.

Probably I do something wrong..

Thanks!



BN Bharath Natarajan Syncfusion Team August 15, 2017 06:56 AM UTC

Hi Ilya, 

Thanks for your update. 
We have checked the reported issue “Auto refreshing not working on dashboard preview” from our end and found auto refreshing working fine with the time prescribed. 

And there is no indication like loading indicator by default to notify refreshing while previewing the dashboard on Dashboard Designer. 

But It can be achieved using our Dashboard SDK platform. We have provided the API  autoRefreshSettings to customize the settings for showing an indication during every refresh. 
Please find the following documentation and code snipped which detailed about the API 
$("#container").ejDashboardViewer({  
enableAutoRefresh:true,  
autoRefreshSettings:{showWaitingIndicator:true}  
}); 
Also we have included the API settings to show indication for refreshing the dashboard on specific time interval in the sample that shared by us on our previous update. 

Please find the modified sample below: 

Meanwhile you can ensure the dashboard refreshing on designer preview by, 
  1. Opening the browser developer tools
  2. Navigate to Network tab
  3. Ensure the request sent to service as mentioned below, after 30 seconds (default time)
 

Kindly let us know if you need further assistance on this. 

Regards, 
Bharath N 



IB Ilya Bo August 15, 2017 10:20 AM UTC

Hi Bharath,

Thank you for the answer.

I see in browser developer tools GetRefreshControlData, but there is no changes on Dashboard.


Here is my problem:

When I create dashboard I want to use custom date for filtering results.

Because there is no possibility to load data by parameters dynamicly, I fetch all data in the Web Data Source, so I put in the request 

startDate = 2000-01-01

endDate = 3000-01-01

So all data will be pulled for this time period.

So CustomDate widget (acts as master widget) has appropriate resource with date column.

For example resource has data from 01-01-2016 till 08-01-2017

During preview on widget appropriate date range (01-01-2016 till 08-01-2017) will be available for filtering.

But every day datasource has new incoming data, so as I understand Auto Refresh refreshes the cache and pulls new data.

For example the next day on widget date range: 01-01-2016 till 08-01-2017 + one_more_day will be available for filtering for One more day (i.e. 08-02-2017).


But on calendar widget that date range doesn't update i.e. next days are not available (appropriate date buttons disabled).

To update it I have to use refresh button in Dashboard designer Data Source editor and publish dashboard again:


As I understand Calendar Custom Date widget should update available date ranges according to refreshed data but it doesn't..

Can you explain please?



BN Bharath Natarajan Syncfusion Team August 16, 2017 12:04 PM UTC

Hi Ilya, 

Thanks for your update. 
Make sure that, have you configured the scheduling while publishing the dashboard. 
By publishing the created dashboard with scheduling will fix your problem. 
Scheduling configures your data source on which time it get updated whether day / time basis, before you publishing the dashboard. 
Please find the following help documentation which detailed about extracting live data using Dashboard Data Agent: 

Also we have an option to show all the dates as per the calendar irrespective to the data source's available dates. 
For this, you just  need to uncheck the option “Limit Dates” on Date Picker widget’s properties while designing the dashboard. 

 

Please let us know if you need further assistance on this. 

Regards,                                                                                                                                               
Bharath N 



IB Ilya Bo August 17, 2017 12:12 PM UTC

Hi,

Why in Syncfusion Data Agent I  can't choose connection type Web datasource?

I pull data from REST API of web resource.




AD Atchutha Dhandapani Syncfusion Team August 18, 2017 05:56 AM UTC

Hi Ilya, 

Data Agent is used to extract the web accessible data to the data server and refresh the data to keep it alive based on provided time schedules. You don’t need to provided source web data source details in Data Agent and this will be configured in dashboard itself. Please follow the below steps to use Data Agent to get updated data from web data source

  1. Consider http://services.odata.org/V4/Northwind/Northwind.svc/Orders this is your web data source link.
  2. Connect to web data source in dashboard designer and provide above link in URL. Then click Connect.
 
  1. Design your dashboard and publish it.
  2. While publishing it designer will ask for Data Agent details in Publish Dashboard window. Refer the below screenshot. Here Connection represents the target database server connection which need to be configured in Data Agent using Add Connection option
 
 
  1. After publishing, the dashboard is uploaded in Dashboard Server and the above details will be sent to Data Agent along web data source connection details. With the help of this connection details Data Agent automatically Identifies the source location(URL) and extracts the updated data and push into target database server.
 

Please refer the below documentation link to know more details about Data Agent and its configuration. 


Kindly let us know if you need any further assistance on this. 

Regards, 
Atchutha D. 



IB Ilya Bo August 18, 2017 10:55 AM UTC

Is  it possible to do it in Preview mode of Dashboard Designer without publishing the dashboard in Dashboard Server?

Thanks!



AD Atchutha Dhandapani Syncfusion Team August 21, 2017 10:11 AM UTC

Hi Ilya, 

Currently our Syncfusion Data Agent only works with published dashboard and It will not be supported for preview dashboard operation in dashboard designer. Since it was designed to bring the updated data for published dashboard based on schedule. 

Please let us know if you have any concerns. 

Regards, 
Atchutha D 


Loader.
Live Chat Icon For mobile
Up arrow icon