Hello,
I often use graph builder together with the bar chart option (2 levels category)
I would like to add visual separators so the eye can differenciate between top categories.
Do you think it is possible?
thanks!
I think you would have to go with stacked bar chart.
Mosaic
% of Factor Stacked Bar chart with width proportion set to 0.95
You could try adjusting Graph Spacing
It might add too much spacing for you as it will separate all the categories
You could also possibly move your X-Group columns to X-Axis and tinker with axis settings
Thanks Jarmo for the prompt answer. Indeed, I have tried graph spacing and the issue is that this is spacing all bars not one level unfortunately
If you start with something like this
Move age to X-axis and add graph spacing
At least this way you could control the graph spacing but you will end up separating the groupings.
With scripting you could add V Line() when the "top group" changes (this is hard-coded example)
fbs = Current Report() << XPath("//FrameBox"); fbs[6] << Add Graphics Script( Pen Size(10); V Line(0.5) ); fbs[7] << Add Graphics Script( Pen Size(10); V Line(-0.5) );
Edit: If you are doing this by hand you can also use simple shape annotation (these can be scripted but it is annoying)
Something like this might be adequate.
(gb << XPath( "//FrameBox" )) << Border( Left( 2 ), Right( 2 ) ) << Margin( Left( 2 ), Right( 2 ) );
For some reasons, when I place one category to X-axis, the width of the bar are changing (dim2 is set as nominal FYI)