Skip to content

Values with decimals do not auto-find within html table when clicking on charts/pies  #209

@high101bro

Description

@high101bro

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.

# Define data
$DataTable = @(
    [PSCustomObject] @{
        Name  = '192.168.0.1'
        ComputerName = 'host1'
    }
    [PSCustomObject] @{
        Name  = '192.168.0.2'
        ComputerName = 'host2'
    }
    [PSCustomObject] @{
        Name  = '192.168.0.3'
        ComputerName = 'host3'
    }
)

# 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.Time
        }
        # Define event
        New-ChartEvent -DataTableID 'NewIDtoSearchInChart' -ColumnID 0
    }
} -ShowHTML -FilePath $PSScriptRoot\Example-ChartsWithTablesPie.html -Online #-Format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions