Appearance
Configuration API
These methods control the visual appearance and interactive behavior of the Tuva Data Tool. Access them via the actions property of the component instance.
changeTheme
Switch between visual themes.
typescript
changeTheme(theme: 'tuva' | 'yellow-on-blue' | 'reverse-contrast' | 'black-on-rose'): voidParameters
| Name | Type | Description |
|---|---|---|
theme | 'tuva' | 'yellow-on-blue' | 'reverse-contrast' | 'black-on-rose' | The theme to apply |
Example
javascript
// Switch to different themes
tuvaDataTools.actions.changeTheme('reverse-contrast');
tuvaDataTools.actions.changeTheme('tuva');
tuvaDataTools.actions.changeTheme('yellow-on-blue');
tuvaDataTools.actions.changeTheme('black-on-rose');Try It Out
setGridLines
Toggle the visibility of grid lines on the plot.
typescript
setGridLines(value: boolean): voidParameters
| Name | Type | Description |
|---|---|---|
value | boolean | true to show grid lines, false to hide |
Example
javascript
// Show grid lines
tuvaDataTools.actions.setGridLines(true);
// Hide grid lines
tuvaDataTools.actions.setGridLines(false);Try It Out
setFontSize
Adjust the base font size for the visualization using a multiplier.
typescript
setFontSize(value: number): voidParameters
| Name | Type | Description |
|---|---|---|
value | number | Font size multiplier (1, 1.2, or 1.3) |
Example
javascript
// Set standard font size
tuvaDataTools.actions.setFontSize(1);
// Set larger font for presentations
tuvaDataTools.actions.setFontSize(1.2);
// Set even larger font
tuvaDataTools.actions.setFontSize(1.3);Try It Out
setCaseIconSize
Set the size of case icons in the visualization.
typescript
setCaseIconSize(value: number): voidParameters
| Name | Type | Description |
|---|---|---|
value | number | Size of case icons: 0 (standard/default), 5, 10, 15, 20, 40, or 80 |
Example
javascript
// Standard size (default)
tuvaDataTools.actions.setCaseIconSize(0);
// Larger case icons
tuvaDataTools.actions.setCaseIconSize(10);
// Smaller case icons for dense data
tuvaDataTools.actions.setCaseIconSize(5);Try It Out
setAnimation
Enable or disable animation transitions.
typescript
setAnimation(value: boolean): voidParameters
| Name | Type | Description |
|---|---|---|
value | boolean | true to enable animations, false to disable |
Example
javascript
// Enable smooth transitions
tuvaDataTools.actions.setAnimation(true);
// Disable for better performance with large datasets
tuvaDataTools.actions.setAnimation(false);Try It Out
setPlotTitleVisible
Control the visibility of the plot title.
typescript
setPlotTitleVisible(value: boolean): voidParameters
| Name | Type | Description |
|---|---|---|
value | boolean | true to show title, false to hide |
Example
javascript
// Hide title for embedded views
tuvaDataTools.actions.setPlotTitleVisible(false);setStatsLabels
Show or hide statistics labels on the plot.
typescript
setStatsLabels(value: boolean): voidParameters
| Name | Type | Description |
|---|---|---|
value | boolean | true to show labels, false to hide |
Example
javascript
// Show statistics labels
tuvaDataTools.actions.setStatsLabels(true);
// Hide statistics labels (default)
tuvaDataTools.actions.setStatsLabels(false);setAttributeKeyboardSupport
Enable or disable keyboard navigation for attribute selection.
typescript
setAttributeKeyboardSupport(value: boolean): voidParameters
| Name | Type | Description |
|---|---|---|
value | boolean | true to enable keyboard navigation |
Example
javascript
// Enable accessibility features
tuvaDataTools.actions.setAttributeKeyboardSupport(true);changeMode
Change the display mode of the visualization.
typescript
changeMode(mode: 'elem' | 'middle' | 'high' | ''): voidParameters
| Name | Type | Description |
|---|---|---|
mode | 'elem' | 'middle' | 'high' | '' | Display mode to apply |
Example
javascript
tuvaDataTools.actions.changeMode('elem');
tuvaDataTools.actions.changeMode('middle');
tuvaDataTools.actions.changeMode('high');Other Configuration Methods
setDisplayAttributeSetting
Configure how attributes are displayed in the interface.
typescript
setDisplayAttributeSetting(value: object): voidsetCaseCardCollapsible
Enable or disable the collapsibility of case cards.
typescript
setCaseCardCollapsible(value: boolean): voidsetCustomAttribute
Set custom attribute configurations.
typescript
setCustomAttribute(value: object): voidsetPlotReset
Configure the plot reset behavior.
typescript
setPlotReset(value: boolean): voidComplete Configuration Example
Here's an example showing multiple configuration methods used together:
javascript
// Render component
const tuvaDataTools = ReactDOM.render(
React.createElement(TuvaDataTools, {
columnIds: columnIds,
columnNames: columnNames,
rowData: rowData,
metaData: metaData
}),
document.getElementById('root')
);
// Apply configuration after render
setTimeout(() => {
// Theme
tuvaDataTools.actions.changeTheme('reverse-contrast');
// Visual settings
tuvaDataTools.actions.setFontSize(1.2);
tuvaDataTools.actions.setCaseIconSize(10);
tuvaDataTools.actions.setGridLines(true);
tuvaDataTools.actions.setStatsLabels(true);
// Enable animations for smooth transitions
tuvaDataTools.actions.setAnimation(true);
// Accessibility
tuvaDataTools.actions.setAttributeKeyboardSupport(true);
}, 500);
