Hello, I have a problem with a line chart drawing by code. Following this topic https://forum.openoffice.org/en/forum/v ... dataseries I am trying to create a new chart with x-axes other than numerical. I searched the forum for this and unfortunately I could not come across a solution.
In the appendix on the left are sample data and a chart drawn by the code. On the right is the chart I am aiming for.
In the series I have to use data from different columns and it works. What doesn't work, however, is assigning values to the x-axis and displaying the correct values when I hover over a point on the chart. I will have to dynamically create at least a dozen charts of this type every time the data changes. The data may have a different number of rows each time. The problem seems to be that there is no assigned category on the chart, but I don't know how to do it.
The main problem:
How to properly assign a category to this type of chart using code, so that it displays on the X axis, and so that the correct values (as in the right chart) appear in the points on the chart when you hover the mouse over them.
[Solved] Calc line chart missing category / x-axis values
[Solved] Calc line chart missing category / x-axis values
- Attachments
-
- MakeChart.ods
- (26.63 KiB) Downloaded 53 times
Last edited by db_user on Sun Oct 30, 2022 2:23 pm, edited 1 time in total.
OpenOffice 4.1.13 / Win10
Re: Calc line chart missing category / x-axis values
Hi,
to add the axis descriptions you have to add a line
Good luck,
ms777
to add the axis descriptions you have to add a line
Code: Select all
oData.setRowDescriptions(oDataXValuesArray)
ms777
Re: Calc line chart missing category / x-axis values
Thank you very much ms777. Now there is nothing blocking me from continuing my work.
OpenOffice 4.1.13 / Win10