Updated color selection. Added loading to fetch hook.

This commit is contained in:
Mike Cao 2020-09-20 11:28:38 -07:00
parent 5524d504f4
commit 569fcc7f0b
7 changed files with 47 additions and 27 deletions

View file

@ -18,6 +18,7 @@ export default function BarChart({
animationDuration = 300,
className,
stacked = false,
loading = false,
onCreate = () => {},
onUpdate = () => {},
}) {
@ -33,6 +34,7 @@ export default function BarChart({
};
function renderXLabel(label, index, values) {
if (loading) return '';
const d = new Date(values[index].value);
const w = canvas.current.width;