Sha256: 8d0206864ba4e0ade1d8cd09d2742cc55acda2de40a4889623826ecf612a2d84
Contents?: true
Size: 930 Bytes
Versions: 1646
Compression:
Stored size: 930 Bytes
Contents
import React, { useState } from 'react' import CircleChart from '../_circle_chart' import Button from '../../pb_button/_button' const CircleChartLiveData = (props) => { const [data, setData] = useState([ { name: 'Waiting for Calls', value: 41, }, { name: 'On Call', value: 49, }, { name: 'After call', value: 10, }, ]) const data2 = [ { name: 'Waiting for Calls', value: 48, }, { name: 'On Call', value: 12, }, { name: 'After call', value: 140, }, ] const updateValue = () => { setData(data2) } return ( <div> <Button onClick={updateValue} text="Update Value" {...props} /> <CircleChart chartData={data} id="circle-chart-live-data" {...props} /> </div> ) } export default CircleChartLiveData
Version data entries
1,646 entries across 1,646 versions & 2 rubygems