Replies: 3 comments 1 reply
-
You can use a custom layer for that. See an example of custom layer here: https://codesandbox.io/s/fancy-line-chart-3quqe |
Beta Was this translation helpful? Give feedback.
-
That would be great indeed. I'm having the same need and conditionally replacing the whole graph with a spinner makes layout changes. |
Beta Was this translation helpful? Give feedback.
-
Hi @matobiely. Is this still an open question? Seems to me the problematic thing here would be if an empty dataset caused a rendering error. An error would indeed prevent using a custom layer. However, the sandbox provided by @wyze works fine with |
Beta Was this translation helpful? Give feedback.
-
It there a way, how to show loader, loading dots, or whatever kind of loader during data fetch?
My problem is, that at the beggining i have empty data
const [data, setData] = useState([]);
and load them in useEffect. But since fetching take some time, there is no loader and data is empty array, render fails.
I can do loader for whole line chart component, but i want to avoid this kind of loader. I want to show the chart, with axes, custom footer layers etc. during fetching data and after fetching is done, show the lines.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions