Skip to content

Commit

Permalink
Fix: Category columns can have blank values (#7, #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiewic committed Jul 15, 2017
1 parent 2466691 commit 2de4c58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion waffleChart/pbiviz.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "Waffle Chart",
"guid": "WaffleChart1453776852267",
"visualClassName": "Visual",
"version": "2.0.6",
"version": "2.0.7",
"description": "A Waffle Chart uses a 10x10 grid of dots to visually show a percentage value. Each dot represents one percentage point, so a block of 43 highlighted dots would represent 43%. Multiple Waffle Charts can be used to visually compare multiple percentage values.",
"supportUrl": "https://github.com/kiewic/PowerBI-WaffleChart",
"gitHubUrl": "https://github.com/kiewic/PowerBI-WaffleChart"
Expand Down
4 changes: 2 additions & 2 deletions waffleChart/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ module powerbi.extensibility.visual {
}
}

private static formatCategoryValue(value: PrimitiveValue, type: ValueTypeDescriptor): string {
private static formatCategoryValue(value: PrimitiveValue | null, type: ValueTypeDescriptor): string {
if (type.dateTime)
{
let formatter : IValueFormatter;
Expand All @@ -197,7 +197,7 @@ module powerbi.extensibility.visual {
return formatter.format(value);
}

return value.toString();
return value && value.toString();
}

public static converter(dataView: DataView): WaffleChartViewModel {
Expand Down

0 comments on commit 2de4c58

Please sign in to comment.