Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Experts
This macro works fine and plots the xy graph using four columns of data in sheet1. How can I change the weight of the line for series (1) from xlThin to xlThick ? I tried using the .SeriesCollection(1).Weight = xlThick but it did not work. Please help. thanks Choi Sub plotgraph() '***********START graph plot*********** Sheets("sheet1").Activate Cells(1, 1).Select 'Lastrow = Cells(Rows.Count, 1).End(xlUp).Row Lastrow = 20000 StartRow = 10 With ActiveSheet.ChartObjects.Add _ (Left:=6, Width:=228, _ Top:=Cells(StartRow, 1).Top, Height:=240) With .Chart .ChartType = xlXYScatterSmoothNoMarkers .SetSourceData Source:=Sheets("Sheet1") _ .Range(Cells(1, 1), Cells(Lastrow, 2)), PlotBy _ :=xlColumns .HasLegend = True .SeriesCollection(1).Name = "=""data1""" .HasTitle = True .ChartTitle.Characters.Text = "mydata" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "t(s)" .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Pr(kPa)" .Legend.Position = xlTop .ChartArea.AutoScaleFont = False .ChartArea.Font.Size = 8 .PlotArea.Interior.ColorIndex = xlNone .SeriesCollection.NewSeries .SeriesCollection(2).XValues = Sheets("Sheet1"). _ Range(Cells(1, 3), Cells(Lastrow, 3)) .SeriesCollection(2).Values = Sheets("Sheet1"). _ Range(Cells(1, 4), Cells(Lastrow, 4)) .SeriesCollection(2).Name = "=""data2""" .PlotArea.Width = 220 .PlotArea.Height = 160 .PlotArea.Left = 16 .PlotArea.Top = 40 End With End With '***********END graph plot*********** End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Box Line Weight - Excel 2007 | Excel Discussion (Misc queries) | |||
Create excel chart from LotusScript, change xlLine line weight | Excel Programming | |||
Weight loss line chart to monitor weight loss progress | Charts and Charting in Excel | |||
How can i change the default line weight in an excel chart | Charts and Charting in Excel | |||
How can i change the default line weight in an excel chart | Charts and Charting in Excel |