Graphs and dashboards
On this page you will find more information about Scai's dashboards and graphs.
For every table or view, you can begin creating a graph by clicking the Graph button located in the header of the widget.
The graph settings contains the following menu:
- Graph buttons
- Select columns
- Graph traces
The graph sidebar located on the right of the table widget will contain the following buttons:
- - closing the sidebar
- Preview - quick display of the graphical representation
- Data - opens a table widget with the data behind the graphs
- Save - saves the graph to a dashboard
You can select the columns that need to be plotted in this section. Here, you can search for the column names and select them by clicking on their names. Once they are selected, they will appear in the Entries section.
Scai detects automatically based on the column data type whether it should be:
- group by - the values of the column based on which the aggregation it is made (typically non-numerical columns)
- pivot - the values of the column will be shown as columns separately for comparison
- measurement - a mathematical function will applied to the values of this column based on the group by or pivot, such as:
- sum (sum)
- average (avg)
- count (count)
- maximum (max)
The detected type by Scai can be changed by clicking the dropdown menu located in front of the name of each column that has been selected. You can select any other combination depending on the type of graphical representation you would like to have.
A graph trace represents the unique combination between a group by, pivot (if present), measurement. A graph widget can contain one or multiple graph traces.
This menu contains two different sections:
- displayed name in graph
- graph type
If you are not satisfied with the default ones, you can change them by clicking on them.
If you want to change the graph types, click on a graph trace and then select one of the following types:
- - line chart
- - point chart
- - pie chart
- - bar chart
- - stacked bar chart
If there are multiple graph traces that are being plotted, then you can choose to combine the type of graphs depending on which one looks better.
In the Options section, the following options of the graphs can be changed:
- Graph name - Scai generates the name of the graph automatically based on the columns selected
- Records - number of records plotted, by default this number is 100, while maximum number supported by Scai is 5000
The values can be changed by clicking on them.
How to create a graph based on data
In order to create a graph based on data, the following steps can be followed:
- open the table or view you want to create the graph on
- click the Graph button
- select the columns to plot ( go to Entries section )
- select the type of the graph, ( go to Graph traces section)
- click the Preview button for a quick display of the graph
- click the Data button to check the data behind the graph
- click the Save button to add the graph to a dashboard or create a new dashboard
Create a dashboard
You can create a dashboard through two methods:
- Go to main sidebar, click Dashboards, click Create new dashboard, or
- Create a graph and save it to a new dashboard via the Save button from graph sidebar
With Scai, it is very easy to create a dashboard with graphs that have data coming from multiple SQL datasources. Connect to the data source and create the graph and, simply, save it to the dashboard. Scai will then take care to show the dashboard with data coming from multiple datasources.
The dashboard toolbar contains the following buttons:
- for reloading a dashboard
- for adding a new graph to the dashboard
- for sharing the dashboard with more users
- for renaming the dashboard
- for saving the changes of the dashboard
- for (un)locking the dashboard
Add a graph to an existing dashboard
There are two methods of adding a graph to dashboard.
- Go to the dashboard, then click the button. This will open a modal to select the dataset (table or view) based on which you would like to create a new graph. The names of the tables or views contain are prefixed with the schema name. If you wish to search by name, you can type in the input box.Once you found the dataset, just select it and click the Save button. This will redirect you to the dataset page. Select the columns and click Save to add the graph to the dashboard. Click Back to dashboard to go back to the dashboard.
- Another method is following the steps to create a graph. Then, you can click Save and save the graph to a new or existing dashboard, then click again the Save button.
Share dashboard with other users
If you want to share the dashboard with other users, you can do that by clicking the button from the dashboard menu. This will open a modal with the names of the Scai users. There are two methods of permission for users:
- with edit permissions - user can visualize and edit the dashboard
- without edit permissions - user can only visualize the dashboard and go back to the data sources behind the graphs
To select with edit permissions, simply check the Can edit checkbox. If the Can edit checkbox is not selected, then it means the user has without edit permissions, otherwise it means it has with edit permissions.
Depending on the permissions, the following actions can be performed:
|Action||without edit||with edit|
|add new graphs to dashboard|
|share dashboard with other users|
|view data behind dashboard|
|delete graphs from dashboard|
Multiple users can be added at the same time with the same permissions by selecting them and clicking the Save button. All the dashboard permissions can be visualized in the Dashboard settings section.
If you want to resize the graphs, simply click the button to unlock the dashboard. Now, you can drag and drop and resize all graph widgets. Once you are satisfied with the new layout, simply click the button. This will store the new changes.
For renaming the dashboard, click the button. This will open a modal where you can fill in the new dashboard name. Then, click the Save button.
You can access it by going to Dashboards from the left main sidebar and then clicking Dashboard settings. This will open a page which contains all the dashboards created by or shared with the logged in user. These dashboards are displayed as a table for easy filtering/ordering and the following columns are displayed:
- Actions, which contains two buttons:
- display - display a certain dashboard
- delete - delete dashboard or access to dashboard for a user
- id, the dashboard id
- name, the name of the dashboard
- created_by, the owner of the dashboard
- user_name, the user that has access to the dashboard
- write_rights, whether the user_name has the rights to modify the dashboard or not. true if the user has the rights to modify it. For more information, check the documentation for setting the user permissions.
Find the row of the dashboard where the user_name is equal to the created_by, then click the button .
Pay attention! This action will delete the entire dashboard definitively.
Delete access to a dashboard
If you are the creator of the dashboard and you want to delete the access to the dashboard for a certain user, just follow these steps:
- Filter the row that contains the combination (user_name, dashboard_name) that fits the access that you want to delete
- Click the (delete) button and the right to access the dashboard will be revoked for the given user.