Skip to content

Implement alternative components to use WebWorker and OffscreenCanvas #1025

@dangreen

Description

@dangreen

What problem are you trying to solve?

In the chart.js performance documentation it mentions the possibility of using web workers to perform chart rendering in parallel with the main thread.

Describe the solution you'd like

Implement alternative components. Final result usage example should look like this:

worker.js

import 'react-chartjs-2/offscreen/worker'

app.js

import { Chart } from 'react-chartjs-2/offscreen'

const worker = new Worker('worker.js')

<Chart worker={worker} type='bar' data={...} /> 

Source: #986

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions