Closed jskrajna closed 9 months ago
Hi @jskrajna! I'm currently working in the V1 version of the lib, where we'll add support to many more ECharts functionalities via React APIs.
For the case you're asking about, it should be done via the echarts
object, which is not currently being accesible in the declarative component version. In v1
you'll have a useConnect
hook that will solve it.
use connect
In case you're in a hurry, you might import the connect
function exported by echarts
and copy the code from the hook.
Hope to deploy it in a few days ☺️
Hi @jskrajna, sorry that took longer than expected.
I have published a new major version with an improved API for the lib. It includes the hook useConnect
.
I updated the docs:
useConnect
Hope that helps.
I am closing this issue as It appears to be solved with my previous comment.
Subject
connect method
Description
Hi. From the documentation is not so clear for me how to connect charts. For example I have this implementation and Chart component used multiple times. How can I connect it ? I know theres a method 'connect' in echarts for group.
` import { Box } from '@mui/material'; import { EChart } from '@kbox-labs/react-echarts' import { forwardRef } from 'react';
const Chart = forwardRef(function Chart(props, ref) { const { options } = props;
});
export default Chart; `