Sha256: f77d7901a6fa3f717f43c82af67e305e681fc220a0ecce1261db5ce6be4cd5d3

Contents?: true

Size: 839 Bytes

Versions: 62

Compression:

Stored size: 839 Bytes

Contents

import React, { useState } from 'react'
import { Button, CircleChart } from '../../'

const CircleChartLiveData = () => {
  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"
      />
      <CircleChart
          chartData={data}
          id="circle-chart-live-data"
      />
    </div>
  )
}

export default CircleChartLiveData

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
playbook_ui-6.8.1 app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx
playbook_ui-6.8.0 app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx