New-UdChartJS format axes

Hi,

I’m searching for a possibility to format the axes of a new chart.
The data includes an integer value, but the chart shows decimal values at the xAxes.

I tried the options parameter, but can’t get it fix.

$Options = @{
Options = @{
scales = @{
xAxes = @(
@{
#beginAtZero = $true
height = 200
}
)
#yAxes = @(
# @{
# #
# }
#)
}
}
}

I tried the ‘beginAtZero’ and I tried a fix Value.

Thanks in advance

Gunnar

Does some one has got a solution?
Chart

Hello @gtiegel and welcome,

you need to configure the stepSize like this:

$NewUDChartJSParams = @{
    Type = 'bar'
    Data = $Data
    DataProperty = 'xxx'
    LabelProperty = 'xxx'
    Options = @{
        scales = @{
            yAxes = @(
                @{
                    ticks = @{
                        beginAtZero = $true
                        stepSize = 5
                    }
                }
            )
        }
    }
}
New-UDChartJS @NewUDChartJSParams

1 Like

Hi @psott ,

thank you very much.
It works :slight_smile: