A
Amit
Hello,
Let's say I'm having a sheet with following data in two columns:
1 100
2 200
3 300
4 400
when I graph it in Chart1. The bar which belongs to 100 places in the
right most part of the graph and 400 places next to 0 or origin. How
this happens?
Code:
Dim TheChart As Chart
Dim DataSheet As Worksheet
Dim CatTitles As Range
Dim SrcRange As Range
Dim SourceData As Range
Dim iBarIndex As Integer
Set TheChart = Sheets("Chart1")
Set DataSheet = Sheets("Sheet1")
With DataSheet
'Set CatTitles = .Range("A1:A4")
Set SrcRange = .Range(Cells(1, Item), .Cells(4, Item))
End With
'Source Data
'Set SourceData = Union(CatTitles, SrcRange)
With TheChart
.Activate
.SetSourceData Source:=SrcRange, PlotBy:=xlRows 'SourceData
.Deselect
End With
Let's say I'm having a sheet with following data in two columns:
1 100
2 200
3 300
4 400
when I graph it in Chart1. The bar which belongs to 100 places in the
right most part of the graph and 400 places next to 0 or origin. How
this happens?
Code:
Dim TheChart As Chart
Dim DataSheet As Worksheet
Dim CatTitles As Range
Dim SrcRange As Range
Dim SourceData As Range
Dim iBarIndex As Integer
Set TheChart = Sheets("Chart1")
Set DataSheet = Sheets("Sheet1")
With DataSheet
'Set CatTitles = .Range("A1:A4")
Set SrcRange = .Range(Cells(1, Item), .Cells(4, Item))
End With
'Source Data
'Set SourceData = Union(CatTitles, SrcRange)
With TheChart
.Activate
.SetSourceData Source:=SrcRange, PlotBy:=xlRows 'SourceData
.Deselect
End With