From 1c2b3963652691b0112d560b3d5a80f4f118945f Mon Sep 17 00:00:00 2001 From: DipraAich <61182817+DipraAich@users.noreply.github.com> Date: Tue, 20 Sep 2022 02:46:20 +0530 Subject: [PATCH] [Feature]: Heatmap 2way sync (#1031) * Heatmap doesnt render if more than 1 metric or 2 dimensions are added Signed-off-by: Dipra Aich * Test cases resolution Signed-off-by: Dipra Aich * Eliminated unnecessary commented code Signed-off-by: Dipra Aich Signed-off-by: Dipra Aich --- public/components/visualizations/charts/maps/heatmap.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/components/visualizations/charts/maps/heatmap.tsx b/public/components/visualizations/charts/maps/heatmap.tsx index 30dce8305..221ff5556 100644 --- a/public/components/visualizations/charts/maps/heatmap.tsx +++ b/public/components/visualizations/charts/maps/heatmap.tsx @@ -37,8 +37,9 @@ export const HeatMap = ({ visualizations, layout, config }: any) => { isEmpty(zMetrics) || isEmpty(data[xaxisField.label]) || isEmpty(data[yaxisField.label]) || - isEmpty(data[`${zMetrics.aggregation}(${zMetrics.name})`]) - // indexOf(NUMERICAL_FIELDS, zMetrics.type) < 0 + isEmpty(data[`${zMetrics.aggregation}(${zMetrics.name})`]) || + dataConfig?.dimensions.length > 2 || + dataConfig?.metrics.length > 1 ) return ;