Related Articles
Creating an SQL-based Chart widget
On the drawer taskbar, click on Content button
From the list of available widget, select SQL Chart Widget
Configure the newly added table by clicking on the Edit Widget Settings Icon on the upper right corner of the widget.
On the settings page, supply the title, description, datasource, the sql query name and have the option to set drilldown and scoping and filter features. Click on the Apply button to refresh the table.
System-defined variables can also be used to add dynamic values into your SQL Query such as current user's Name, Id, Support Groups and Language Preference, as well as the current date + or - a number of days. For more information about System-defined Variables, please see this KB article: KB2567 - User Guide: System-Defined Variables
You might also want to add dynamic properties or tokens in the sql query string in this format {{property}}.
Example:
select {{col1}}, description, assigneduser from workitem
In the example above, placeholders are created for the token col1. 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
For example: http://www.contoso.com/Page/e2514115-0352-422e-b26f-040483595ded?col1=title#/ will perform a lookup for 'title' in col1
Click on the Apply button to refresh the table.
To learn more about how to add or modify the selected SQL query, please refer to the article on How to: Manage dashboard queries (KB1374).
If the query returns aggregated values - meaning the query has the "group by" clause, users will be presented with two options namely: category field which is used to set the series label, and value field which is used to set the graph's plotting value. If the query does not contain the "group by" clause, user will be presented with the usual Group By column option.
On the drawer taskbar, click on Save to save the changes on the page.