Skip to main content

Styles

containerStyle

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.

PropertyTypeDescription
emptystringText shown when no data or prompt is set
loadingstringText shown while fetching data
retrystringText 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>