Display empty cells in chart
C++ library for creating XLSX files for MS Excel 2007 and above.
Brought to you by:
oxod,
programmeralex
Hi, again!
Is in the library option to chenge how chart display empty cells?
In excel are 3 options.
https://support.office.com/en-us/article/display-empty-cells-null-n-a-values-and-hidden-worksheet-data-in-a-chart-a1ee6f0c-192f-4248-abeb-9ca49cb92274?ui=en-US&rs=en-US&ad=US
I found line in xml wich change this:
<c:dispblanksas val="gap">
<c:dispblanksas val="span">
<c:dispblanksas val="zero"></c:dispblanksas></c:dispblanksas></c:dispblanksas>
Line:
<c:plotvisonly val="1">
is in xml when we dont want display hidden cells.
If we want display hidden values we must delete this line.</c:plotvisonly>
Last edit: Norbert Wołowiec 2018-05-16
My suggestion for the next version:
Add new Enum:
Change struct Diagramm:
Add new method:
Add switch in CChart::Save() instead line:xmlw.TagL( "c:dispBlanksAs" ).Attr( "val", "gap" ).EndL();
I hope it will be helpful.
These are small changes and add some functionality.
Other question.
Why we can't change bar chart fill color?
Hi,
Thank you for useful improvement! And I am sorry for the long silence, I did not have any free time.
I added your improvements to the project. Also I added CChart::SetShowDataFromHiddenCells method for display data from hidden rows and columns.
To change bar chart fill color, see in CChart::Series new specific for bar chart fields: barFillStyle (need BAR_FILL_SOLID), barInvertIfNegative and barInvertedColor.
I will be glad to hear your remarks and suggestions.
I am glad that I can help and You do not need to apologize.
I have other very small change
Now, if i want to add custom marker, I have to specify the color of the fill and the line. When I specify only one, nothing will happen
I change this:
For that:
Now we have more flexibility.
Thanks for the improvement, I will add it to the project.
I have another problem.
When I have a linear chart and add an additional bar chart, the second y axis is generated.
What if I want both to use one y axis? It is possible in Excel.
It seems I did not fully understand the problem.
Can you attach a xlsx-file with the chart that you want to generate?
Ok
Thanks for your files, they helped me.
Try new method CChart::SetDrawAdditionalAxes.
The new method was superfluous. Please see the message at this address:
https://sourceforge.net/p/simplexlsx/discussion/general/thread/9e13fc27/#249b