import { useState } from "react"; import chartXkcd from "chart.xkcd"; const projectTypes = ["model", "dataset", "space"]; /** * 1. User click enter key * 2. Get model/dataset/space name * 3. Get data from API * 4. Format data(to 20 points at most) * 5. Draw line chart */ function App() { const [projectType, setProjectType] = useState("Model"); const [projectName, setProjectName] = useState(""); const onSubmit = () => { const svg = document.querySelector('.line-chart') new chartXkcd.Line(svg, { title: 'Like hitory', xLabel: 'Month', yLabel: '$ Dollars', data: { labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'], datasets: [{ label: 'Plan', data: [30, 70, 200, 300, 500, 800, 1500, 2900, 5000, 8000], }, { label: 'Reality', data: [0, 1, 30, 70, 80, 100, 50, 80, 40, 150], }] }, options: {} }); } return (