V2.9 - Problem Understanding Charts

I’m starting to dabble into charts now, and I’m having a hard time understanding how to get New-UDChart and Out-UDChartData to do what I want.
This is an example of what my data looks like.

    $data = @(
        Service = 'Exchange'
        Size = 124
        Service = 'SharePoint'
        Size = 650
        Service = 'OneDrive'
        Size = 81

Here is how it’s being presented to New-UDChart

New-UDLayout -Columns 2 -Content {
    # Bar Chart
    New-UDChart -Type Bar -Endpoint {
        $Data|Out-UDChartData -DataProperty 'Size' -LabelProperty 'Service'
    } -Height '500px' -Width '100%'

    # Pie Chart
    New-UDChart -Type Doughnut -Endpoint {
        $Data|Out-UDChartData -DataProperty 'size' -LabelProperty 'service'
    } -Height '500px' -Width '100%' `


This is what it looks like,

I am good with the layout for the most part, but want to assign colors to each of the services manually.
Also for the bar graph I’d like the legend to be, like the Doughnut chart, but it’s not that important if it ends up making it more complicated.

I’ve been racking my head for the last 2 days, reading the docs, forums etc. I’m sure I’m just missing something simple.
Any help would be appreciated.

If you want to have colours you need multi datasets, see the example here:
Looking at your code, it’s only being interpreted as a single dataset - e.g size
Try it like this:

$services = @{

    Label = "Service"

    Exchange = 124

    Sharepoint = 650

    OneDrive = 81


New-UdChart -Title "Services" -Type Bar -AutoRefresh -Endpoint {

    $services | Out-UDChartData -labelproperty "Label" -Dataset @(

                                New-UdChartDataset -DataProperty "Exchange" -Label "Exchange" -BackgroundColor "#80962F23" -HoverBackgroundColor "#80962F23"

                                New-UdChartDataset -DataProperty "Sharepoint" -Label "Sharepoint" -BackgroundColor "#8014558C" -HoverBackgroundColor "#8014558C"

                                New-UdChartDataset -DataProperty "OneDrive" -Label "OneDrive" -BackgroundColor "#2014558C" -HoverBackgroundColor "#2014558C"



Ok so I need to adjust my input object for Out-UDChartData to handle it properly.
I’ll give that a try, thanks @insomniacc!