# LINE CHART

The Line Chart widget displays line graphs. It can display multiple lines on one chart, allowing for the comparison of different metrics.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfeZZZ_2BwjDvX4z9EB68VU998H3r818yPfL1LxagdmXajTXbpGWFXVXQ3UXLVWUXXpJd_Kgc8SmiL6v53nREAUCIDcUwJ1-ec1CLsi-I0dwyVBtN9__XoiPxf8Tv57Dd8rKWfPbA?key=ArGsMFxOZt6u_AfXAA-94iWG" alt=""><figcaption></figcaption></figure>

## Getting Started with Widget Configuration

To configure the widget, click on the edit icon ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcmIxOieJTlc8fo1mAy0-zMLSjvIZaF4uzm3uAlqS5_2Gw5ZdeFRMU2ENOXmEMQLaIidAseTYETJDjEqu9B0svvJJ_TCwSbbL3v-3AgDHd-iPa4HllVCRDN9JzE1m3x9baoELO2og?key=nCUpXC2iKtVeq12Xi8RnWuyw).

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-d5c4e38f62455bd68b5e0a4115ed94774fbfb898%2FLine%20Chart.png?alt=media" alt=""><figcaption></figcaption></figure>

A popup window "Widget Settings" will open:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-c7f91fd63c5a856e549eadeb40e80b3c5b484c5a%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(230).png?alt=media" alt=""><figcaption></figcaption></figure>

Fill in the necessary fields to configure the widget.

## **General Fields**

* **“Widget Name \*”** – a text field filled in manually from the keyboard;
* **“Mode”** – a dropdown list where you need to select the mode for creating a request for the widget:

| **Name**                              | **Description**                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Builder Mode](#rezhim-konstruktora)  | Allows you to build a request from separate blocks. Each block (Table Join, Filters, Widget Series, Group By, Sort, Row Count) has the option to configure the necessary commands for working with data, arithmetic and logical commands, comparison operators.                                                                      |
| [Advanced Mode](#rasshirennyi-rezhim) | <p>Allows you to enter a request manually in the SQL field:</p><p><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcd7OIaI1R6U2xJuYuo33WaYxtzln9tYAyEjwgkaFQvmWk9805MgjR88D_8QBjGAHjvMQvGc2LJSshFRdlLNMIMSC0Bnxvufy0eEUv9QIz2KAfRGIeFykHpvaX7g_W6kqH1KqmPQg?key=nCUpXC2iKtVeq12Xi8RnWuyw" alt="" data-size="original"></p> |

* **“Tables”** – a dropdown list with all available database tables.

## **Additional Fields Available for Configuration Only in Builder Mode**

### **Table Join**

Table joins are necessary to extract data from multiple related tables and form more complete and informative results.

To compare two tables for subsequent joining, the following operators are used:

| **Name** | **Description**                                                                                                                                    |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| =        | Returns rows from both tables where the values in the specified columns are equal.                                                                 |
| !=       | Returns rows from both tables where the values in the specified columns are not equal.                                                             |
| >        | Returns rows where the value in the specified column from the first table is greater than the value in the specified column from the second table. |
| <        | Returns rows where the value in the specified column from the first table is less than the value in the specified column from the second table.    |

If you need to join only 2 tables, you must fill in the fields:

1. **“Column”** from the dropdown list;
2. **“Operator”** from the dropdown list;
3. **“Column 2”** from the dropdown list;

For example,

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXciNHglBTDjXxh-ndG_wzNZcXhXND6XrUdgBCYtdVsfMv3TG6lbnmE7WNFThayemZauqrZI8azpsVmnyDFr53uPR-_7fNaoGFk-Hjobbh7QMjwunzzgtQqEHxZbkh_MB37n43DPnA?key=nCUpXC2iKtVeq12Xi8RnWuyw" alt=""><figcaption></figcaption></figure>

If you need to join more than two tables, you must click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcROZ9y7XZhK1qwKQ5hLnMx37mm7idz56ag4ue9nmrltGiCm-UFL7NI3iN_E4hvVWPnflzHFtiCErCZms5wLZNi1FY5eeteFiTJdp9-Zy1PF4XsdmLbz7YpdWSk8R6ovdrAvfzGGQ?key=nCUpXC2iKtVeq12Xi8RnWuyw), after which you need to fill in the necessary fields.

If you need to delete a table join, you must click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcsbV73oVpfuisxBad8hWyyeugetwarRT9Qin_QILnwD9umqNBWbO_ozoH6SbGFnkWDK2RvIW8keI5FkOlIIyyzy5QwrPSso1yRkSuG-5Kt2mo1vMGt0Id0NDy5gvYwIDa5ExuZOA?key=nCUpXC2iKtVeq12Xi8RnWuyw).

