<div> <div class="chart-wrap"> <div id="chart"> <ReactApexChart options={state.options} series={state.series} type="donut" width={380} /> </div> </div> <div class="actions"> <button onClick={() => appendData()} > + ADD </button> &nbsp; <button onClick={() => removeData()} > - REMOVE </button> &nbsp; <button onClick={() => randomize()} > RANDOMIZE </button> &nbsp; <button onClick={() => reset()} > RESET </button> </div> </div>