Closed high101bro closed 3 years ago
Your example isn't working - it uses non-existing Time property. Pie charts needs Value to show charts as far as I understand them. Upon fixing example I was able to reproduce it and fixing the issue.
# Define data
$DataTable = @(
[PSCustomObject] @{
Name = '192.168.0.1'
ComputerName = 'host1'
Value = 12
}
[PSCustomObject] @{
Name = '192.168.0.2'
ComputerName = 'host2'
Value = 15
}
[PSCustomObject] @{
Name = '192.168.0.3'
ComputerName = 'host3'
Value = 17
}
)
# Define HTML
New-HTML {
New-HTMLTable -DataTable $DataTable -DataTableID 'NewIDtoSearchInChart'
New-HTMLChart {
New-ChartToolbar -Download
foreach ($Object in $DataTable) {
New-ChartPie -Name $Object.Name -Value $Object.Value
}
# Define event
New-ChartEvent -DataTableID 'NewIDtoSearchInChart' -ColumnID 0
}
} -ShowHTML -FilePath $PSScriptRoot\Example-ChartsWithTablesDecimal.html -Online #-Format
There were 2 problems:
192\.168\.
which is not going to work This is now fixed and will be in the next release.
Issue:
When clicking on a chart/pie, the html table does not lookup/find data that contains strings with decimals. In my example, the name keys contain IP addresses that I want to quickly lookup in the html table. My own current personal fix is replacing decimals with comas, though this is a band-aide fix for linking the data... not search-friendly though.
Expected Actions:
My datasets have values with decimals in them. Clicking on the charts/pies should easily find data within the html table without me having to modify the data.