Components / viz.mark
VizGraphPreview
Displays a graph or network chart from bound data.
Generated from @oods/foundry 0.10.1
- Categories
- viz.mark
- Contexts
- detail
- Readiness
proven-in-generated-apps
Playground
This component's contract doesn't list typed props, so the playground shows its documented example.
Documented example VizGraphPreview : mount public force_graph SVG, a named graph figure preserving the exact public SVG.
The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.
Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data.
Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data.
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
import { VizGraphPreview } from '@oods/components-react';
import '@oods/component-styles/css';
export function Example() {
return (
<VizGraphPreview
svg={"<svg width=\"360\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" viewBox=\"0 0 360 200\" role=\"img\" aria-label=\"Example connected relationships\" aria-description=\"Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data.\"><title>Example connected relationships</title><desc>Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data.</desc>\n<rect width=\"360\" height=\"200\" x=\"0\" y=\"0\" fill=\"#FFFFFF\"></rect>\n<path d=\"M239.2 59.3Q245.2 127.2 188.1 164.5\" fill=\"none\" pointer-events=\"visible\" stroke=\"rgb(62, 99, 221)\" stroke-opacity=\"0.75\" ecmeta_series_index=\"0\" ecmeta_data_index=\"0\" ecmeta_ssr_type=\"chart\" class=\"oods-zr-0\"></path>\n<path d=\"M188.1 164.5Q123.9 143 112.7 76.2\" fill=\"none\" pointer-events=\"visible\" stroke=\"rgb(62, 99, 221)\" stroke-opacity=\"0.75\" ecmeta_series_index=\"0\" ecmeta_data_index=\"1\" ecmeta_ssr_type=\"chart\" class=\"oods-zr-0\"></path>\n<path d=\"M112.7 76.2Q176.9 97.7 188.1 164.5\" fill=\"none\" pointer-events=\"visible\" stroke=\"rgb(62, 99, 221)\" stroke-opacity=\"0.75\" ecmeta_series_index=\"0\" ecmeta_data_index=\"2\" ecmeta_ssr_type=\"chart\" class=\"oods-zr-0\"></path>\n<path d=\"M1 0A1 1 0 1 1 1 -0.1A1 1 0 0 1 1 0\" transform=\"matrix(5,0,0,5,112.6711,76.2258)\" fill=\"rgb(62, 99, 221)\" ecmeta_series_index=\"0\" ecmeta_data_index=\"0\" ecmeta_ssr_type=\"chart\" class=\"oods-zr-1\"></path>\n<path d=\"M1 0A1 1 0 1 1 1 -0.1A1 1 0 0 1 1 0\" transform=\"matrix(5,0,0,5,188.0808,164.5013)\" fill=\"rgb(62, 99, 221)\" ecmeta_series_index=\"0\" ecmeta_data_index=\"1\" ecmeta_ssr_type=\"chart\" class=\"oods-zr-1\"></path>\n<path d=\"M1 0A1 1 0 1 1 1 -0.1A1 1 0 0 1 1 0\" transform=\"matrix(5,0,0,5,239.241,59.2736)\" fill=\"rgb(62, 99, 221)\" ecmeta_series_index=\"0\" ecmeta_data_index=\"2\" ecmeta_ssr_type=\"chart\" class=\"oods-zr-1\"></path>\n<text dominant-baseline=\"central\" text-anchor=\"start\" style=\"font-size:12px;font-family:sans-serif;\" transform=\"translate(122.6711 76.2258)\" fill=\"#0A0A0A\">example-document</text>\n<text dominant-baseline=\"central\" text-anchor=\"start\" style=\"font-size:12px;font-family:sans-serif;\" transform=\"translate(198.0808 164.5013)\" fill=\"#0A0A0A\">example-project</text>\n<text dominant-baseline=\"central\" text-anchor=\"start\" style=\"font-size:12px;font-family:sans-serif;\" transform=\"translate(249.241 59.2736)\" fill=\"#0A0A0A\">example-team</text>\n<path d=\"M-108.1 -5l216.2 0l0 24l-216.2 0Z\" transform=\"translate(180 13)\" fill=\"rgb(0,0,0)\" fill-opacity=\"0\" stroke=\"#3c3c41\" stroke-width=\"0\" class=\"oods-zr-2\"></path>\n<text dominant-baseline=\"central\" text-anchor=\"middle\" style=\"font-size:14px;font-family:sans-serif;font-weight:600;\" xml:space=\"preserve\" y=\"7\" transform=\"translate(180 13)\" fill=\"#0A0A0A\">Example connected relationships</text>\n<style ><![CDATA[\n.oods-zr-0:hover {\ncursor:pointer;\nstroke-width:4;\n}\n.oods-zr-1:hover {\ncursor:pointer;\nfill:rgba(68,108,243,1);\n}\n.oods-zr-2:hover {\npointer-events:none;\n}\n\n]]>\n\n</style>\n</svg>"}
title="Example connected relationships"
description="Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data."
width={360}
height={200}
/>
);
}Props, slots and events
Contract version 1.1.0. Types are from the React declarations in @oods/components-react.
| Prop | Type | Required | Documented example |
|---|---|---|---|
svg | string | undefined | no | <svg width="360" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" viewBox="0 0 360 200" role="img" aria-label="Example connected relationships" aria-description="Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data."><title>Example connected relationships</title><desc>Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data.</desc>
<rect width="360" height="200" x="0" y="0" fill="#FFFFFF"></rect>
<path d="M239.2 59.3Q245.2 127.2 188.1 164.5" fill="none" pointer-events="visible" stroke="rgb(62, 99, 221)" stroke-opacity="0.75" ecmeta_series_index="0" ecmeta_data_index="0" ecmeta_ssr_type="chart" class="oods-zr-0"></path>
<path d="M188.1 164.5Q123.9 143 112.7 76.2" fill="none" pointer-events="visible" stroke="rgb(62, 99, 221)" stroke-opacity="0.75" ecmeta_series_index="0" ecmeta_data_index="1" ecmeta_ssr_type="chart" class="oods-zr-0"></path>
<path d="M112.7 76.2Q176.9 97.7 188.1 164.5" fill="none" pointer-events="visible" stroke="rgb(62, 99, 221)" stroke-opacity="0.75" ecmeta_series_index="0" ecmeta_data_index="2" ecmeta_ssr_type="chart" class="oods-zr-0"></path>
<path d="M1 0A1 1 0 1 1 1 -0.1A1 1 0 0 1 1 0" transform="matrix(5,0,0,5,112.6711,76.2258)" fill="rgb(62, 99, 221)" ecmeta_series_index="0" ecmeta_data_index="0" ecmeta_ssr_type="chart" class="oods-zr-1"></path>
<path d="M1 0A1 1 0 1 1 1 -0.1A1 1 0 0 1 1 0" transform="matrix(5,0,0,5,188.0808,164.5013)" fill="rgb(62, 99, 221)" ecmeta_series_index="0" ecmeta_data_index="1" ecmeta_ssr_type="chart" class="oods-zr-1"></path>
<path d="M1 0A1 1 0 1 1 1 -0.1A1 1 0 0 1 1 0" transform="matrix(5,0,0,5,239.241,59.2736)" fill="rgb(62, 99, 221)" ecmeta_series_index="0" ecmeta_data_index="2" ecmeta_ssr_type="chart" class="oods-zr-1"></path>
<text dominant-baseline="central" text-anchor="start" style="font-size:12px;font-family:sans-serif;" transform="translate(122.6711 76.2258)" fill="#0A0A0A">example-document</text>
<text dominant-baseline="central" text-anchor="start" style="font-size:12px;font-family:sans-serif;" transform="translate(198.0808 164.5013)" fill="#0A0A0A">example-project</text>
<text dominant-baseline="central" text-anchor="start" style="font-size:12px;font-family:sans-serif;" transform="translate(249.241 59.2736)" fill="#0A0A0A">example-team</text>
<path d="M-108.1 -5l216.2 0l0 24l-216.2 0Z" transform="translate(180 13)" fill="rgb(0,0,0)" fill-opacity="0" stroke="#3c3c41" stroke-width="0" class="oods-zr-2"></path>
<text dominant-baseline="central" text-anchor="middle" style="font-size:14px;font-family:sans-serif;font-weight:600;" xml:space="preserve" y="7" transform="translate(180 13)" fill="#0A0A0A">Example connected relationships</text>
<style ><![CDATA[
.oods-zr-0:hover {
cursor:pointer;
stroke-width:4;
}
.oods-zr-1:hover {
cursor:pointer;
fill:rgba(68,108,243,1);
}
.oods-zr-2:hover {
pointer-events:none;
}
]]>
</style>
</svg> |
svg | string | undefined | no | |
svg | string | undefined | no | |
svg | string | undefined | no | |
svg | string | undefined | no | |
svg | string | undefined | no | |
svg | string | undefined | no | |
svg | string | undefined | no | |
svg | string | undefined | no | |
title | string | undefined | no | Example connected relationships |
description | string | undefined | no | Synthetic neighborhood edges illustrating relationships that share an endpoint; these are examples, not live graph data. |
width | number | undefined | no | 360 |
height | number | undefined | no | 200 |
Slots
default
Events
none
States
unbound, rendered
Accessibility
- Role
img- How it gets its name
aria-labelon[data-oods-component="VizGraphPreview"]
Keyboard
The contract lists no keyboard behaviour.
Obligations in the contract
- Static shared-renderer SVG is preserved inside a named image figure; absence is explicitly disclosed.
Recipe over VizAreaPreview's static SVG mechanism. VizGraphPreview uses the existing force_graph renderer; this is no new chart family. No pixels are invented when svg is absent.
Tokens
The token roles this component reads.
surface.paneltext.body
Readiness
The evidence recorded for this component, with its label.
proven-in-generated-apps: catalog_list gives this label when generated React and Vue apps in the runtime sweep that ships with this version both use the component. That sweep was measured on the published 0.4.1, not on this version.
| Evidence | React | Vue |
|---|---|---|
| state | implemented-evidence-complete | implemented-evidence-complete |
| versioned contract | passed | passed |
| target implementation | passed | passed |
| package export | passed | passed |
| public declaration | passed | passed |
| dependency closure | passed | passed |
| framework scenario | passed | passed |
| accessibility | verified | verified |
| interaction | not-applicable | not-applicable |
| visual themes | verified | verified |
VizGraphPreview displays an authored chart input or rendered static SVG and owns no focusable control or consumer action.
Use your own
You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.
The component_map call, with the parts in angle brackets yours to fill:
{
"action": "create",
"apply": true,
"externalSystem": "<your design system>",
"externalComponent": "<YourVizGraphPreview>",
"oodsTraits": [
"MarkGraph"
],
"substitution": {
"component": "VizGraphPreview",
"react": {
"package": "<your-package>/react",
"version": "<exact version>",
"export": "<YourVizGraphPreview>"
},
"vue": {
"package": "<your-package>/vue",
"version": "<exact version>",
"export": "<YourVizGraphPreview>"
}
}
} How this page was made
Generated at build from the published data, each source with the hash of what was read. The page's manifest.
- Contract:
@oods/component-contracts@0.10.1 componentContracts.VizGraphPreviewsha256:febaf033cf30… - Documented example:
@oods/component-contracts@0.10.1 sharedScenarios VizGraphPreviewsha256:602941df690d… - Catalog entry (catalog_list):
generated/0.10.1/system/catalog.json VizGraphPreviewsha256:4077a7b8fcb1… - React readiness:
@oods/components-react@0.10.1 readiness VizGraphPreviewsha256:ab3d854980b4… - Vue readiness:
@oods/components-vue@0.10.1 readiness VizGraphPreviewsha256:5536bbfa48fe… - Prop types:
generated/0.10.1/components/prop-types.json VizGraphPreviewsha256:520236e3f821…