Skip to content

Commit

Permalink
fix: heatmap examples (#2351)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfu1 authored Jan 10, 2024
1 parent 2ef8895 commit c224c7b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plots/src/core/plots/heatmap/adaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function adaptor(params: Params) {
const tooltip = (params: Params) => {
const { options } = params;
const { tooltip, colorField, sizeField } = options;
if (!tooltip.field) {
tooltip.field = colorField || sizeField;
if (tooltip && !tooltip.field) {
tooltip['field'] = colorField || sizeField;
}
return params;
};
Expand Down
1 change: 1 addition & 0 deletions site/examples/statistics/heatmap/demo/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const DemoHeatmap = () => {
position: 'inside',
style: {
fill: '#fff',
pointerEvents: 'none',
},
},
scale: {
Expand Down
1 change: 1 addition & 0 deletions site/examples/statistics/heatmap/demo/cell-aggregated.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const DemoHeatmap = () => {
title: 'date',
field: 'temp_max',
valueFormatter: '~s',
pointerEvents: 'none'
},
};

Expand Down
1 change: 1 addition & 0 deletions site/examples/statistics/heatmap/demo/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const DemoHeatmap = () => {
fill: '#fff',
shadowBlur: 2,
shadowColor: 'rgba(0, 0, 0, .45)',
pointerEvents: 'none',
},
},
};
Expand Down

0 comments on commit c224c7b

Please sign in to comment.