0

I'm fiddling with excel graphs created in a perl script and trying to set minimum and maximum axes however I don't seem to be able to get my head around the VBA to Perl Conversion.

Please can you help.

I have tried this a few different ways, but here is what I have now.

   $chart1->{Chart}->Axes(xlCategory)->MinorUnit => 0;
   $chart1->{Chart}->Axes(xlCategory)->MajorUnit => 100;

I have also tried the following.

   $chart1->{Chart}->Axes(xlCategory)->MinimumScale => 0;
   $chart1->{Chart}->Axes(xlCategory)->MaximumScale => 100;

Many thanks in advance.

Micro

MicrobicTiger
  • 577
  • 2
  • 5
  • 21

1 Answers1

0

After a bit of searching and some trial and error I managed to sort this one out. The required code was as follows.

For the x axis;

$chart1->{Chart}->Axes(xlCategory,xlPrimary)->{MinimumScale} = 0;
$chart1->{Chart}->Axes(xlCategory,xlPrimary)->{MaximumScale} = 100;

And For the y axis;

$chart1->{Chart}->Axes(xlValue,xlPrimary)->{MinimumScale} = 0;
$chart1->{Chart}->Axes(xlValue,xlPrimary)->{MaximumScale} = 100;
MicrobicTiger
  • 577
  • 2
  • 5
  • 21