Closed jimmy-e closed 5 years ago
@jimmy-e In your case, there's no need to rerender the chart. You can create the multi-series chart in a single rendering. The plugin supports an approach of applying chart instance. It means that you can create the chart using the default library API and then apply the chart instance to the AnyChart React plugin. For details, check the sample.
@Shestac92 , thanks. Is there any way to only way to create a multi-series chart in a single rendering via react props, as seen here, or are we limited to the default api and class methods? Thanks.
@Shestac92 , closing this ticket. Using JSON configurations as well seems pretty satisfactory.
Reproduce:
yarn
yarn build:dev
yarn start
http://localhost:8080/
Issue: The multi-series chart does not show up. As mentioned here, the chart needs to be re-rendered to render the multi-column data. However, this does not seem feasible for the example repo, if the chart is part of a nested child component that cannot be directly re-rendered using the
react-dom
. (Usingreact-dom
to render components more than once in the react spa is considered an anti-pattern).Question: How can we render a mutli-series chart when using a nested react component?