Aiysha
asked on
Chart defaults to Bar Chart
I am using the ChartTypeData=xlLIne in my code still the plotted chart defaults to bar chart.
This is the code.
Set DataSheet = Sheets("Trial" & i).Select
With DataSheet
Set CatTitles = .Range(.Cells(2, 3), .Cells(row, 3))
Set SrcRange = .Range(.Cells(2, 2), .Cells(row, 2))
End With
Set SourceData = Union(CatTitles, SrcRange)
Sheets("Plot").Select
With ActiveChart.SeriesCollecti on.NewSeri es
.ChartType = xlLine
.setSource DateSource:=SourceData, PlotBy:=xlRows
End With
Please help, I want to plot a range on graph as xlLine.
Thank you.
This is the code.
Set DataSheet = Sheets("Trial" & i).Select
With DataSheet
Set CatTitles = .Range(.Cells(2, 3), .Cells(row, 3))
Set SrcRange = .Range(.Cells(2, 2), .Cells(row, 2))
End With
Set SourceData = Union(CatTitles, SrcRange)
Sheets("Plot").Select
With ActiveChart.SeriesCollecti
.ChartType = xlLine
.setSource DateSource:=SourceData, PlotBy:=xlRows
End With
Please help, I want to plot a range on graph as xlLine.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
With ExcelChart
.ChartType = Excel.XlChartType.xlLine
End With
or
With ExcelChart
.ChartType = Excel.XlChartType.xlLineMa
End With
~b