[Solved] Customize chart axes number format

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Locked
drypatrick
Posts: 2
Joined: Mon Feb 26, 2024 4:09 pm

[Solved] Customize chart axes number format

Post by drypatrick »

Good morning,
I would like to know if there is a way to customize the axes number format with the macro, as is possible to do with the GUI like in the attached img.
Thanks very much!
Attachments
Capture.PNG
Capture.PNG (16.68 KiB) Viewed 8318 times
Last edited by Hagar Delest on Mon Feb 26, 2024 10:11 pm, edited 1 time in total.
Reason: tagged solved.
LibreOffice 24.2.0.3 OpenOffice 4 on Windows 10 / Docker
User avatar
MrProgrammer
Moderator
Posts: 5450
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Customize chart axes number format

Post by MrProgrammer »

drypatrick wrote: Mon Feb 26, 2024 4:26 pm I would like to know if there is a way to customize the axes number format with the macro
Please search first before posting. I found this in about ten seconds with a search: [Solved] Seting NumberFormat for YAxis in a chart

Search found 45 matches: chart axis

Or try a search for axes instead of axis. If you need more assistance, you are more likely to get the problem solved quickly if you attach a chart demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself).

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
drypatrick
Posts: 2
Joined: Mon Feb 26, 2024 4:09 pm

Re: Customize chart axes number format

Post by drypatrick »

Thank you very much!!!!
LibreOffice 24.2.0.3 OpenOffice 4 on Windows 10 / Docker
legalnan
Posts: 31
Joined: Tue Jul 07, 2020 8:10 pm

Re: [Solved] Customize chart axes number format

Post by legalnan »

The Y axis automatically ranges from zero to 180. I would prefer 135 to 165. Can you please tell me how to do that? Thanks
Attachments
current weight chart.ods
(48.2 KiB) Downloaded 129 times
Open Office 4.1.6 on Windows 10
User avatar
MrProgrammer
Moderator
Posts: 5450
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: [Solved] Customize chart axes number format

Post by MrProgrammer »

Please review our forum policy: One issue, one thread.

You have posted in a solved topic which belongs to drypatrick and have asked a new question, legalnan. The original question concerned customizing the axes number format. I have locked the topic to prevent any responses to your new, unrelated question. Please open your own topic to discuss setting the Y-axis range. Use the Calc forum if you want to set the range with the standard user interface (Format → Axis → Y axis). Use the Macros and UNO API forum if you want to write a macro to set the range.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked