This article introduces the specific features of sparklines in visualization charts.
Feature overview
A sparkline is a small chart suitable for placement within a single cell of a table. Sparklines are highly compact and can be placed next to metrics to highlight time trends with prominent visual effects and a concise presentation.

Quick start
- Create a table and configure the dimensions and metrics to be viewed.

- Add a sparkline to the metric. Click the arrow on the metric button and select Add sparkline.

- Select the date field. The sparkline will use the selected date field as the horizontal axis and the current metric as the vertical axis, displaying the metric trend as a line chart.

Parameter configuration instructions:
Parameters | Configuration description |
|---|
Y-axis | Use the current metric field as the Y-axis of the sparkline. |
X-axis | Use the selected date field as the X-axis of the sparkline. |
Date filter | - Based on the current table filter conditions.

- Use the [date field] in the table filter as the base, and count back [N] days.

|
- A sparkline field will be generated in the configuration panel, which can be dragged to adjust the field order. The sparkline field in the table will display the metric trend for each dimension.

Add sparkline
warning
V2.78.0 and later versions support adding up to 9 sparkline columns.
If there are already 9 sparkline columns, a prompt will appear when you try to add more: Only up to 9 sparkline columns can be added.
The Y axis, X axis, and date filter conditions for the sparkline must be configured.

- Y axis: Select the metric field to be displayed in the sparkline. You can modify the aggregation method, field information, and data format of the metric field here.

Configuration items | Configuration description |
|---|
Aggregation method | The metric field displays the aggregated result in the chart. For details, see Metric Field Configuration. |
Set field information | Set the field name and chart display name (this refers to the sparkline Y-axis name).
 |
Set data format | For numeric fields, you can set the data format. For details, see Metric Field Configuration. |
- X axis: Select the date field to be displayed in the sparkline. You can modify the field information, date type, date display format, and whether to fill missing dates here.

Configuration items | Configuration description |
|---|
Date type | Supports selecting year, quarter, bimonth, month, biweekly, week, day, and dates within a specific period as the X-axis date. |
Date display format | For different date types, different date display formats are provided. For example, when the date type is set to week, Wednesday can be displayed as Auto or Wednesday. |
Date completion | When there is no data for certain days within the selected date range, you can use the date fill feature to display the missing dates. |
Set field information | Set the field name and the chart display name, which refers to the X-axis name of the sparkline.
 |
- Date filter
- If the selected field has already been filtered by date, that is, if there is a date filter condition for the field in the filter panel, the date range for the sparkline can be selected as follows:
- According to the current table filter conditions, the date range will match the current filter, displaying trend data for the current time period.
- Use the X axis field in the table filter as the baseline and extend backward by X time points, that is, expand the date range backward. For example, if the table selects the date range "2021/12/20-2021/12/31" and extends backward by 1 day, the sparkline date range will be "2021/12/19-2021/12/31".
- As shown in the figure below, the actual date range of the sparkline will also be displayed in the table header.

Adjust field order
You can quickly adjust the order of fields in the configuration bar by dragging them to optimize the display.

Set sparkline style
In the chart style configuration area, you can set the sparkline's color, marker points, line style, and whether to display tooltips information.

- Select the sparkline whose style you want to configure.

- Set the style to change the sparkline's color, marker point style, line style, and whether to display tooltip information.

Style settings | Default | Configured |
|---|
Data color | - Blue

| - Green

|
Marker | - No markers

| - With markers

|
Line | - Line

| - Smooth

|
Display tooltip | - On: When you hover the mouse over a data point in the sparkline, the specific data for the horizontal and vertical axes will be displayed.

| - Off: When you hover the mouse over a data point in the sparkline, the tooltip will not be displayed.

|
Edit sparkline
After creating a sparkline, you can modify the X-axis, Y-axis, and date filter conditions.
- Click the arrow on the corresponding sparkline field capsule and select Edit sparkline.

- Make modifications in the pop-up configuration box.

Delete sparkline
To delete a sparkline, click the "x" next to the sparkline field.
