import React from "react";
import {
AreaChart,
Area,
XAxis,
YAxis,
CartesianGrid,
Legend,
ResponsiveContainer,
Tooltip
} from "recharts";
const grayColor = "#90a4ae";
const strongColor = "#4ab47c";
const strongOpositeColor = "#b44a9b";
function PriceSimulationChart({
priceTimeseries,
withdrawFeeTimeseries,
p0
}: {
priceTimeseries: number[];
withdrawFeeTimeseries: number[];
p0: number;
}) {
// d0 - Initial raise, d0 (DAI)
// theta - fraction allocated to reserve (.)
// p0 - Hatch sale Price p0 (DAI / token)
// returnF - Return factor (.)
// wFee - friction coefficient (.)
const keyHorizontal = "x";
const keyVerticalLeft = "Price (DAI / token)";
const keyVerticalRight = "Collected withdraw fee (DAI)";
const data = [];
for (let t = 0; t < priceTimeseries.length; t++) {
data.push({
[keyHorizontal]: t,
[keyVerticalLeft]: priceTimeseries[t] || 0,
[keyVerticalRight]: withdrawFeeTimeseries[t] || 0
});
}
function renderColorfulLegendText(value: string) {
return {value};
}
const formatter = (n: number) => (+n.toPrecision(3)).toLocaleString();
return (
{/* Capital collected from withdraw fees - AXIS */}
Number(value)} />
{/* Capital collected from withdraw fees - AREA */}
{/* }
/> */}
);
}
export default PriceSimulationChart;