import React from "react";
import { Pie } from "@vx/shape";
import { Group } from "@vx/group";
import { scaleOrdinal } from "@vx/scale";
import { LegendOrdinal } from "@vx/legend";
//import data from "./CategoryByDay.json";
const data = [
{
"Category": "Category Name 1",
"Total": 643401
},
{
"Category": "Category Name 2",
"Total": 1062500
},
{
"Category": "Category Name 3",
"Total": 670000
}
]
function Label({ x, y, children }) {
return (
{children}
);
}
export default ({
title,
width,
height,
events = false,
margin = {
top: 30,
left: 20,
right: 20,
bottom: 30,
},
}) => {
if (width < 10) return null;
const radius = Math.min(width, height) / 2;
const color = scaleOrdinal({
domain: data.Category,
range: [
"#87cefa",
"#d4ea62",
"#d56464",
],
});
return (
{title}
`${label}`}
/>
);
};