Hi,
Is there an option to hide the labels on the X axis on a chart.
Or even better, is there a place where one can see all available -option options?
/Rene
Hi,
Is there an option to hide the labels on the X axis on a chart.
Or even better, is there a place where one can see all available -option options?
/Rene
All the options are available in the ChartJS Docs. They differ per type of chart. You should be able to use this hashtable to hide labels:
@{
scales = @{
xAxes: @(
ticks = @{
display = $false
}
)
}
}
Cool thanks for the link.
With your code added to the -options parameter, I get a " The term ‘ticks’ is not recognized as the name of a cmdlet,…"
-Options @{
scales = @{
xAxes = @(
ticks = @{
display = $false
}
)
}
}
Whoops. Missed some curly braces:
-Options @{
scales = @{
xAxes = @(
@{
ticks = @{
display = $false
}
}
)
}
}
You are a blessing Adam!
it worked right out of the box.
For any other readers, an example of multiple options on a chart is below:
-Options @{
legend = @{
display = $false
};
scales = @{
xAxes = @(
@{
ticks = @{
display = $false
}
}
)
}
}
I know this is an old post, but I needed to do this today, so searched for help on here…well I found as UD is so awesome and versatile you can also add more than one option this way:-
-Options (
New-UDBarChartOptions -TooltipOptions (New-UDChartTooltipOptions -TitleFontSize 18 -BodyFontSize 18) -LegendOptions (New-UDChartLegendOptions -Hide)
)