/// /// import * as React from "react"; import { VictoryAnimation, VictoryLabel, AnimationStyle, VictoryArea, VictoryAxis, VictoryStack, VictoryBar, VictoryLine, VictoryChart, VictoryScatter, VictoryPie } from "victory"; // VictoryAnimation test let test = {}} > {(style: AnimationStyle) => Hello! } // VictoryLabel test test = 50} textAnchor="middle" verticalAnchor="start" events={{ onClick: () => {} }} text="test" transform="scale(1.2)" dx={10} dy={10} lineHeight={1.5}> {"data viz \n is \n fun!"} // VictoryArea test test = ( (data.yield + data.error)} /> ); test = ( { return { mutation: (props) => { return { style: { fill: "orange" } } } } }, onMouseEnter: () => { return [ { target: "labels", mutation: (props) => { return { text: "hey" } } } ] } } } ]} /> ); test = ( ); test = ( ); test = ( x.getFullYear()}/> ); test = ( ); // VictoryBar test test = ( ); test = ( (data.yield + data.error)} /> ); test = ( ); test = ( data.y > 2 ? "red" : "blue" } }} data={[ {x: 1, y: 1}, {x: 2, y: 2}, {x: 3, y: 3}, {x: 4, y: 2}, {x: 5, y: 1} ]} /> ); test = ( { evt.stopPropagation(); return [ { mutation: () => { return {style: {fill: "orange", width: 20}}; } }, { target: "labels", eventKey: 3, mutation: () => { return {text: "now click me"}; } } ]; } } }, { target: "parent", eventHandlers: { onClick: () => { return [ { target: "data", mutation: () => { return {style: {fill: "tomato", width: 10}}; } } ]; } } } ]} /> ); // VictoryChart test test = ( 0.5 * data.x * data.x}/> ); test = ( Math.sin(2 * Math.PI * data.x) } /> Math.cos(2 * Math.PI * data.x) } /> ); test = ( data.y > 3 ? "gold" : "orange" } }} data={[ {x: 1, y: 1}, {x: 2, y: 2.5}, {x: 3, y: 4}, {x: 4, y: 2.5}, {x: 5, y: 1}, ]}/> ); test = ( x.getFullYear()}/> ); // VictoryLine test test = ( ); test = ( (data.yield + data.error)} /> ); test = ( ); // VictoryScatter test test = ( (data.yield + data.error)} /> ); test = ( ); // VictoryPie test test = ( data.pet + data.wild} /> ); test = ( ); test = ( { return [ { mutation: (props) => { return { style: {fill: "orange"} }; } }, { target: "labels", eventKey: [1, 2, 3], mutation: () => { return {text: "KITTEN"}; } } ]; } } }]} /> ); test = ( ({y: 0, label: " "}), after: (datum) => ({y: datum.y, label: "NEW"}) } }} /> );