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

Color Parameter of New-Chartbar override other color of Bar Chart #369

Closed crimsonread closed 1 year ago

crimsonread commented 1 year ago

Hi,

If I specify colors on New-ChartBar, it overrides other color of Bar chart. If I set colors on the first New-ChartBar cmdlet, it overrides the other color of other New-ChartBar cmdlet even though I specify different color.

  New-ChartBar -Name '2022' -Color Violet,YellowGreen -Value 20,130
  New-ChartBar -Name '2023' -Color Blue,Orange -Value 10,140
  New-ChartBarOptions -Type barStacked100Percent 

msedge_GmdXYgWjF2

PrzemyslawKlys commented 1 year ago

Yes, it doesn't work that way. You can't have different colors on different Bars. 2 values on chart bar means 2 colors only in total.

Colors property was added to fix:

You still have to use either Legend to provide colors once for both values of a bar, or you could use one per bar which will build up the colors properly.

crimsonread commented 1 year ago

Okay. I see. Thank you.