I'm following the demo code and the blocks are transparent when the value is equal to 0.
I changed the following to make it appear gray:
// Original Implementation:
// RoundedRectangle(cornerRadius: heatMapRectangleRadius)
// .frame(width: heatMapRectangleWidth, height: heatMapRectangleWidth, alignment: .center)
// .foregroundColor(blockColor
// .opacity(opacityRatio(index: index)))
RoundedRectangle(cornerRadius: heatMapRectangleRadius)
.frame(width: heatMapRectangleWidth, height: heatMapRectangleWidth, alignment: .center)
.foregroundColor(rowData[index] == 0 ?
Color(red: 0.9, green: 0.9, blue: 0.9) :
blockColor.opacity(opacityRatio(index: index))
)
Before:

After:

not sure if I'm doing something wrong?
I'm following the demo code and the blocks are transparent when the value is equal to 0.
I changed the following to make it appear gray:
// Original Implementation: // RoundedRectangle(cornerRadius: heatMapRectangleRadius) // .frame(width: heatMapRectangleWidth, height: heatMapRectangleWidth, alignment: .center) // .foregroundColor(blockColor // .opacity(opacityRatio(index: index))) RoundedRectangle(cornerRadius: heatMapRectangleRadius) .frame(width: heatMapRectangleWidth, height: heatMapRectangleWidth, alignment: .center) .foregroundColor(rowData[index] == 0 ? Color(red: 0.9, green: 0.9, blue: 0.9) : blockColor.opacity(opacityRatio(index: index)) )Before:
After:
not sure if I'm doing something wrong?