Change X axis to category in Bar Chart
C++ library for creating XLSX files for MS Excel 2007 and above.
Brought to you by:
oxod,
programmeralex
Hi, Im having a little trouble trying to change the X axis in bar chart. I posted 3 screenshots: one of the data Im using, one of the chart the code is giving me and the other one( with the blue columns) is the one that I wanna create. I just wanna put the "date" in the bottom of the bar. Heres my code:
Edit: I tried using chartSheet1.Chart().SetXAxisToCat(false); before chartSheet1.Chart().AddSeries(ser1);, but it didnt work out
Last edit: Leonardo Pollock 2021-08-18
Hi, thanks for the detailed description of the problem.
This requires a special axis category - the date axis.
Unfortunately, the library does not currently support this.
I can try adding such an axis. But it will take more than one day.
Thanks for the response and for the amazing library. I would really appreciate that. Take as long as you need :) .
Hi,
Please check the latest version of the library from the attachment.
You need a function call:
You may also find this function useful:
Axis markers have also been added. Check out the new example "MixedLineAndBarChart.cpp".
Thanks for waiting :-)
Thanks a lot. I let the project rest, I thought you would take a little more time XD.
Was happy to help. I also thought it would take a lot of time :-)