Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,21 @@ filters and get a table or a chart.

```powershell
Install-PSResource -Name PowerShellUniversal.Component.Pivot
New-UDPivotReport -Id 'python' -Data (Invoke-RestMethod 'https://endoflife.date/api/python.json')

# $days: one row per city and day with City, Date and Temperature
New-UDPivotReport -Id 'weather' -Data $days -View @{
derived = @(@{ name = 'Month'; field = 'Date'; by = 'month' })
rows = @('Month'); cols = @('City')
values = @(@{
field = 'Temperature'; agg = 'average'; format = 'number:1'
conditional = @{ type = 'colorScale'; colors = @('#2a78d6', '#f2f2f2', '#eb6834') }
})
}
```

The full example, with the call that loads the weather data and the layout of the picture:
[Weather of six cities](pivot/index.md#weather-of-six-cities).

[PowerShell Gallery](https://www.powershellgallery.com/packages/PowerShellUniversal.Component.Pivot) ·
[pivotkit docs](https://pivotkit.eize.dev/) · [Live demo](https://pivotkit.eize.dev/demo/) ·
[How readers use the report](https://pivotkit.eize.dev/use/) · [Module versioning](versioning.md)
Expand Down
Loading