Closed amanfromfrance closed 3 years ago
Try giving a type
New-ChartAxisX -Name $test.time -Type datetime
Your problems with zeros is the same as https://github.com/EvotecIT/PSWriteHTML/issues/234 and it's now fixed in sources and it will be released to preview later on today
Thanks for your feedback PrzemyslawKlys!
Try giving a type
New-ChartAxisX -Name $test.time -Type datetime
I have tried this with no sucess, I still see the index values.
I saw what you explained in #234 and tried to install the pre-release module using your command:
Install-Module PSWriteHTML -AllowPrerelease
With this version I only get empty charts:
Nah, it's not released with a fix for you. But once I release it, it should work.
That's what I get on my version:
Import-Module .\PSWriteHTML.psd1 -Force
$test = @(
@{date = "May 4"; time = "00:02:47"; participantNumber = 0 }
@{date = "May 4"; time = "00:07:47"; participantNumber = 0 }
@{date = "May 4"; time = "00:12:47"; participantNumber = 3 }
@{date = "May 4"; time = "00:17:47"; participantNumber = 2 }
@{date = "May 4"; time = "00:22:47"; participantNumber = 1 }
@{date = "May 4"; time = "00:27:47"; participantNumber = 2 }
@{date = "May 4"; time = "00:32:47"; participantNumber = 3 }
@{date = "May 4"; time = "00:37:47"; participantNumber = 4 }
@{date = "May 4"; time = "00:42:47"; participantNumber = 5 }
@{date = "May 4"; time = "00:47:47"; participantNumber = 10 })
New-HTML -TitleText 'Charts - TimeLine' -Online -FilePath "$PSScriptRoot\Example-ChartsLine1.html" {
New-HTMLSection -Name 'Total number of Calls' -Collapsable -TextBackGroundColor "#000000" -TextColor "#ff7900" {
New-HTMLPanel -Invisible {
New-HTMLChart {
New-ChartAxisX -Name $test.time
ChartLegend -Name 'Calls Number'
New-ChartLine -Name 'Participants Number' -Value $test.participantNumber -Color "#ff7900"
New-ChartAxisY -Show -TitleText 'Time'
}
}
}
} -ShowHTML
You can try it yourself, now.
Install-Module PSWriteHTML -AllowPrerelease
indeed, now it works! Thanks for your support PrzemyslawKlys!
Hello PrzemyslawKlys,
I am opening an issue on GitHub so that my problem is easier to track (sorry for my emails).
I am trying to plot line charts and while it was working as expected using the old "Dashimo" module, I've noticed that now with "PSWriteHTML" I have an issue with the data that is set as the ChartLine values.
For example in the code below the 2 first values are 0s:
Instead of the line chart I see only one plot:
If I replace the 2 first values with digits greater than 0:
Now the graph displays:
However, the time values are replaced by an index value and everything I tried was unsuccessful.
Thanks!