I've wrote the following code to create a chart in Excel, but I need to specify the Y Axis to be fixed at 100 instead of set to the default of Auto.
# Generate graph $xRow = 1 $yRow = $rows $objRange=$Worksheet.range("a${xRow}:c${yRow}") $colCharts=$excel.Charts $objChart=$colCharts.Add() $objChart.ChartType=4 $objChart.Axes(0).CategoryType=2 $objChart.Axes(0).TickLabelSpacing=7 $objChart.HasTitle = $true $objChart.ChartTitle.text = "Report" $a=$objChart.Activate
I've tried $objChart.Axes(0).Maximum = 100 and also .Minimum and .MaximumScaling and .Scaling.Maximum but none of these have worked. Does anyone know the correct command?
Thanks in advance