mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #186] Align X Axis labels #152
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @j15e on GitHub (Jun 14, 2018).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/186
Originally assigned to: @jmcnamara on GitHub.
It looks like axis labels alignement (
c:lblAlgn) is hardcoded toctr(center).I would like to know if there is a way to change this property with the current library that I am not aware of? Or it would require a new feature on the chart writer?
Here are the revelant parts :
1 - An axis is created :
b616fb59ff/src/chart.c (L4028-L4032)2 - A
c:lblAlgnelement is added :b616fb59ff/src/chart.c (L4093-L4094)3 - Element is added with
ctrvalue :b616fb59ff/src/chart.c (L3204-L3215)PS I have been using your library with https://github.com/Paxa/fast_excel, I must say a big thanks, this is pretty well done!
@jmcnamara commented on GitHub (Jun 14, 2018):
That internal property may not be what you think it is.
What specific feature in Excel do you wish to change?
@j15e commented on GitHub (Jun 14, 2018):
The alignment of labels on the X axis like this :

@j15e commented on GitHub (Jun 14, 2018):
We want to do this to align the labels when creating an histogram, to make it clear the label is for the end of each histogram bucket (ex. the last column represent >725 to 750, not 750 to 775).
@jmcnamara commented on GitHub (Jun 14, 2018):
Ok. Got it.
That isn't currently supported. I'll need to put it into the Python and Perl versions first and then port it across. Your patch looks okay though so you can use that in the meantime.
@j15e commented on GitHub (Jun 14, 2018):
Thanks, I hope my patch help implementing Python and Perl versions.
@jmcnamara commented on GitHub (Sep 1, 2018):
Added in version 0.7.9.
@jmcnamara commented on GitHub (Sep 2, 2018):
P.S. I changed the function name and enums slightly to make them consistent (or equally inconsistent) with existing code. See the changes in
f7f32de@j15e commented on GitHub (Sep 4, 2018):
Thanks for the hint, I will update my code accordingly when going back to the official repo. 👍