# Table

* [Sort column](#table-sortcolumn)
* [Table options](#table-tableoptions)
  * [Show header](#table-showheader)
  * [Column width](#table-columnwidth)
  * [Minimum column width](#table-minimumcolumnwidth)
* [Column alignment](#table-columnalignment)
* [Cell type](#table-celltype)
  * [Color text](#table-colortext)
  * [Color background (gradient or solid)](#table-colorbackground-gradientorsolid)
  * [Gauge](#table-gauge)
  * [JSON view](#table-jsonview)
  * [Image](#table-image)
  * [Sparkline](#table-sparkline)
* [Cell value inspect](#table-cellvalueinspect)
* [Column filter](#table-columnfilter)
* [Pagination](#table-pagination)
* [Filter table columns](#table-filtertablecolumns)
  * [Turn on column filtering](#table-turnoncolumnfiltering)
  * [Filter column values](#table-filtercolumnvalues)
  * [Clear column filters](#table-clearcolumnfilters)
* [Table footer](#table-tablefooter)
  * [Count rows](#table-countrows)

The table panel visualization is very flexible, supporting multiple modes for time series and for tables, annotation, and raw JSON data. This panel also provides date formatting, value formatting, and coloring options.

***

### Sort column <a href="#table-sortcolumn" id="table-sortcolumn"></a>

Click a column title to change the sort order from default to descending to ascending. Each time you click, the sort order changes to the next option in the cycle. You can sort multiple columns by holding the `shift` key and clicking the column name.

***

### Table options <a href="#table-tableoptions" id="table-tableoptions"></a>

#### Show header <a href="#table-showheader" id="table-showheader"></a>

Show or hide column names imported from your data source.

#### Column width <a href="#table-columnwidth" id="table-columnwidth"></a>

By default, Algology automatically calculates the column width based on the table size and the minimum column width. This field option can override the setting and define the width for all columns in pixels.

#### Minimum column width <a href="#table-minimumcolumnwidth" id="table-minimumcolumnwidth"></a>

By default, the minimum width of the table column is 150 pixels. This field option can override that default and will define the new minimum column width for the table panel in pixels.

For small-screen devices, such as smartphones or tablets, reduce the default `150` pixel value to`50` to allow table based panels to render correctly in dashboards.

***

### Column alignment <a href="#table-columnalignment" id="table-columnalignment"></a>

Choose how Algology should align cell contents:

* Auto (default)
* Left
* Center
* Right

***

### Cell type <a href="#table-celltype" id="table-celltype"></a>

By default, Algology automatically chooses display settings. You can override the settings by choosing one of the following options to set the default for all fields. Additional configuration is available for some cell types.

Note: If you set these in the Field tab, then the type will apply to all fields, including the time field. Many options will work best if you set them in the Override tab so that they can be restricted to one or more fields.

#### Color text <a href="#table-colortext" id="table-colortext"></a>

If thresholds are set, then the field text is displayed in the appropriate threshold color.

#### Color background (gradient or solid) <a href="#table-colorbackground-gradientorsolid" id="table-colorbackground-gradientorsolid"></a>

If thresholds are set, then the field background is displayed in the appropriate threshold color.

#### Gauge <a href="#table-gauge" id="table-gauge"></a>

Cells can be displayed as a graphical gauge, with several different presentation types.

**Basic**

The basic mode will show a simple gauge with the threshold levels defining the color of gauge.

**Gradient**

The threshold levels define a gradient.

**LCD**

The gauge is split up in small cells that are lit or unlit.

**Label Options**

Additionally, labels displayed alongside of the gauges can be set to be colored by value, match the theme text color, or be hidden.

#### JSON view <a href="#table-jsonview" id="table-jsonview"></a>

Shows value formatted as code. If a value is an object the JSON view allowing browsing the JSON object will appear on hover.

#### Image <a href="#table-image" id="table-image"></a>

If you have a field value that is an image URL or a base64 encoded image you can configure the table to display it as an image.

#### Sparkline <a href="#table-sparkline" id="table-sparkline"></a>

**Note:** Modify Algology configuration file to enable the `timeSeriesTable` feature toggle to use it.

Shows value rendered as a sparkline. Requires time series to table data transform.

***

### Cell value inspect <a href="#table-cellvalueinspect" id="table-cellvalueinspect"></a>

Enables value inspection from table cell. The raw value is presented in a modal window.

Note: Cell value inspection is only available when cell display mode is set to Auto, Color text, Color background or JSON View.

***

### Column filter <a href="#table-columnfilter" id="table-columnfilter"></a>

You can temporarily change how column data is displayed.

***

### Pagination <a href="#table-pagination" id="table-pagination"></a>

Use this option to enable or disable pagination. It is a front-end option that does not affect queries. When enabled, the page size automatically adjusts to the height of the table.

***

### Filter table columns <a href="#table-filtertablecolumns" id="table-filtertablecolumns"></a>

If you turn on the **Column filter**, then you can filter table options.

#### Turn on column filtering <a href="#table-turnoncolumnfiltering" id="table-turnoncolumnfiltering"></a>

1. In Algology, navigate to the dashboard with the table with the columns that you want to filter.
2. On the table panel you want to filter, open the panel editor.
3. Click the **Field** tab.
4. In Table options, turn on the **Column filter** option.

A filter icon appears next to each column title.

#### Filter column values <a href="#table-filtercolumnvalues" id="table-filtercolumnvalues"></a>

To filter column values, click the filter (funnel) icon next to a column title. Algology displays the filter options for that column.

Click the check box next to the values that you want to display. Enter text in the search field at the top to show those values in the display so that you can select them rather than scroll to find them.

#### Clear column filters <a href="#table-clearcolumnfilters" id="table-clearcolumnfilters"></a>

Columns with filters applied have a blue funnel displayed next to the title.

To remove the filter, click the blue funnel icon and then click **Clear filter**.

***

### Table footer <a href="#table-tablefooter" id="table-tablefooter"></a>

You can use the table footer to show calculations on fields.

After you enable the table footer:

1. Select the **Calculation**
2. Select the **Fields** that you want to calculate

The system applies the calculation to all numeric fields if you do not select a field.

#### Count rows <a href="#table-countrows" id="table-countrows"></a>

If you want to show the number of rows in the dataset instead of the number of values in the selected fields, select the **Count** calculation and enable **Count rows**.

***
