Array of data to display.
Function that will be executed when user clicks a chart element.
horizontal
by default.
Padding in px
between chart elements. 15
by default.
false
by default. Determines location of the line base
false
by default. Change text orientation to top-down when it is positioned vertically.
<drayman-claviz-charts />
Charts powered by claviz-charts library.
Example of usage
export const component: DraymanComponent = async ({ forceUpdate }) => { let selected: { value: number; label: string; }; return () => { const onClick = async (data) => { selected = data; await forceUpdate(); } return ( <div style={{ height: '200px' }}> <drayman-claviz-charts data={ [ { color: 'black', label: 'Fruits', data: [ { value: 10, label: 'Apples', color: 'green' }, { value: 5, label: 'Oranges', color: 'orange' } ] }, { color: 'black', label: 'Vegetables', data: [ { value: 12, label: 'Tomatoes', color: 'red' }, ] } ]} onClick={onClick} /> {selected && `You have selected ${selected.value} ${selected.label}!`} </div> ) } }