2

I am trying to resize the height of an "Apexcharts heatmap" depending on the size of data I am getting from the server

I have tried putting the code in componentDidMount() method and the place where the data from the server comes as well, it does not help

in my constructor I have

this.state{ hmheight=34; }

then in the method where I get data

if(datasize){ this.setState({hmheight=90}) }

then in the render

 <ReactApexChart options = { heatOptions }
        series = { this.state.heatData }
        type = "heatmap"
        height = {heatmapHeight} / >

noted that series update and view changes but the height does not, while series and height are changed in the same function

I want the height to change on the basis of data coming from the server.

Vibhor
  • 115
  • 1
  • 14

1 Answers1

0

it could be because the state variable and value of the height are different. this.state.hmheight Vs height = {heatmapHeight}

Alyasa
  • 53
  • 1
  • 8