Prerequisites
- Open an existing page or create a new one. For example, see our knowledge base article, Add a new page.
Procedures
Add an Analytics block to your page and choose your chart type
- At the bottom of your page, select ADD CONTENT, and in the Content dialog box, select the Analytics block.
- Scroll down, type in a Title for your chart, and select SAVE.
- Choose the type of chart you want to use, for example, an area, a bar, a column, a line, or a pie chart, and select CONTINUE.
Choose Chart
- From the chart icons shown, select the type of chart you want to build and select CONTINUE.
Choose your data
Choose the model
- From the Model list, choose the model whose data you want to use.
Filter data items
DO NOT use the filter for access control because users can still access data through other means, for example, APIs. See our knowledge base article, Add an access control policy.
- You can optionally restrict the user's data in this block. Otherwise, select CONTINUE and skip to the next section.
- Select the Filter data items option and under the Filter data items section, choose what you want to do:
- Meet ALL of the following conditions (and) - If you want to hide the selected data when it meets every condition you add, add a condition under this section.
- Meet ANY of the following conditions (or) - If you want to hide the selected data when it meets just one of several conditions, add your conditions under this section.
- From the Property list, select the model's property. The next options vary, depending on the property that you have chosen.
- To pass is the Object ID so that the data is relevant, you can choose the settings:
- Property: "Id"
- Criteria: "is any of"
- Value: "objected"
- For example, you choose the "Id" Property "is any of" the Value "objectId" to only view data based on the signed-in user, or change to "is not any of" to prevent the user from viewing data based on the signed-in user.
- To pass is the Object ID so that the data is relevant, you can choose the settings:
Be careful when selecting properties. You can't use a property with a large amount of text, such as a Description, if any property values exceed the limit for using a property as a filter. You can try to shorten the property values and try the next day again.
- From the Criteria list, select the condition you want the property value to meet to hide the block from the page.
- In the Value box, enter the property's value that you want the condition to meet to hide the block from the page.
- For lookup properties, you can select a lookup option.
- For foreign key properties, you can select any values against the default label property of the linked model. However, if there is nothing to select, there might not be any values for the property.
Select the properties to use in your chart
- From the Properties list, select the properties that you want to show on your chart. If you want to show an aggregation of one of your properties, select:
- Count: Select Count and select the property for which you want to show a count.
- Sum: Select the property that you want to group by, for example, Job, and then select the number property to show the sum of all values, for example, Salary - Sum.
- Minimum: Select the property you want to group by, for example, Job, and then select the number property to show the lowest value, for example, Salary - minimum.
- Maximum: Select the property you want to group by, for example, Job, and then select the number property to show the highest value, for example, Salary - maximum.
- Average: Select the property you want to group by, for example, Job, and then select the number property to show the average value, for example, Salary - average.
- Select CONTINUE. and proceed to customize your chart:
- For pie charts, see our knowledge base article, Customize your pie chart.
- For all other charts, see our knowledge base article, Customize your area, bar, column, and line chart.
Follow-up tasks
- Customize your pie chart
- Customize your area, bar, column, and line chart
- Add an additional series to your chart
- General content settings