### **Filters**

Filters allow you to set conditions for the selected data using comparison operators and logical operators.

To set one condition, you need to fill in the fields:

1. **“Column”** from the dropdown list;
2. **“Operator”** from the dropdown list;
3. **“Value”** manually from the keyboard;

For example,

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcESQzpRUvRZdAMxHUoIII1p7wTfua4vjT0iUyooGLAhmICxiBb7qbQNHKqzbKZApRuiZl_JMRVo-lO8IWZhCghO3l2fju0sa8YjMa5ezF3zNgXop6rlBWBg4oAqWcBRl9mySipdQ?key=nCUpXC2iKtVeq12Xi8RnWuyw" alt=""><figcaption></figcaption></figure>

If you need to combine several conditions into one, for example, ((robots.is\_deleted = 0) AND (robots.id > 13)), you must use logical operators. To do this, select the desired operator by clicking on the icon ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe5KvLHwZJMAKEekEGvTPPxIYVtQHjZGWfT2q8JjIUdDQdSA06PBo1IP04AIcbYBakRwhkUhVD-sKW9jsuk3nkz5Ywch_4C4490VxIIDM4TnUldryGqRtx8FlU36Cs7yQZ5Fty8RQ?key=nCUpXC2iKtVeq12Xi8RnWuyw) to change it to OR, or ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe62e1PD1G48Sa7XfyhhOgn_81A4M0YGYMbslALy5hbSxgpT6ibxOtBHD1C_Ks5SzrvMmybTuKKtcIShyipyKAi-Dz9A5vI6zTIepF8g4XZXmtNZgAcOfyLjty0GYfxagnxE6l9?key=nCUpXC2iKtVeq12Xi8RnWuyw) to change it to AND. Then click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcAFQBjH14gIfP5ZzErkhIp8i9YMCcDu5YAeWCq8Xy6W4K6J4t2-vTqJgtAW5TNFG50Vkm6jr3LvPF6ly9Cty2Yvk0AcxvBZnnVmRO4lVXOvioRgWTJewQCqeiTZN6CcOAjsT4jDw?key=nCUpXC2iKtVeq12Xi8RnWuyw), after which fill in the necessary fields:

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcIYJZ9VjTOJzVfnAxrZdlAqQQ558qlI0bptyMwy5FBzipDgBIkz8TeFzIHSAXt4mQ215oiPVEVnOmMYy_M93Al92Ixcto6FY6tS360cqr2RvL_4RY7rCfGJWHmXBjZcptmC5fRNQ?key=nCUpXC2iKtVeq12Xi8RnWuyw" alt=""><figcaption></figcaption></figure>

If you need to set a complex condition for the Filter, including several parentheses, you must click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfSfbBGhG7QVxO9ioVtoXWl8Rmt2U-9B6gKdfw0ai6VOgNahfB7RR8l3UlSXNeavIBlfT96eAhr9XtqT-BJj_Fi-ep4L91DH3ojUXNUBMcPq8aGBs8vUv-FktTvqrVOnLPVdZCK?key=nCUpXC2iKtVeq12Xi8RnWuyw), after which fill in the necessary fields.

If you need to delete a condition, you must click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd6OAWgEybohnm-V1e2pK4Z5R2yBziiiYj6BJ1ErR-ss_mBXRCxQllIK8ZF9cCs4_1coCLIq1xh_iucJN85kyIwN42FWOxA4wy4AycS4lt-awRGmfkEzeNAzOsRmNT3xbt6utzgog?key=nCUpXC2iKtVeq12Xi8RnWuyw).

### **Widget Series**

Widget series are used to specify the data columns that need to be extracted from the database. They define which data will be returned in the query results.

To configure the Widget Series, you need to fill in the fields:

1. **“Column”** from the dropdown list;
2. **“Operator”** from the dropdown list;
3. **“Series Name”** manually from the keyboard;

For example,

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdcNclubdHr3t-XMCgO3_e1aV2WJOz73qmI4LnaCecZjFiDo9kL43waypLoOj2xa3ySVRrPersvZWBZ4y9lKTH_a3Ln9WNhcFN31-H_gbPQqp2qvk7nSdou3OOee_-WQDcMpzvF3w?key=nCUpXC2iKtVeq12Xi8RnWuyw" alt=""><figcaption></figcaption></figure>

If you need to display additional data on the legend, you should click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeFhXqnbRswxTKAYx7LnYp-kO4Opn8ZIybkorP4LBC9jNkvphbYUS0BYkkPYvxYub1vP7rmYElV4uoHTg9Ofzw5INlNLUuWyOUXOkj2w0jhJqELB8Jh4iAMwh97fjd5IWR2fk5qFw?key=nCUpXC2iKtVeq12Xi8RnWuyw).

