A sparkline is a very small line chart, typically drawn without axes or coordinates. In a simple and highly condensed way, sparklines represent the general shape of a variation, typically over time, in a desired measurement, such as the temperature or the stock market price.
Sparklines are small enough to be embedded in text, or several sparklines can be combined together as elements of a small group.
Typical charts are designed to show as much data as possible and are set off from the flow of text. In contrast, sparklines are intended to be succinct, memorable, and located directly in the text.
Below you will find the steps to implement a Sparkline in your project.
In Edit>Datasets>DBs, you need to include the external database by using one of the providers available in the Available Providers list. In this example, we are going to use a SQLite provider in a database called Nwind.
This example database has many tables. However, not all of the tables will be used in the project. The image below shows all the available tables and highlights the ones that will be used.
In Edit>Dataset>Tables/Queries, you can create internal tables and queries for internal usage.
The tables must be mapped to tables that already exist in the database, as explained in the previous section. Each query is defined for a specific database and may contain a predefined SQL Statement.
After setting up the tables and queries that you will use, you need to configure one of the tables as the DataSource in the DataGridWindow configuration (1).
To manipulate a DataGrid control in CodeBehind, the best approach is to use the Control Name field (2) for the configuration dialog.
Then, you can use that given name (2) to get control of the element and change its properties. The below is an example.
A delegate is an object which refers to a method or you can consider it as a variable that holds a reference to a method. It provides a way to know which method is called when an event is triggered.
A delegate will only call a method that agrees with its signature and return type. A method can be either a static method associated with a class, or it can be an instance method associated with an object.
Below is a callback. The system will always look for a code EXACTLY like this one to create the Sparkline. So if you want to use this feature, you MUST have this code on your code behind.
A sparkline is updated following the logic seen in the sample code below:
The available Sparkline styles are:
Values are represented by bars that either grow up or grow down from an invisible line.