New-UDChartJS not Rendering Line Chart as per Docs

Resolved

New-UDChartJS not Rendering Line Chart as per Docs

avatar
(anonymous user)
Product: PowerShell Universal
Version: 4.0.1

Line chart rendered in docs has fill and smoothed lines (I believe this is “bezierCurve” in ChartJS speak). Actual line chart has neither of these features.

We are testing an upgrade from 2.12.6 where the line charts are rendering as expected.

Example Code

 $Data = Get-Process | Sort-Object -Property CPU -Descending | Select-Object -First 10 
 New-UDChartJS -Type 'line' -Data $Data -DataProperty CPU -LabelProperty ProcessName

Expected Output as per Documentation (top) versus Actual Rendering (bottom)

I’ve had to combine these into one image since new users are only allowed a single embedded image

avatar

Recommended Answer

I can reproduce this. You can work around it by using a dataset and passing in the additional parameters.

$Options = @{
   fill = $true 
   tension = 0.4
}
New-UDChartJSDataSet -AdditionalOptions $Options # ...

That said, we’ll make this the default in 4.0.2

Adam Driscoll

PowerShell Expert and Software Architect at Devolutions

All Comments (6)

avatar

+1 for this - I’m seeing this exact same behaviour

avatar

I can reproduce this. You can work around it by using a dataset and passing in the additional parameters.

$Options = @{
   fill = $true 
   tension = 0.4
}
New-UDChartJSDataSet -AdditionalOptions $Options # ...

That said, we’ll make this the default in 4.0.2

Adam Driscoll

PowerShell Expert and Software Architect at Devolutions

avatar
(anonymous user)

Thanks Adam, that works. Looks like 4.0.2 is imminent, so we’ll hang fire for that