Components / viz.mark
VizLineControls
Edits the settings for a line chart.
Generated from @oods/foundry 0.10.1
- Categories
- viz.mark
- Contexts
- form
- Readiness
react-and-vue
Playground
This component's contract doesn't list typed props, so the playground shows its documented example.
Documented example VizLineControls : append x to the first field, {"chartType":"line","encodings":{"x":{"field":"periodx","type":"nominal","sort":"ascending"},"y":{"field":"value","type":"quantitative"}}}.
The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.
Events it emits: change. Use either render above, and each event shows here with the framework that sent it.
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
import { VizLineControls } from '@oods/components-react';
import '@oods/component-styles/css';
const value = {
"chartType": "line",
"encodings": {
"x": {
"field": "period",
"type": "nominal",
"sort": "ascending"
},
"y": {
"field": "value",
"type": "quantitative"
}
}
};
export function Example() {
return (
<VizLineControls
value={value}
/>
);
}Props, slots and events
Contract version 1.1.0. Types are from the React declarations in @oods/components-react.
| Prop | Type | Required | Documented example |
|---|---|---|---|
title | string | undefined | no | |
value | VizIntentFragment | undefined | no | {"chartType":"line","encodings":{"x":{"field":"period","type":"nominal","sort":"ascending"},"y":{"field":"value","type":"quantitative"}}} |
channel | "x" | "y" | undefined | no | |
disabled | boolean | undefined | no |
Slots
none
Events
change
States
bound, editing, invalid, disabled
Accessibility
- Role
textbox- How it gets its name
labeloninput[name="x.field"]
Keyboard
| Key | What it does |
|---|---|
| Tab | Focus the labelled chart input |
| x | Edit the declared field name |
Obligations in the contract
- Native labelled controls expose focus and invalid-edit feedback; successful edits emit a typed viz.render input fragment.
Line chart: controls the public Cartesian viz.render fragment, not the legacy HTML placeholder's unimplemented styling fields. The consumer supplies rows and calls the renderer. Opacity uses six bounded presets; fields/colors/scale/chart type preserve sibling input bindings. No consumer action is executed by this component.
Tokens
The token roles this component reads.
input.backgroundinput.borderinput.textinput.focusfield.message
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 | verified | verified |
| visual themes | verified | verified |
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": "<YourVizLineControls>",
"oodsTraits": [
"MarkLine"
],
"substitution": {
"component": "VizLineControls",
"react": {
"package": "<your-package>/react",
"version": "<exact version>",
"export": "<YourVizLineControls>"
},
"vue": {
"package": "<your-package>/vue",
"version": "<exact version>",
"export": "<YourVizLineControls>"
}
}
} 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.VizLineControlssha256:b273e0a93d43… - Documented example:
@oods/component-contracts@0.10.1 sharedScenarios VizLineControlssha256:fa0b7a33cdd2… - Catalog entry (catalog_list):
generated/0.10.1/system/catalog.json VizLineControlssha256:a1dd9411ed88… - React readiness:
@oods/components-react@0.10.1 readiness VizLineControlssha256:473ae97d953f… - Vue readiness:
@oods/components-vue@0.10.1 readiness VizLineControlssha256:f4b7f2f161cb… - Prop types:
generated/0.10.1/components/prop-types.json VizLineControlssha256:3200947d11d0…