The following instructions will create bar and donut charts. Before following these instructions, make sure PosApp is loaded in the Samples workspace, deployed, and running. (See the Hands-on quick tour for an introduction to creating dashboards.)
From the top left menu, select Dashboards, then click PosAppDash. The dashboard's main page appears.
At the top right, click Edit, then at the left of the page select the page tab, then click + to add a new page.
Select the visualizations tab, then drag the Bar visualization icon into the workspace and drop it. This creates a bar chart.
Click the magnifying glass icon at the top of the chart. The query editor opens.
In the Name field, enter
Samples.MyQuery. In the SELECT statement field, enter select
count(*) as Count, Category from MerchantActivity group by Category;(you can copy and paste from this document), being sure to end with a semicolon. This will select only the data needed for the chart: the count of WActions for each category and the category names. Click Save Query.
Click the cog icon at the top of the bar chart, or double-click anywhere in the chart, to open the visualization editor.
Set Group By and Color By to Category, the vertical axis to Count, the horizontal axis to Category, and the horizontal axis Type to Category, then click Save visualization. (The Category in the Type menu is a chart property, not the name of a field.) The chart appears in the workspace.
Drag the Donut visualization icon into the workspace and drop it to create a donut chart.
This chart will use the same query as the bar chart: click the Edit Query button, click in the Name field, select Samples.MyQuery, and click Save Query.
Click the Configure button, set the options as you did for the bar chart, and click Save visualization.