Actions
Bug #2042
closed
JG
KD
Invalid coloring of bars in 3D bar charts
Bug #2042:
Invalid 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
KD Updated by Korneel Dumon about 13 years ago
- Status changed from New to Resolved
JG Updated by Jan Goyvaerts about 13 years ago
Confirming it works.
KD Updated by Korneel Dumon about 13 years ago
- Assignee set to Korneel Dumon
KD Updated by Koen Deforche almost 13 years ago
- Target version set to 3.3.2
KD Updated by Koen Deforche almost 13 years ago
- Status changed from Resolved to Closed
Actions