Styles
containerStyle
- Type:
CSSStyleDeclaration
Apply inline styles to the chart container.
<prompt-chart id="chart" prompt="Show trends" demo autoFetch></prompt-chart>
<script>
document.getElementById('chart').containerStyle = {
width: '600px',
height: '400px',
borderRadius: '8px',
};
</script>
stateText
- Type: {
empty?: string,loading?: string,retry?: string}
Customize text displayed in various component states.
| Property | Type | Description |
|---|---|---|
empty | string | Text shown when no data or prompt is set |
loading | string | Text shown while fetching data |
retry | string | Text for the retry button on error |
<prompt-chart id="chart"></prompt-chart>
<script>
document.getElementById('chart').stateText = {
empty: 'Enter a prompt',
loading: 'Generating...',
retry: 'Try Again',
};
</script>