mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #159] Set Width/Height of Chart #132
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#132
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 @TitanicHispanic on GitHub (Apr 4, 2018).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/159
Originally assigned to: @jmcnamara on GitHub.
Having trouble finding this seemingly simple setting, but how does one set the dimensions of a chart in a worksheet?
@jmcnamara commented on GitHub (Apr 4, 2018):
See the worksheet_insert_chart_opt() function
@TitanicHispanic commented on GitHub (Apr 4, 2018):
Thank you for your quick reply. I have tried this option to no success. I even copied the code from an official example to test it. insert_chart works, but replacing that line with insert_chart_opts throws an error at run-time.
Can you please review and provide any info?
@jmcnamara commented on GitHub (Apr 4, 2018):
What is the error?
In future, please provide a full compilable example not a snippet.
I don't see any issue. I commented back in the
worksheet_insert_chart_opt()function and commented outworksheet_insert_chart()since you cannot insert a chart object more than once and compiled the following code:Compilation and execution:
Output:
Which works as expected.
There are also examples in the test suite that compare against Excel created files, like this one.
@TitanicHispanic commented on GitHub (Apr 4, 2018):
I believe we're getting somewhere. I just copied and pasted your example, and it fails. I'm using v0.7.2 and am going to try using a more recent release.
@jmcnamara commented on GitHub (Apr 4, 2018):
Fails how? What is the error message?
Also what compiler and OS are you using?
@TitanicHispanic commented on GitHub (Apr 5, 2018):
I rebuilt my DLL & project from scratch and this functionality now works.
Having said that, are there plans to provide more control over sizing of a chart? scale isn't very conducive; perhaps parameters for endRow/endCol?
@jmcnamara commented on GitHub (Apr 5, 2018):
Great. Thanks for letting me know.
No. That isn't planned.
@znakeeye commented on GitHub (Oct 21, 2024):
Wouldn't it be pretty easy to add
widthandheighttolxw_chart_options? I mean, why hard-code the chart size like this?worksheet.c(11081)
😢