Customize Azure Data Explorer dashboard visuals
Visuals are essential part of any Azure Data Explorer Dashboard. For a full list of available visuals, see Visualization. In this article, you'll learn how to customize different visuals. For general information, see Visualize data with Azure Data Explorer dashboards.
Note
You must have dashboard editing permissions to customize dashboards.
Prerequisites
Customize visuals
To make any changes in your dashboard, you'll first need to switch from viewing to editing mode.
On the top menu, select Viewing and toggle to Editing mode.
Browse to the tile you wish to change. Select the Edit icon
Once you've finished making changes in the visual pane, select Apply changes to return to the dashboard and view your changes.
Select properties to customize visuals
Use the following properties to customize visuals.
Section | Description | Visual types |
---|---|---|
General | Select the stacked or non stacked chart format | Bar, Column, and Area charts |
Data | Select source data Y and X Columns for your visual. Keep the selection as Infer if you want the platform to automatically select a column based on the query result | Bar, Column, Scatter, and Anomaly charts |
Legend | Toggle to show or hide the display of legends on your visuals | Bar, Column, Area, Line, Scatter, Anomaly chart and Time charts |
Y Axis | Allows customization of Y-Axis properties: Label: Text for a custom label. Maximum Value: Change the maximum value of the Y axis. Minimum Value: Change the minimum value of the Y axis. |
Bar, Column, Area, Line, Scatter, Anomaly, and Time charts |
X Axis | Allows customization of X-axis properties. Label: Text for a custom label. |
Bar, Column, Area, Line, Scatter, Anomaly, and Time charts |
Render links | Toggle to make links that start with "https://" in tables, clickable. Apply on columns: Select columns containing URL. |
Table |
Layout | Select the layout configuration for multi stat visual. Apply on columns: Select columns containing URL. |
Multi stat |
Dashboard-specific visuals
Plotly (preview)
To render a Plotly visual, the query must generate a table with a single string cell containing Plotly JSON. This Plotly JSON string can be generated by one of the following methods:
- Dynamically create the string in Python using the Plotly package. This process uses the python() plugin.
- Retrieve the string from a table that stores pre-cooked Plotly JSON templates. Update the required data fields using KQL string manipulation functions.
The following KQL query uses inline Python to create the 3D scatter chart:
OccupancyDetection
| project Temperature, Humidity, CO2, Occupancy
| where rand() < 0.1
| evaluate python(typeof(plotly:string),
```if 1:
import plotly.express as px
fig = px.scatter_3d(df, x='Temperature', y='Humidity', z='CO2', color='Occupancy')
fig.update_layout(title=dict(text="Occupancy detection, plotly 5.11.0"))
plotly_obj = fig.to_json()
result = pd.DataFrame(data = [plotly_obj], columns = ["plotly"])
```)
Note
For best performance, make sure that the python plugin image contains the latest versions of both the Python engine (currently 3.10.8) and Plotly package (currently 5.11.0). These versions can be checked with the get_packages_version_fl() function. If you need to upgrade the image please contact us (shortly it would be self service). Plotly visuals are useful for advanced charting including geographic, scientific, machine learning, 3d, animation and many other chart types. For more information, see Plotly.
Conditional formatting
Note
This feature is supported for table, stat and multi stat visuals.
Conditional formatting is used to format the visual data points by their values using colors, tags, and icons. Conditional formatting can be applied to a specific set of cells in a predetermined column or to entire rows. Each visual can have one or more conditional formatting rules defined. When multiple rules conflict, the last rule will override previous rules.
Add a conditional formatting rule
Enter the editing mode of the table, stat, or multi stat visual you wish to conditionally format.
In the Visual formatting pane, scroll to the bottom and toggle Conditional formatting to Show.
Select Add rule. A new rule appears with default values.
Select the Edit icon. The Conditional formatting pane opens. You can either Color by condition or Color by value.
Color by condition
In this example, we're going to create a rule that will color the cells of states in which the damage column is a value greater than zero. Enter the following information:
Field Description Suggested value Rule type Condition-based rules or absolute value-based rules. Color by condition Rule name Enter a name for this rule. If not defined, the condition column will be used by default. Nonzero damage Color style Color formatting cell fill or text. Bold Conditions Column The column to be used for the condition definition. Damage Operator The operator to be used to define the condition. Greater than ">" Value The value to be compared to the condition. Formatting Apply options Apply the formatting to cells in a specific column or to the entire row. Apply to cells Column The column on which the formatting is applied. By default, this column is the condition column. This option is only available when Formatting: Apply options is set to Apply to cells. State Hide text Hides the text in the formatted column. This option is only available when Formatting: Apply options is set to Apply to cells. Off Color The color to apply to the formatted column/rows. Red Tag Optional tag to add to the formatted column. This option is only available when Formatting: Apply options is set to Apply to cells. Blank Icon Optional icon to add to the formatted column. This option is only available when Formatting: Apply options is set to Apply to cells. No icon Select Save. The visual will now be colored conditionally. Note in this example that the State column is highlighted when the Damage column is greater than zero.
Color by value
In this example, we're going to create a rule that will color the cells of event count on a gradient determined by the value of this count. Enter the following information:
Field Description Suggested value Rule type Condition-based rules or absolute value-based rules. Color by value Rule name Enter a name for this rule. If not defined, the condition column will be used by default. Event count Column The column to be used for the condition definition. event Theme Color scheme. Cold Min value Optional minimum value for conditional coloring. Max value Optional maximum value for conditional coloring. Apply options Apply the formatting to cells in a specific column or to the entire row. Apply to cells Select Save. The visual will now be colored conditionally. Note the color changes based on the value in the event column.