heatmap.js icon indicating copy to clipboard operation
heatmap.js copied to clipboard

bug of setdata's data

Open mmmaomao21 opened this issue 7 years ago • 2 comments

v 2.0.5 use in react

data={
   max:183,
   min:1,
   data:[
              {
                  x: 610.0379642120939,
                  y:50.5056496152533,
                  value:1
              },
              {
                  x: 110.0379642120939,
                  y:52.5056496152533,
                  value:1
              },            
          ]
}

if setdata(data) can not show the correct heat.

data={
   max:183,
   min:1,
   data:[

              {
                  x: 610.0379642120939,
                  y:50.5056496152533,
                  value:1
              },
              {
                  x: 110,
                  y:52.5056496152533,
                  value:1
              },            
          ]
}

but if one of the data's x or y is integer,then it can show

why????????

mmmaomao21 avatar Nov 07 '18 05:11 mmmaomao21

I have added a react implementation.

smoghal avatar Nov 01 '19 21:11 smoghal

it must be number, you can use toFixed(0) to solve this problem

frkijh avatar Aug 27 '21 03:08 frkijh