-->

dc.js heatmap deselected colors

2020-05-07 15:46发布

问题:

In dc.js I have linked a heatmap with a bar chart. When a range is selected on the bar chart, the heatmap defaults to the first color in the color scheme instead of the gray deselected color. How can I get the heatmap to use the gray color?

回答1:

The solution is to use a custom reduce function on the group. In so doing, I can set the value of a deselected item to null and then use an appropriate color for all null values.