Hi Albert,
Thanks for using our products.
Query #1:May I know what are the advantages of using Data manager module vs a plain REST API?
REST API is architecture which is used for web service communication but Data Manager acts as gateway for communication between client and server using REST API. Data Manager uses this REST API to retrieve data and perform CRUD operations using built-in queries. Also, It has adaptors such as OData. URL, ODataV4 and Web API to communicate with appropriate service.
For more information please refer to the following documentation.
Query #2: Can Data Manager be the use case for dynamic data query without refreshing the chart ?
We have analyzed your query. Yes, data manager can be the use case for dynamic data query without refreshing the chart. We have prepared a sample in which we have used the data manager to fetch data from the specified URL and bind those data to chart. Find the code snippet below to achieve this requirement.
|
Angular:
//Required modules to be imported for data manager and query
import { DataManager, Query } from '@syncfusion/ej2-data';
//Specify the link from which you need to fetch the data
public data: DataManager = new DataManager({
url: 'http://mvc.syncfusion.com/Services/Northwnd.svc/Tasks/'
});
//Pass the query as per your requirement to filter the data
public query: Query = new Query().take(5).where('Estimate', 'lessThan', 3, false);
<ej-chart>
<e-series-collection>
<e-series [dataSource]='data' xName='Assignee' yName='Estimate' [query]='query' >
</e-series>
</e-series-collection>
</ej-chart> |
Screenshot:
Sample for reference can be find from below link.
For further information on data manager in chart, kindly find the
help document.
Also find the online sample for data manager in chart from below.
kindly revert us, if you have any concerns.
Regards,
Pavithra S.