Related Articles
Creating an OData-based Chart widget
On the drawer task bar, click on Content button
Configure the newly added chart by clicking on the Edit Widget Settings Icon on the upper right corner of the widget.
On the settings page, supply the title, description, the OData endpoint, and have the option to choose a collection (entity set), filter data through query string, define and arrange the grid columns and define the grid template. Click on the Apply button to refresh the table.
If the endpoint does not specify the entity set, user may select it from the Choose Collection dropdown list.
Query filters may be set at the Query String textbox. This widget is following the OData 4 format. To know more aobut how the system query options are formulated, refer to this MSDN article.
System-defined variables can also be used, i.e. @Lang (represents the current session user's LanguageCode) and @User (represents the current session user's Id).
Sample Query:
?$filter=LanguageCode eq '@Lang'
You might also want to add dynamic properties in the query string in this format {{property}}.
Example:
In the example above, placeholders are created for the dynamic properties Language and Price. You can use any variable you wish.
If you use these property tokens on the page url:
then the placeholder values on the widget's configuration will be disregarded and the url parameter values will be used in the request query string instead.
Under the Chart Configuration:
A. You may opt to check the Group By Value Field to apply data grouping on the chart, then fill-in required fields.
Whenever the chart is configured to Group By Value Field, then you can view the grouping contents by enabling Display Selected Item Details and choosing grid columns to display.
Turning on Display Selected Item Details feature will allow you to view a grid or table consisting the items on a particular grouping represented by the chart series that you clicked
B. You may be able to directly set the chart's X and Y axis by filling in the Category and Value field in an ungrouped data.
On the drawer task bar, click on Save to save the changes on the page.