Actions
Bug #2042
closedInvalid coloring of bars in 3D bar charts
Start date:
07/16/2013
Due date:
% Done:
0%
Estimated time:
Description
Setting the bar color with the role MarkerBrushColorRole does not always show in the chart.
- @Override
public Object getData(final WModelIndex index, final int role) {
final int count = grid[index.getColumn()][index.getRow()];
switch(role) {
case ItemDataRole.DisplayRole:
return count;
case ItemDataRole.MarkerBrushColorRole:
return count == 0 ? WColor.white : WColor.blue;
default:
return null;
}
}*
The code sample above makes sure the same grid/column cell is used for both the data and the color. Zero is white and anything else is blue. Check the screenshot - the "back rows" fall under the rule of zero. While the bars clearly show the data is not zero.
Files
Actions