### **Group By**

Field for configuring the process of merging data rows with the same values in a specific column (or columns) into a single set, allowing for aggregate operations on these groups. To merge data rows, you need to fill in the column field from the dropdown list;

### **Sorting**

Fields for configuring the process of ordering data in the result set in a specific order based on the values in one or more columns. To sort in ascending order, you need to enter "ASC" in the "Sort By" field. To sort in descending order, enter "DESC". Then you need to fill in the "Column" field from the dropdown list;

### **Row Count**

The field is filled in manually from the keyboard or using the counter ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeptwsNfuXeBVsM5ITGuxu3Tk4Y-JS6u91ngfYj8jnBT8RRxSo09Eye1mhEKPaxYQQApQAA4g7ohGinnWFeznpGw9tkFSMqqmQZyL0AzL1jv9f3w_8Se6hCiwAb5JBjy2geuAxR?key=nCUpXC2iKtVeq12Xi8RnWuyw). This field allows you to limit the number of records returned in the query result for building the Dashboard.

## Testing

To ensure that the request is set up correctly, you need to click the button ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcbp8LyKi6t7wwKr6oCoZ7K1bg0aTKcf0j9tsfjgaSwf4hAwVarepSDi_1h6mapWcJVnG_6f2OV41rJuNM5NYM7LC7rlVLZYwX0TqKY3-T7exIoAfQTif6D2hrkSd3bB58_z7CZ?key=nCUpXC2iKtVeq12Xi8RnWuyw), after which a table with data will appear, based on which the Line Chart Dashboard will be built.

To display the Dashboard on the panel, click the "OK" button.

To delete all filled data, click the "Cancel" button.

Example:

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfeZZZ_2BwjDvX4z9EB68VU998H3r818yPfL1LxagdmXajTXbpGWFXVXQ3UXLVWUXXpJd_Kgc8SmiL6v53nREAUCIDcUwJ1-ec1CLsi-I0dwyVBtN9__XoiPxf8Tv57Dd8rKWfPbA?key=ArGsMFxOZt6u_AfXAA-94iWG" alt=""><figcaption></figcaption></figure>

To display a chart showing the top 10 Queues with the highest number of Tasks, you need to enter the following data in the corresponding fields in the "Widget Settings" window:

## Builder Mode (Example)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdyNC-IlSpfOnvmLpDe0H-49uCcdF4IctTQbdi_U1HUzvl3UX47IaATAFbhJi-UpNBwazJbvqFsKd_3mUQBiWRvxQfBXtBbKeQ4IXzio7sDQtPYaGdI_v-dtBaqHP1WJtEGS_vOwQ?key=ArGsMFxOZt6u_AfXAA-94iWG" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfXTCVn56z_fX-HGwEpQxshnSfyqLvNd3zFeDAU-m4bc3RmGYJx1YJkHNgu69rLSM6Ah6fhCLN_ul_Av_AxwxKw67wzZKrUZ-cOa51SQdByH982cRW62no634zPS6b5wKrCdmppsg?key=ArGsMFxOZt6u_AfXAA-94iWG" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfeauMNpSIiXjf85momrVah8OKosZE6oVnuB4eb2jnz2XtcqN0IQhICR3peB-riw2U8SwIvCSf9S-JthghrM4mhFo1gacMiFkOZ0IRU56zsTqi_sGoUPp9cs0S76ThdppGwNPXtWQ?key=ArGsMFxOZt6u_AfXAA-94iWG" alt=""><figcaption></figcaption></figure>

You need to fill in the fields:

**Tables \***

*queues*

*tasks*

*task\_statuses*

**Table Join**

| **Column**     | **Operator** | **Column 2**          |
| -------------- | ------------ | --------------------- |
| *queues.id*    | *=*          | *tasks.queue\_id*     |
| *tasks.status* | *=*          | *task\_statuses.code* |

**Widget Series**

| **Column**    |         | **Series Name** |
| ------------- | ------- | --------------- |
| *queues.name* |         | *name*          |
| *tasks.id*    | *COUNT* | *count*         |

**Group By**

*queues.name*

**Row Count**

*10000*

## Advanced Mode (Example)

You need to fill in the field:

**SQL**

```sql
SELECT
	count(tasks.id) AS count,
	queues.name AS name
FROM
	queues LEFT JOIN tasks ON queues.id=tasks.queue_id
	LEFT JOIN task_statuses ON tasks.status=task_statuses.code
WHERE
	queues.is_deleted=0 AND tasks.is_deleted=0
GROUP BY
	queues.name
LIMIT 10000
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-orchestrator/rabota-v-sherpa-orchestrator/ekrany/obzor/line-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
