@@ -9,6 +9,7 @@ import { VisualCardWrapper } from "../components";
99// Withhout bin value calculation from ChartBinningHeatmapSensitivityAnalysis
1010
1111const SHOW_VISUAL_DESCRIPTION = false ;
12+ const HEATMAP_SIZE = 8 ;
1213
1314const getOptions = ( {
1415 xAxis = { name : "" , min : 0 , max : 0 } ,
@@ -22,15 +23,19 @@ const getOptions = ({
2223 origin = [ ] ,
2324} ) => {
2425 const xAxisData = [
25- ...range ( xAxis . min , xAxis . max , ( xAxis . max - xAxis . min ) / 4 ) . map ( ( x ) =>
26- x . toFixed ( 2 )
27- ) ,
26+ ...range (
27+ xAxis . min ,
28+ xAxis . max ,
29+ ( xAxis . max - xAxis . min ) / ( HEATMAP_SIZE - 1 )
30+ ) . map ( ( x ) => x . toFixed ( 2 ) ) ,
2831 xAxis . max . toFixed ( 2 ) ,
2932 ] ;
3033 const yAxisData = [
31- ...range ( yAxis . min , yAxis . max , ( yAxis . max - yAxis . min ) / 4 ) . map ( ( x ) =>
32- x . toFixed ( 2 )
33- ) ,
34+ ...range (
35+ yAxis . min ,
36+ yAxis . max ,
37+ ( yAxis . max - yAxis . min ) / ( HEATMAP_SIZE - 1 )
38+ ) . map ( ( x ) => x . toFixed ( 2 ) ) ,
3439 yAxis . max . toFixed ( 2 ) ,
3540 ] ;
3641
@@ -113,7 +118,7 @@ const getOptions = ({
113118 } ,
114119 grid : {
115120 top : "15%" ,
116- left : SHOW_VISUAL_DESCRIPTION ? "15%" : "10 %" ,
121+ left : SHOW_VISUAL_DESCRIPTION ? "15%" : "6 %" ,
117122 right : "5%" ,
118123 bottom : "20%" ,
119124 containLabel : true ,
@@ -189,7 +194,7 @@ const getOptions = ({
189194 rich : {
190195 down : {
191196 backgroundColor : "#FF8F4E" ,
192- padding : [ 8 , 12 ] ,
197+ padding : [ 5 , 10 ] ,
193198 fontWeight : 700 ,
194199 borderRadius : 10 ,
195200 width : "100%" ,
@@ -237,7 +242,7 @@ const getOptions = ({
237242 rich : {
238243 out : {
239244 backgroundColor : "#FED754" ,
240- padding : [ 8 , 12 ] ,
245+ padding : [ 5 , 10 ] ,
241246 fontWeight : 700 ,
242247 borderRadius : 10 ,
243248 width : "100%" ,
@@ -285,7 +290,7 @@ const getOptions = ({
285290 rich : {
286291 up : {
287292 backgroundColor : "#5BDD91" ,
288- padding : [ 8 , 12 ] ,
293+ padding : [ 5 , 10 ] ,
289294 fontWeight : 700 ,
290295 borderRadius : 10 ,
291296 width : "100%" ,
@@ -405,7 +410,7 @@ const ChartTwoDriverHeatmap = ({ segment, data, origin }) => {
405410 bordered
406411 >
407412 < Chart
408- height = { 450 }
413+ height = { 485 }
409414 wrapper = { false }
410415 type = "BAR"
411416 override = { getOptions ( { ...heatmapData , origin } ) }
0 commit comments