Charts
Charting components for Universal Dashboard.
Universal Dashboard provides several built-in charting solutions to help visualize your data retrieved from PowerShell.
ChartJS
Universal Dashboard integrates with ChartJS.
Creating a Chart
To create a chart, use New-UDChartJS and New-UDChartJSData. The below chart shows the top ten CPU using processes.

Types
Bar

Stacked Bar

Horizontal Bar

Line

Doughnut

Pie

Radar

Colors
Colors can be defined using the various color parameters of New-UDChartJS.

Data Sets
By default, you do not need to define data sets manually. A single data set is created automatically when you use the -DataProperty and -LabelProperty parameters. If you want to define multiple data sets for a single chart, you can use the -Dataset property in conjunction with New-UDChartJSDataset.

Click Events
You can take action when a user clicks the chart. This example shows a toast with the contents of the $Body variable. The $Body variable contains a JSON string with information about the elements that were clicked.

Auto refreshing charts
You can use New-UDDynamic to create charts that refresh on an interval.

Monitors
Monitors are a special kind of chart that tracks data over time. Monitors are good for displaying data such as server performance stats that change frequently. You return a single value from a monitor and it is graphed automatically over time.

Options
The New-UDChartJS cmdlet supports accepting advanced ChartJS options. You can use the -Options parameter to pass in a hashtable.
This example hides the legend.
Nivo Charts
Universal Dashboard integrates with Nivo Charts. Below you will find examples and documentation for using these charts.
Creating a Chart
All the Nivo charts can be created with New-UDNivoChart. You will specify a switch parameter for the different types of charts. Each chart type will take a well defined data format via the -Data parameter.

Patterns
Nivo provides the ability to specify patterns to display over data sets. You can configure these patterns with New-UDNivoPattern and New-UDNivoFill .

Responsive Widths
Nivo charts provide responsive widths so they will resize automatically when placed on a page or the browser is resized. A height is required when using responsive widths.

Auto Refreshing Charts
Like many components in Universal Dashboard v3, Nivo charts do not define auto-refresh properties themselves. Instead, you can take advantage of New-UDDynamic to refresh the chart on an interval.

OnClick
Nivo charts support OnClick event handlers. You will be provided with information about the data set that was clicked as JSON.

Types of Charts
Bar
Bubble

Calendar

Heatmap

Line

Stream

Treemap

Last updated
Was this helpful?