How do I make it just a line? without the fill?
New-UDChart -Title “YourChartTitle” -Type Line -Endpoint {…
Just use the -type parameter and set it to line
that is set but it still do the “Fill: Start”
https://www.chartjs.org/samples/latest/charts/area/line-boundaries.html
like the one in the sample here
I want the “Fill: false”
I get this:
This is not a Line chart

I am unable to see the line in the Grey area.
Oh stupid me, I am using the wrong New-UD{Type}ChartDataset.
Changing to the correct one: New-UDLineChartDataset
and I am able to define -fill $null
This is from @adamdriscoll github page:-
New-UDChart -Title "Line Chart without Underfill" -Type "Line" -Endpoint {
$Data | Out-UDChartData -LabelProperty "Animal" -Dataset @(
New-UDLineChartDataset -Label "Animals" -DataProperty Count -BorderColor "#35FF8A" -BorderWidth 3 -Fill $false
)
}
This gives you just a line no fill
Hi @McAndersDK.
How do you prepare your dataset with multiple lines ?
I have a CSV with dates, keys and counts. But the keys will be multiple times and the count different on each day.
Example:
date1;key1;4
date1;key2;8
date2;key1;9
date2;key2;3
In this example, I would like to have 2 lines based on key1 and key2.
Cheers.
well, I will post the raw stuff here:
xml have the following content: (one for each data point)
Team 2 : 83
Team 1 : 82
Type : Solved
Team 3 : 181
Team 6 : 24
Team 5 : 42
Team 7 : 34
Time : 10-10-2019 23:17:31
Date : 101019
Team 4 : 142
Team 8 : 40
Team 9 : 49
This is a single “row” in the powershell object.
$imports = get-childitem (join-path $rootpath “\data”) -Filter *.dump | Sort-Object LastWriteTime -Descending | Select-Object -first 1 | Import-Clixml
$TimeFormat = @{n = ‘Time’; e = { get-date $_.time -Format ‘HH:mm’ } }
$imports | Where-Object type -eq $cache:parameterToChart | Select-Object $TimeFormat, ‘Team 1’, ‘Team 2’, ‘Team 3’, ‘Team 4’, ‘Team 5’, ‘Team 6’, ‘Team 7’, ‘Team 8’, ‘Team 9’ | Out-UDChartData -LabelProperty ‘Time’ -Dataset @(
$colors = ‘#E27D60’, ‘#85DCB’, ‘#E8A87C’, ‘#C38D9E’, ‘#41B4a3’, ‘#659DBD’, ‘#89DA59’
$colorindex = 0
foreach ($team in (‘Team 1’, ‘Team 2’, ‘Team 3’, ‘Team 4’, ‘Team 5’, ‘Team 6’, ‘Team 7’, ‘Team 8’, ‘Team 9’)) {
New-UDLineChartDataset -DataProperty $team -Label $team -BackgroundColor $colors[$colorindex] -Fill $false -BorderColor $colors[$colorindex] -BorderWidth 2 -PointHitRadius 20
$colorindex++
}
)
you would need to make your object like this:
date = date1
key1 = 4
key2 = 8
date = date2
key1 = 5
key2 = 61
Ok I will try that out. Thanks for the tips
Thank you very much! I managed to create my chart!
And with the help of this, I even managed random line colors.
oh, the line color is random if you dont specifie the color
I know, it is a while ago, but how did you implement the “golden colors”?
Tried quite a bit, but I don’t get it errorfree
@McAndersDK, as soon as you use New-UDLineChartDataset or similar, your random color is gone (@adam: a bug or intentionally?)