I am creating a graph with a macro. I cannot create a graph with multiple data in the horizontal direction

I am creating a graph with a macro. I cannot create a graph with multiple data in the horizontal direction.

When I create the graph, I am not sure how to use the macro.
I can’t find a macro that does the same thing as when I select a series of data in a row in a range of data.

I have searched a lot, but all I can find are explanations for creating a graph from data in columns.


oRangeAddress(0).StartColumn = 4
oRangeAddress(0).StartRow = 29	
oRangeAddress(0).EndColumn = 21
oRangeAddress(0).EndRow = 29

oRangeAddress(1).StartColumn = 0
oRangeAddress(1).StartRow = 12	
oRangeAddress(1).EndColumn = 13
oRangeAddress(1).EndRow = 12		

oRangeAddress(2).StartColumn = 0
oRangeAddress(2).StartRow = 12 +8	
oRangeAddress(2).EndColumn = 13
oRangeAddress(2).EndRow = 12 +8	

oChart = oCharts.getByName(oTitle).getEmbeddedObject()
oChart.Diagram = oChart.createInstance("com.sun.star.chart.AreaDiagram")

I can get it to work for data in columns, but not for data in rows.
Please help.
I want to create this.

Translated with www.DeepL.com/Translator (free version)


I am sorry, but I cannot disclose any more parts of the DATA.
I have extracted the ROWS data (rows) in the red box in this table to create the chart. (actually multiple years)
I don’t know if this is normal, but all data published on the internet is COLUMN (vertical columns).
I can create a chart without having to worry about data extraction.
I am having trouble finding anything that extracts ROWS data (rows).

I am currently trying to come up with an extraction method that might be a clue to a solution, so I am going to try it in a few days, but I am not sure if it will work or not.

I’m not sure if it will work or not, but I’ll try my best.

I would be happy if I could get your cooperation.

Well then create a relevant example sheet and chart showing everything somebody trying to help you would need.

Make clear for what reasons you think to need a macro. In most cases this is an approach exemplifying the XY-problem. Describe -based on the example file- what you actually want to achieve.