Add and Configure the Third Panel and Chart for the KPI_1 Dashboard Grid
- Add another dashboard panel and pie chart to the KPI_1 dashboard grid.
- In the Components palette, search for panel.
- Click Dashboard Panel and in the Structure view, drag it over Dashboard Grid, then drop it.
- If the Slot dialog box appears, click Default.
- In the Components palette, search for chart.
- Click Pie Chart and drag it over the upper-left corner of the Dashboard Panel region, then drop it.
- In the Dashboard Panel | Slots dialog box, click
Default. Tip: If you don't see any chart, check the Structure view to see if the chart is a peer of the panel instead of a child. If it is, to make it a child, click Pie Chart and drag it over Dashboard Panel, then drop it. In the Dashboard Panel | Slots dialog box, click Default.
- Locate the data to add to the pie chart.
- In the Properties pane for the Pie Chart, on the Quick Start tab, click Add Data.
- In the Add Data dialog box, filter the data sources by entering rra.
- Expand fscmRestContaining"rra".
- Select rraOrders.
- Click Next.
- Map the endpoints to the slice values and colors of the pie chart.
- On the Map Fields stop, in the Endpoint Structure panel, scroll to TotalAmount.
- Click # TotalAmount.
It should automatically appear in the Slice Values field. If it doesn't, drag the endpoint over the field and drop it.
- Click CustomerLastName.
It should automatically appear in the Slice Colors field. If it doesn't, drag the endpoint over the field and drop it.
- Click Next.
- Define the query so that it returns only 10 customers at a time.
- On the Target panel, expand { } uriParameters.
- Click # limit.
- In the # uriParameters.limit field at the bottom of the dialog box, enter 10.
- Select the Static Content option, if it isn't
already selected.
- Click Finish. Tip: If you're not seeing the Pie Chart, or if you are seeing errors related to Total Amount being a String, in the Code view of the editor, add
Number.parseFloat
in front of the variable for the Total Amount in the Chart, as follows:<oj-chart-item value="[[ Number.parseFloat($current.data.TotalAmount) ]]" series-id="[[ $current.data.CustomerLastName ]]" group-id="[[['Undefined']]]"></oj-chart-item>
. If you are still not seeing the Chart in design time Live View after making these changes, try using Preview mode.Note: After this step, you see a series of errors in a notification at the bottom of the page due to string type mismatch. To resolve these errors:- Click the Types tab, expand , and click TotalAmount.
- In the Properties pane, Type field, replace
String with
Number.
- To address accessibility, add a title to the third dashboard panel.
- In the Structure tab, under Defer @KPI_1_id, select the third Dashboard Panel component.
- On the Properties pane General tab, in the Panel
Title field, enter Top 10 Customers by Order
Amount.