FAQ
Previous
Upgrade Guide
Next
Contact Us
Loading...
The following are some common questions and official answers from the Ant Design Charts community.
Possible causes:
Solution 1: Import from es
Import from the corresponding sub-package
// Statistical chartsimport Line from '@ant-design/plots/es/components/line';
Solution 2: Enable sideEffects
Enable webpack sideEffects configuration, which should be enabled by default in webpack 4+.
{optimization: {sideEffects: true,}}
Solution 3: Use babel-plugin-import
// Install dependenciesnpm install babel-plugin-import -D// Configure .babelrc file{"plugins": [["import", {"libraryName": "@ant-design/plots","libraryDirectory": "es"}],["import", {"libraryName": "@ant-design/graphs","libraryDirectory": "es"}],["import", {"libraryName": "@ant-design/maps","libraryDirectory": "es"}]]}
Due to the React mechanism, by default, whenever the parent component has a state update, all child components will re-render, causing the chart to redraw again. Please refer to this example
Refer to ChartsIE
Please provide feedback on GitHub issues and search for similar issues. We will respond as soon as possible and improve this document accordingly.