Hi Monks,

I am using MS Excel application to draw graph and then exporting the graph to an html page.

Part of my script which is generating Graph is as follows.

my $Range = $Sheet->Range("B1:D$row"); my $Chart = $Sheet->ChartObjects; my $AgeChartContainer = $Chart->Add(200,30,500,300); my $AgeChart = $AgeChartContainer->Chart; $AgeChart->{ChartType} = $Constant->{xlLineMarkers}; $AgeChart->Location($Constant->{xlLocationAsObject}, $Sheet->{ +Name}); $AgeChart = $Excel->ActiveChart; $AgeChart->{ChartType} = xlLineMarkers; $AgeChart->SetSourceData({Source => $Range, PlotBy => xlColumns} +); $AgeChart->SeriesCollection(1)->{XValues}= "=Sheet1!R1C1:R"."$ro +w"."C1"; $AgeChart->{HasTitle} = 1; $AgeChart->{HasLegend} = 1; $AgeChart->Legend->{Position} = xlLegendPositionTop; $AgeChart->SeriesCollection(1)->{Name} = "max"; $AgeChart->SeriesCollection(2)->{Name} = "min"; $AgeChart->SeriesCollection(3)->{Name} = "avg"; $AgeChart->SeriesCollection(2)->{MarkerStyle} = xlDiamond; $AgeChart->SeriesCollection(3)->{MarkerStyle} = xlDiamond; $AgeChart->SeriesCollection(3)->{MarkerForegroundColorIndex} = + 10; $AgeChart->SeriesCollection(3)->{MarkerBackgroundColorIndex} = + 10; $AgeChart->SeriesCollection(3)->Border->{ColorIndex} = 10; $AgeChart->ChartTitle->{Text} = "Total Memory Usage - 192.168.21 +8.135(MAPLE) $Date"; $AgeChart->Axes(xlCategory, xlPrimary)->{HasTitle} = 1; $AgeChart->Axes(xlCategory, xlPrimary)->AxisTitle->{Text} = "Dat +e\nMax = $Max Min = $Min Avg = $Avg "; $AgeChart->Axes(xlValue, xlPrimary)->{HasMajorGridlines} = 1; $AgeChart->Axes(xlCategory, xlPrimary)->{HasMajorGridlines} = 1; $AgeChart->Axes(xlValue, xlPrimary)->MajorGridlines->Border->{Co +lorIndex} = 15; $AgeChart->Axes(xlCategory, xlPrimary)->MajorGridlines->Border-> +{ColorIndex} = 15; $AgeChart->Axes(xlValue, xlPrimary)->{HasTitle} = 1; $AgeChart->Axes(xlValue, xlPrimary)->AxisTitle->{Text} = "Total +Memory Used(%)"; $AgeChart->PlotArea->Border->{ColorIndex} = 16; $AgeChart->PlotArea->Interior->{ColorIndex} = 2; $Book->SaveAs('C:\\Graph.xls'); $Book->Close({SaveChanges=>0});
I want to reduce the X-axis value font

I tried
$AgeChart->TickLabels->Font->{Size}=6;
but didn't work. How do I do it?

Regards

Nalina

In reply to Graph generation using MS Excel by Nalina

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.