If more then one level or hierarchy is used for columns, chart output is incorrect. Turns out only the first row of top-level hierarchy was visible. Take the following report on Sales cube as an example:
Only Q1 is shown.
All rows are shown:
Looks like the same bug (if it works as expected, it's waaay to confusing) is present when multiple header rows are selected, but I didn't manage to fix it.
Previously every label on X-axis had a counter, e.g. "Virginia  | Oregon , ... Now it's added only if there are duplicated labels on the chart.
Sometimes when some cells in report are empty, stacked bar doesn't display anything. It's fixed by implicitly placing 0 in such cells.
For example in Sales cube put Month in columns and City (from Customer dimension). Stacked bar is invisible without this fix.
Increased the number of distinct colors from 5 to 11 (based on default jqPlot pallet).
Ignore IntelliJ IDEA project files
* Fixing charts when rows using multiple levels of the same hierarchy
* Labels from all levels are now joined, e.g. 'Feb/Q1/2012' instead of 'Feb'
No longer appending '[N]' counter unless labels have duplicates
No longer appending '[N]' counter unless labels have duplicates - dea…
…d code removed
Edge condition if no label is available
Introduce cellset local variable to avoid duplication
Fixing stacked bar chart by implicitly changing empty strings to 0
Without it empty strings caused maximum value in stacked bar chart to be incorrectly computed (NaN?) and nothing was displayed
More distinct, pleasantly looking colors based on jqPlot project
there still is an issue if you have several items on the columns axis, can you fix that as well?
thanks for the pull request!
and as i said in the other pull request, doing both in 1 pass would be great if possible
I was aware of the problem with multiple items in columns. But since it wasn't an issue in my project, I left it. I already feel I might have introduced some new subtle bugs, so I am a bit worried and reluctant to work on that code further before it stabilizes and proves to be correct.
I'll try to get rid of the second iteration/pass though.
once you got rid of the second iteration i can take a look as well, i think it can be an easy fix to do it for the columns as well
what bugs are you referring to though?
No bugs in particular, I tested my changes manually with several charts on demo and my own cubes and they all seem to work. So I hope everything is in better shape than it used to be.
i have made the row label a one-pass algorithm and also implemented the fix for the column labels
would be great if you could check out the latest version and give feedback!
thanks for pushing this. i wanted to do that for ages
Thank you for fixing column labels. I confirm, now chart works properly when multiple dimensions are applied on rows (my fix) and column (yours). Thanks again!
btw i noticed that your chart export doesnt work in chrome for some reason
Indeed, sorry for that. I mentioned about it in original pull request. Unfortunately I couldn't find where the problem lies :-(.
ah didnt see that. no worries, i will take a look
if you can have a look whats wrong with the pdf export that would be great ;-)