VeeBeeAye453
New Member
- Joined
- Dec 14, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hello,
I'm having an issue trying to bring multiple data sources with date X-axis values into the same chart with a VBa macro. The chart "scales" to the first series added or whichever is set as the source data. When the other series' are added, I think they might be unwittingly "discretized" into the first series' X-axis values and data loses it's horizontal alignment.
Attached is a screenshot of "10-16" and "10-41" stand-alone charts, and a chart where "10-16" is the first series added - you can see the "10-16" profile retains it's date alignment but "10-41" loses it.
These screenshots are of a chart made with the first series of "10-16" data inputted either as Chart.SetSourceData or Chart.SeriesCollection.Add, with the source a range of "A:A,B:B" where A is date data and B is value data.The other series' are added as Chart.SeriesCollection.Add, with a range of "B:B" (i.e. just value data).
If their own date ranges are used and they're inputted with "A:A,B:B" instead, I get the second image which tries to graph the date values as an additional series.
The end result I'm looking for is to have "10-41" and "10-16" stacked over each other in the same manner as they are independently, meaning values across each series aren't vertically aligned - you'd think a scatter chart would solve this but it looks almost exactly the same as the line charts above if I try that.
Thank you!
I'm having an issue trying to bring multiple data sources with date X-axis values into the same chart with a VBa macro. The chart "scales" to the first series added or whichever is set as the source data. When the other series' are added, I think they might be unwittingly "discretized" into the first series' X-axis values and data loses it's horizontal alignment.
Attached is a screenshot of "10-16" and "10-41" stand-alone charts, and a chart where "10-16" is the first series added - you can see the "10-16" profile retains it's date alignment but "10-41" loses it.
These screenshots are of a chart made with the first series of "10-16" data inputted either as Chart.SetSourceData or Chart.SeriesCollection.Add, with the source a range of "A:A,B:B" where A is date data and B is value data.The other series' are added as Chart.SeriesCollection.Add, with a range of "B:B" (i.e. just value data).
If their own date ranges are used and they're inputted with "A:A,B:B" instead, I get the second image which tries to graph the date values as an additional series.
The end result I'm looking for is to have "10-41" and "10-16" stacked over each other in the same manner as they are independently, meaning values across each series aren't vertically aligned - you'd think a scatter chart would solve this but it looks almost exactly the same as the line charts above if I try that.
Thank you!