import React from "react"; import ReactDOM from "react-dom/server"; import SvgSaver from "svgsaver"; import {VictoryAxis, VictoryChart, VictoryLine, VictoryScatter} from "victory"; import {convertSecondsToFormattedTime} from "../../../../util/date-time"; const LoadChartComponent = ({data, currentTick}) => { const onExport = () => { const div = document.createElement("div"); div.innerHTML = ReactDOM.renderToString( ); div.firstChild.style = "font-family: Roboto, Arial, sans-serif; font-size: 10pt;"; const svgSaver = new SvgSaver(); svgSaver.asSvg(div.firstChild, "opendc-chart-export-" + Date.now() + ".svg"); }; return (
Load over time
); }; const VictoryChartComponent = ({data, currentTick, showCurrentTick}) => ( convertSecondsToFormattedTime(tick)} fixLabelOverlap={true} label="Simulated Time" /> {showCurrentTick ? : undefined } ); const ExportChartComponent = ({onExport}) => ( ); export default LoadChartComponent;