We'd like to build a pie chart that can be displayed on the Opportunity Page Layout that calculates the following:

Custom Field 1 + Custom Field 2 + Custom Field 3 = Amount

I imagine we would start with a report, but how do we reference the existing opportunity?


There is a Standard Component called Report available when you edit page in Lightning App Builder. When you drag the component, it will give you the option to filter by the current record.

Use the Report Chart component to include a chart from a report in your Lightning page. If you leave the component’s Label field blank, the component’s label is derived from the report’s label.

The chart refreshes if its report data is more than one day old. In the component properties, you can choose to display a refresh button to enable users to refresh the chart. Saving the report’s definitions also updates the chart data in the component.

Setting a filter on the report chart data is supported only for record pages. If you set a filter option, the Report Chart component displays only that filtered data to users.

This component is supported in API version 32.0 and later. It doesn’t work with reports that are located in the My Personal Custom Reports folder. Report Chart components that refer to reports in the Unfiled Public Reports folder aren’t deployable when you include them in a package.

Refer below Image:-

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.