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"."$row"."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.218.135(MAPLE) $Date"; $AgeChart->Axes(xlCategory, xlPrimary)->{HasTitle} = 1; $AgeChart->Axes(xlCategory, xlPrimary)->AxisTitle->{Text} = "Date\nMax = $Max Min = $Min Avg = $Avg "; $AgeChart->Axes(xlValue, xlPrimary)->{HasMajorGridlines} = 1; $AgeChart->Axes(xlCategory, xlPrimary)->{HasMajorGridlines} = 1; $AgeChart->Axes(xlValue, xlPrimary)->MajorGridlines->Border->{ColorIndex} = 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}); #### $AgeChart->TickLabels->Font->{Size}=6;