Components / viz.mark
VizHeatmapPreview
Displays a heatmap from bound chart data.
Generated from @oods/foundry 0.10.1
- Categories
- viz.mark
- Contexts
- detail
- Readiness
react-and-vue
Playground
This component's contract doesn't list typed props, so the playground shows its documented example.
Documented example VizHeatmapPreview : mount the authored fragment or shared-renderer SVG, SVG bytes hash 0a661f59cc96aa4b7cbb922cddd0d7bf744171c28b239a5615892353712629b3.
The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.
Four authored sample observations.
Four authored sample observations.
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
import { VizHeatmapPreview } from '@oods/components-react';
import '@oods/component-styles/css';
export function Example() {
return (
<VizHeatmapPreview
svg={"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" class=\"marks\" width=\"370\" height=\"210\" viewBox=\"0 0 370 210\"><rect width=\"370\" height=\"210\" fill=\"#FDF3DE\"/><g fill=\"none\" stroke-miterlimit=\"10\" transform=\"translate(35,33)\"><g class=\"mark-group role-frame root\" role=\"graphics-object\" aria-roledescription=\"group mark container\"><g transform=\"translate(0,0)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h268v126h-268Z\"/><g><g class=\"mark-rect role-mark marks\" role=\"graphics-object\" aria-roledescription=\"rect mark container\"><path aria-label=\"Period: Jan; Category: A; Value: 12\" role=\"graphics-symbol\" aria-roledescription=\"rect mark\" d=\"M134,0h134v63h-134Z\" fill=\"rgb(239, 249, 189)\"/><path aria-label=\"Period: Jan; Category: B; Value: 18\" role=\"graphics-symbol\" aria-roledescription=\"rect mark\" d=\"M134,63h134v63h-134Z\" fill=\"rgb(44, 158, 192)\"/><path aria-label=\"Period: Feb; Category: A; Value: 22\" role=\"graphics-symbol\" aria-roledescription=\"rect mark\" d=\"M0,0h134v63h-134Z\" fill=\"rgb(28, 49, 133)\"/><path aria-label=\"Period: Feb; Category: B; Value: 15\" role=\"graphics-symbol\" aria-roledescription=\"rect mark\" d=\"M0,63h134v63h-134Z\" fill=\"rgb(148, 213, 185)\"/></g><g class=\"mark-group role-legend\" role=\"graphics-symbol\" aria-roledescription=\"legend\" aria-label=\"Gradient legend titled 'Value' for fill color with values from 12 to 22\"><g transform=\"translate(286,0)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h44v142h-44Z\" pointer-events=\"none\"/><g><g class=\"mark-group role-legend-entry\"><g transform=\"translate(0,16)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h0v0h0Z\" pointer-events=\"none\"/><g><g class=\"mark-rect role-legend-gradient\" pointer-events=\"none\"><path d=\"M0,0h16v126h-16Z\" fill=\"url(#oods-id-0)\" stroke=\"#ddd\" stroke-width=\"0\" opacity=\"1\"/></g><g class=\"mark-text role-legend-label\" pointer-events=\"none\"><text text-anchor=\"start\" transform=\"translate(18,124)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"10px\" fill=\"#4B4D5A\" opacity=\"1\">12</text><text text-anchor=\"start\" transform=\"translate(18,8)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"10px\" fill=\"#4B4D5A\" opacity=\"1\">22</text></g></g><path class=\"foreground\" aria-hidden=\"true\" d=\"\" pointer-events=\"none\" display=\"none\"/></g></g><g class=\"mark-text role-legend-title\" pointer-events=\"none\"><text text-anchor=\"start\" transform=\"translate(0,9)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"11px\" font-weight=\"bold\" fill=\"#18233C\" opacity=\"1\">Value</text></g></g><path class=\"foreground\" aria-hidden=\"true\" d=\"\" pointer-events=\"none\" display=\"none\"/></g></g><g class=\"mark-group role-title\"><g transform=\"translate(-30,-28)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h0v0h0Z\" pointer-events=\"none\"/><g><g class=\"mark-text role-title-text\" role=\"graphics-symbol\" aria-roledescription=\"title\" aria-label=\"Title text 'Heatmap chart sample'\" pointer-events=\"none\"><text text-anchor=\"start\" transform=\"translate(0,19)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"24px\" font-weight=\"600\" fill=\"#18233C\" opacity=\"1\">Heatmap chart sample</text></g></g><path class=\"foreground\" aria-hidden=\"true\" d=\"\" pointer-events=\"none\" display=\"none\"/></g></g><g class=\"mark-group role-axis\" role=\"graphics-symbol\" aria-roledescription=\"axis\" aria-label=\"X-axis titled 'Period' for a discrete scale with 2 values: Feb, Jan\"><g transform=\"translate(0.5,126.5)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h0v0h0Z\" pointer-events=\"none\"/><g><g class=\"mark-rule role-axis-tick\" pointer-events=\"none\"><line transform=\"translate(67,0)\" x2=\"0\" y2=\"5\" stroke=\"#D6DAE4\" stroke-width=\"1\" opacity=\"1\"/><line transform=\"translate(201,0)\" x2=\"0\" y2=\"5\" stroke=\"#D6DAE4\" stroke-width=\"1\" opacity=\"1\"/></g><g class=\"mark-text role-axis-label\" pointer-events=\"none\"><text text-anchor=\"end\" transform=\"translate(66.5,7) rotate(270) translate(0,3)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"10px\" fill=\"#4B4D5A\" opacity=\"1\">Feb</text><text text-anchor=\"end\" transform=\"translate(200.5,7) rotate(270) translate(0,3)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"10px\" fill=\"#4B4D5A\" opacity=\"1\">Jan</text></g><g class=\"mark-rule role-axis-domain\" pointer-events=\"none\"><line transform=\"translate(0,0)\" x2=\"268\" y2=\"0\" stroke=\"#D6DAE4\" stroke-width=\"1\" opacity=\"1\"/></g><g class=\"mark-text role-axis-title\" pointer-events=\"none\"><text text-anchor=\"middle\" transform=\"translate(134,44)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"11px\" font-weight=\"bold\" fill=\"#18233C\" opacity=\"1\">Period</text></g></g><path class=\"foreground\" aria-hidden=\"true\" d=\"\" pointer-events=\"none\" display=\"none\"/></g></g><g class=\"mark-group role-axis\" role=\"graphics-symbol\" aria-roledescription=\"axis\" aria-label=\"Y-axis titled 'Category' for a discrete scale with 2 values: A, B\"><g transform=\"translate(0.5,0.5)\"><path class=\"background\" aria-hidden=\"true\" d=\"M0,0h0v0h0Z\" pointer-events=\"none\"/><g><g class=\"mark-rule role-axis-tick\" pointer-events=\"none\"><line transform=\"translate(0,31)\" x2=\"-5\" y2=\"0\" stroke=\"#D6DAE4\" stroke-width=\"1\" opacity=\"1\"/><line transform=\"translate(0,94)\" x2=\"-5\" y2=\"0\" stroke=\"#D6DAE4\" stroke-width=\"1\" opacity=\"1\"/></g><g class=\"mark-text role-axis-label\" pointer-events=\"none\"><text text-anchor=\"end\" transform=\"translate(-7,34)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"10px\" fill=\"#4B4D5A\" opacity=\"1\">A</text><text text-anchor=\"end\" transform=\"translate(-7,97)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"10px\" fill=\"#4B4D5A\" opacity=\"1\">B</text></g><g class=\"mark-rule role-axis-domain\" pointer-events=\"none\"><line transform=\"translate(0,0)\" x2=\"0\" y2=\"126\" stroke=\"#D6DAE4\" stroke-width=\"1\" opacity=\"1\"/></g><g class=\"mark-text role-axis-title\" pointer-events=\"none\"><text text-anchor=\"middle\" transform=\"translate(-19,63) rotate(-90) translate(0,-2)\" font-family=\"'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif\" font-size=\"11px\" font-weight=\"bold\" fill=\"#18233C\" opacity=\"1\">Category</text></g></g><path class=\"foreground\" aria-hidden=\"true\" d=\"\" pointer-events=\"none\" display=\"none\"/></g></g></g><path class=\"foreground\" aria-hidden=\"true\" d=\"\" display=\"none\"/></g></g></g><defs><linearGradient id=\"oods-id-0\" x1=\"0\" x2=\"0\" y1=\"1\" y2=\"0\"><stop offset=\"0\" stop-color=\"rgb(239, 249, 189)\"/><stop offset=\"0.05\" stop-color=\"rgb(229, 245, 185)\"/><stop offset=\"0.1\" stop-color=\"rgb(219, 241, 180)\"/><stop offset=\"0.15\" stop-color=\"rgb(204, 235, 181)\"/><stop offset=\"0.2\" stop-color=\"rgb(189, 229, 181)\"/><stop offset=\"0.25\" stop-color=\"rgb(169, 221, 183)\"/><stop offset=\"0.3\" stop-color=\"rgb(148, 213, 185)\"/><stop offset=\"0.35\" stop-color=\"rgb(126, 205, 188)\"/><stop offset=\"0.4\" stop-color=\"rgb(105, 197, 190)\"/><stop offset=\"0.45\" stop-color=\"rgb(87, 189, 192)\"/><stop offset=\"0.5\" stop-color=\"rgb(69, 180, 194)\"/><stop offset=\"0.55\" stop-color=\"rgb(57, 169, 193)\"/><stop offset=\"0.6\" stop-color=\"rgb(44, 158, 192)\"/><stop offset=\"0.65\" stop-color=\"rgb(39, 144, 188)\"/><stop offset=\"0.7\" stop-color=\"rgb(33, 130, 184)\"/><stop offset=\"0.75\" stop-color=\"rgb(33, 115, 177)\"/><stop offset=\"0.8\" stop-color=\"rgb(33, 99, 170)\"/><stop offset=\"0.85\" stop-color=\"rgb(34, 85, 163)\"/><stop offset=\"0.9\" stop-color=\"rgb(35, 71, 156)\"/><stop offset=\"0.95\" stop-color=\"rgb(32, 60, 145)\"/><stop offset=\"1\" stop-color=\"rgb(28, 49, 133)\"/></linearGradient></defs></svg>"}
title="Heatmap chart sample"
description="Four authored sample observations."
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 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" class="marks" width="370" height="210" viewBox="0 0 370 210"><rect width="370" height="210" fill="#FDF3DE"/><g fill="none" stroke-miterlimit="10" transform="translate(35,33)"><g class="mark-group role-frame root" role="graphics-object" aria-roledescription="group mark container"><g transform="translate(0,0)"><path class="background" aria-hidden="true" d="M0,0h268v126h-268Z"/><g><g class="mark-rect role-mark marks" role="graphics-object" aria-roledescription="rect mark container"><path aria-label="Period: Jan; Category: A; Value: 12" role="graphics-symbol" aria-roledescription="rect mark" d="M134,0h134v63h-134Z" fill="rgb(239, 249, 189)"/><path aria-label="Period: Jan; Category: B; Value: 18" role="graphics-symbol" aria-roledescription="rect mark" d="M134,63h134v63h-134Z" fill="rgb(44, 158, 192)"/><path aria-label="Period: Feb; Category: A; Value: 22" role="graphics-symbol" aria-roledescription="rect mark" d="M0,0h134v63h-134Z" fill="rgb(28, 49, 133)"/><path aria-label="Period: Feb; Category: B; Value: 15" role="graphics-symbol" aria-roledescription="rect mark" d="M0,63h134v63h-134Z" fill="rgb(148, 213, 185)"/></g><g class="mark-group role-legend" role="graphics-symbol" aria-roledescription="legend" aria-label="Gradient legend titled 'Value' for fill color with values from 12 to 22"><g transform="translate(286,0)"><path class="background" aria-hidden="true" d="M0,0h44v142h-44Z" pointer-events="none"/><g><g class="mark-group role-legend-entry"><g transform="translate(0,16)"><path class="background" aria-hidden="true" d="M0,0h0v0h0Z" pointer-events="none"/><g><g class="mark-rect role-legend-gradient" pointer-events="none"><path d="M0,0h16v126h-16Z" fill="url(#oods-id-0)" stroke="#ddd" stroke-width="0" opacity="1"/></g><g class="mark-text role-legend-label" pointer-events="none"><text text-anchor="start" transform="translate(18,124)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="10px" fill="#4B4D5A" opacity="1">12</text><text text-anchor="start" transform="translate(18,8)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="10px" fill="#4B4D5A" opacity="1">22</text></g></g><path class="foreground" aria-hidden="true" d="" pointer-events="none" display="none"/></g></g><g class="mark-text role-legend-title" pointer-events="none"><text text-anchor="start" transform="translate(0,9)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="11px" font-weight="bold" fill="#18233C" opacity="1">Value</text></g></g><path class="foreground" aria-hidden="true" d="" pointer-events="none" display="none"/></g></g><g class="mark-group role-title"><g transform="translate(-30,-28)"><path class="background" aria-hidden="true" d="M0,0h0v0h0Z" pointer-events="none"/><g><g class="mark-text role-title-text" role="graphics-symbol" aria-roledescription="title" aria-label="Title text 'Heatmap chart sample'" pointer-events="none"><text text-anchor="start" transform="translate(0,19)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="24px" font-weight="600" fill="#18233C" opacity="1">Heatmap chart sample</text></g></g><path class="foreground" aria-hidden="true" d="" pointer-events="none" display="none"/></g></g><g class="mark-group role-axis" role="graphics-symbol" aria-roledescription="axis" aria-label="X-axis titled 'Period' for a discrete scale with 2 values: Feb, Jan"><g transform="translate(0.5,126.5)"><path class="background" aria-hidden="true" d="M0,0h0v0h0Z" pointer-events="none"/><g><g class="mark-rule role-axis-tick" pointer-events="none"><line transform="translate(67,0)" x2="0" y2="5" stroke="#D6DAE4" stroke-width="1" opacity="1"/><line transform="translate(201,0)" x2="0" y2="5" stroke="#D6DAE4" stroke-width="1" opacity="1"/></g><g class="mark-text role-axis-label" pointer-events="none"><text text-anchor="end" transform="translate(66.5,7) rotate(270) translate(0,3)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="10px" fill="#4B4D5A" opacity="1">Feb</text><text text-anchor="end" transform="translate(200.5,7) rotate(270) translate(0,3)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="10px" fill="#4B4D5A" opacity="1">Jan</text></g><g class="mark-rule role-axis-domain" pointer-events="none"><line transform="translate(0,0)" x2="268" y2="0" stroke="#D6DAE4" stroke-width="1" opacity="1"/></g><g class="mark-text role-axis-title" pointer-events="none"><text text-anchor="middle" transform="translate(134,44)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="11px" font-weight="bold" fill="#18233C" opacity="1">Period</text></g></g><path class="foreground" aria-hidden="true" d="" pointer-events="none" display="none"/></g></g><g class="mark-group role-axis" role="graphics-symbol" aria-roledescription="axis" aria-label="Y-axis titled 'Category' for a discrete scale with 2 values: A, B"><g transform="translate(0.5,0.5)"><path class="background" aria-hidden="true" d="M0,0h0v0h0Z" pointer-events="none"/><g><g class="mark-rule role-axis-tick" pointer-events="none"><line transform="translate(0,31)" x2="-5" y2="0" stroke="#D6DAE4" stroke-width="1" opacity="1"/><line transform="translate(0,94)" x2="-5" y2="0" stroke="#D6DAE4" stroke-width="1" opacity="1"/></g><g class="mark-text role-axis-label" pointer-events="none"><text text-anchor="end" transform="translate(-7,34)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="10px" fill="#4B4D5A" opacity="1">A</text><text text-anchor="end" transform="translate(-7,97)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="10px" fill="#4B4D5A" opacity="1">B</text></g><g class="mark-rule role-axis-domain" pointer-events="none"><line transform="translate(0,0)" x2="0" y2="126" stroke="#D6DAE4" stroke-width="1" opacity="1"/></g><g class="mark-text role-axis-title" pointer-events="none"><text text-anchor="middle" transform="translate(-19,63) rotate(-90) translate(0,-2)" font-family="'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif" font-size="11px" font-weight="bold" fill="#18233C" opacity="1">Category</text></g></g><path class="foreground" aria-hidden="true" d="" pointer-events="none" display="none"/></g></g></g><path class="foreground" aria-hidden="true" d="" display="none"/></g></g></g><defs><linearGradient id="oods-id-0" x1="0" x2="0" y1="1" y2="0"><stop offset="0" stop-color="rgb(239, 249, 189)"/><stop offset="0.05" stop-color="rgb(229, 245, 185)"/><stop offset="0.1" stop-color="rgb(219, 241, 180)"/><stop offset="0.15" stop-color="rgb(204, 235, 181)"/><stop offset="0.2" stop-color="rgb(189, 229, 181)"/><stop offset="0.25" stop-color="rgb(169, 221, 183)"/><stop offset="0.3" stop-color="rgb(148, 213, 185)"/><stop offset="0.35" stop-color="rgb(126, 205, 188)"/><stop offset="0.4" stop-color="rgb(105, 197, 190)"/><stop offset="0.45" stop-color="rgb(87, 189, 192)"/><stop offset="0.5" stop-color="rgb(69, 180, 194)"/><stop offset="0.55" stop-color="rgb(57, 169, 193)"/><stop offset="0.6" stop-color="rgb(44, 158, 192)"/><stop offset="0.65" stop-color="rgb(39, 144, 188)"/><stop offset="0.7" stop-color="rgb(33, 130, 184)"/><stop offset="0.75" stop-color="rgb(33, 115, 177)"/><stop offset="0.8" stop-color="rgb(33, 99, 170)"/><stop offset="0.85" stop-color="rgb(34, 85, 163)"/><stop offset="0.9" stop-color="rgb(35, 71, 156)"/><stop offset="0.95" stop-color="rgb(32, 60, 145)"/><stop offset="1" stop-color="rgb(28, 49, 133)"/></linearGradient></defs></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 | Heatmap chart sample |
description | string | undefined | no | Four authored sample observations. |
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="VizHeatmapPreview"]
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. VizHeatmapPreview uses the existing heatmap 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.
react-and-vue: catalog_list gives this label when the React and Vue components have complete readiness evidence, but the sweep's generated apps don't use the component in both.
| 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 |
VizHeatmapPreview 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": "<YourVizHeatmapPreview>",
"oodsTraits": [
"MarkRect"
],
"substitution": {
"component": "VizHeatmapPreview",
"react": {
"package": "<your-package>/react",
"version": "<exact version>",
"export": "<YourVizHeatmapPreview>"
},
"vue": {
"package": "<your-package>/vue",
"version": "<exact version>",
"export": "<YourVizHeatmapPreview>"
}
}
} 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.VizHeatmapPreviewsha256:9da9e4aeff34… - Documented example:
@oods/component-contracts@0.10.1 sharedScenarios VizHeatmapPreviewsha256:0e71a20d09cd… - Catalog entry (catalog_list):
generated/0.10.1/system/catalog.json VizHeatmapPreviewsha256:dd618d588c51… - React readiness:
@oods/components-react@0.10.1 readiness VizHeatmapPreviewsha256:c8c229b5fffa… - Vue readiness:
@oods/components-vue@0.10.1 readiness VizHeatmapPreviewsha256:dad9f02d510f… - Prop types:
generated/0.10.1/components/prop-types.json VizHeatmapPreviewsha256:520236e3f821…