import { StreamOrdinalFrame } from "semiotic" const frameProps = { /* --- Data --- */ data: [{ name: "Pikachu", color: "#e0d33a", attribute: "attack", value: 55, defense: 40, speed: 90, hp: 35 }, { name: "Pikachu", color: "#e0d33a", attribute: "defense", value: 40 }, ... ], chartType: "point", /* --- Size --- */ size: [500,450], margin: { left: 40, top: 50, bottom: 75, right: 120 }, /* --- Layout --- */ connectorAccessor: (d12) => d12.name, projection: "radial", /* --- Process --- */ oAccessor: "attribute", rAccessor: "value", rExtent: [0,], /* --- Customize --- */ pieceStyle: (d12) => ({ fill: d12.color, stroke: "white", strokeOpacity: 0.5 }), connectorStyle: (d12) => ({ fill: d12.color, fillOpacity: 0.15, stroke: d12.color, strokeWidth: 2, opacity: 0.5 }), title: "Pokemon Base Stats", showAxes: true, foregroundGraphics: [ <g transform="translate(400, 73)" key="legend"> <text key="pikachu" fill={"#e0d33a"}> Pikachu </text> <text key="bulbasaur" y={20} fill={"#9fd0cb"}> Bulbasaur </text> <text key="charmander" y={40} fill={"#E0488B"}> Charmander </text> <text key="squirtle" y={60} fill={"#7566ff"}> Squirtle </text> </g> ], /* --- Interact --- */ enableHover: true, /* --- Annotate --- */ oLabel: true } export default () => { return <StreamOrdinalFrame {...frameProps} /> }