EvotecIT / PSWriteHTML

PSWriteHTML is PowerShell Module to generate beautiful HTML reports, pages, emails without any knowledge of HTML, CSS or JavaScript. To get started basics PowerShell knowledge is required.
MIT License
826 stars 106 forks source link

New-HTMLGage title #222

Closed tomerikko closed 3 years ago

tomerikko commented 3 years ago

hi, in "New-HTMLGage" what is the diff between "-Title" & "-Label" ? also, any chance we can get a font size for the title in that widget as well?

PrzemyslawKlys commented 3 years ago

image

Visitors is a title, per minute is a label. I don't see font size for Title in docs for https://github.com/toorshia/justgage

I can see it for labels and values. I guess one could try to add it to JS code, make a PR and then use it.

tomerikko commented 3 years ago

i cannot make the title work (using 0.0.148 ver) That example you shared above, could it be that its an old image?

here is a sample code:

Import-Module .\PSWriteHTML.psd1 -Force

New-HTML -TitleText 'This is a test' -FilePath "$PSScriptRoot\Example32-01.html" {
    New-HTMLGage -Label 'Fixes' -MinValue 0 -MaxValue 100 -Value 50 -Counter -Title 'This is my title' -LabelColor Blue -BackgroundGaugageColor Almond

        } -ShowHTML -Online
result of this is:

image

As can be seen, label is there, but not the title.

PrzemyslawKlys commented 3 years ago

It would seem in 1.2.6 version title was removed, so yes.

PrzemyslawKlys commented 3 years ago

But you can build it this way:

        New-HTMLPanel {
            New-HTMLText -Text 'Title' -Color Red -Alignment center -FontSize 20px
            New-HTMLGage -Label 'Fixes' -MinValue 0 -MaxValue 100 -Value 50 -Counter
        }
        New-HTMLPanel -Invisible {
            New-HTMLText -Text 'Title' -Color Red -Alignment center -FontSize 20px
            New-HTMLGage -Label 'Fixes' -MinValue 0 -MaxValue 100 -Value 50 -Counter
        }

image

tomerikko commented 3 years ago

That's a great workaround. THANKSSSSSSSSSSSSSSSS