adamdriscoll / poshprotools

PowerShell Pro Tools and Universal Dashboard
https://ironmansoftware.com/
104 stars 24 forks source link

Overlap of input controls on Chart #214

Closed adamdriscoll closed 6 years ago

adamdriscoll commented 6 years ago

https://files.gitter.im/ironmansoftware/show-off/4SC7/inputs.gif

adamdriscoll commented 6 years ago

@mattmcnabb - What browser were you using? I can't repro this. An example dashboard might help too. Thanks!!

mattmcnabb commented 6 years ago

Might have been quantum. I'll check it out in others to verify.

mattmcnabb commented 6 years ago

Pretty much looks the same in all browsers for me. Here's a shot of Edge, Chrome, and FF Quantum

image

Is it possible it's more of a resolution/DPI thing? Also, TBH this is not a huge deal to me. I'm really happy to get the chart inputs in there at all. That's a huge win. Thanks!

mattmcnabb commented 6 years ago

Sorry, I forgot to include an example dashboard. here's an example:

$Dashboard = New-UDDashboard -Title "Testing input overlap" -Content {
    New-UDRow -columns {
        New-UDColumn -size 6 -Content {
            New-UDChart -Type Line -Endpoint {
                param ($TimeRange, $ToCurrency)

                $Data = @(
                    [PSCustomObject]@{Day = 1; Value = 33}
                    [PSCustomObject]@{Day = 2; Value = 48}
                    [PSCustomObject]@{Day = 3; Value = 27}
                    [PSCustomObject]@{Day = 4; Value = 39}
                    [PSCustomObject]@{Day = 5; Value = 55}
                    [PSCustomObject]@{Day = 6; Value = 62}
                    [PSCustomObject]@{Day = 7; Value = 88}
                )
                $Data | Out-UDChartData -LabelProperty Day -DataProperty Value
            } -FilterFields {
                New-UDInputField -Type select -Name TimeRange -Values @("1H", "1D", "1W", "1M", "1Y", "5Y") -DefaultValue "1D"
                New-UDInputField -Type select -Name ToCurrency -Values @("USD", "ETH", "LTC") -DefaultValue "USD"
            }
        }
    } 
}

Start-UDDashboard -Dashboard $Dashboard -port 8080

image

The overlap only seems to occur in a sized column. If I place the chart right inside the dashboard content scriptblock, I don't see the overlap. So here's the same chart but without the row and column formatting:

$Dashboard = New-UDDashboard -Title "Testing input overlap" -Content {
    New-UDChart -Type Line -Endpoint {
        param ($TimeRange, $ToCurrency)

        $Data = @(
            [PSCustomObject]@{Day = 1; Value = 33}
            [PSCustomObject]@{Day = 2; Value = 48}
            [PSCustomObject]@{Day = 3; Value = 27}
            [PSCustomObject]@{Day = 4; Value = 39}
            [PSCustomObject]@{Day = 5; Value = 55}
            [PSCustomObject]@{Day = 6; Value = 62}
            [PSCustomObject]@{Day = 7; Value = 88}
        )
        $Data | Out-UDChartData -LabelProperty Day -DataProperty Value
    } -FilterFields {
        New-UDInputField -Type select -Name TimeRange -Values @("1H", "1D", "1W", "1M", "1Y", "5Y") -DefaultValue "1D"
        New-UDInputField -Type select -Name ToCurrency -Values @("USD", "ETH", "LTC") -DefaultValue "USD"
    }
}

Start-UDDashboard -Dashboard $Dashboard -port 8080

image

mattmcnabb commented 6 years ago

Personally I kind of like the look of the input selectors when they're scrunched together rather than spread across the bottom of the chart. All that really needs to happen is to expand the chart card's bottom downward to encapsulate the input control. Not sure how that would be achieved, but again, no biggie from my perspective.

adamdriscoll commented 6 years ago

This is fix in the next build. Controls will stack horizontally and won't overlap.

adamdriscoll commented 6 years ago

1.3.0-beta5