Charts can be populated with two methods: The chart loads the dataset from either the .cs file or the database file. If the system needs to execute logic on the returned data, such as a calculation of some kind, then the chart must use a method. Otherwise, it's best practice to use a query for performance reasons.
For a .cs chart, the method in the C# business object that contains the data creates a dataset with fixed values, and the system creates the chart with that dataset.
For a database chart, the method in the C# business object that contains the data pulls data from the database and represents the data with the chart.
Regardless of the data retrieval method, charts require the following files:
- C# business object: This contains the chart properties.
- Method in the C# business object: This contains the chart data and hosts the logic for rendering or creating the charts.
- Chart entity: This contains the chart properties.
- Mapped method/query in the entity that contains the chart screens: This configures the chart and series properties to render the chart in the application.
This post is part of the Chart topic. Click here to open the Chart Overview.