Overview
The Credit Usage Chart widget provides a visual breakdown of how credits are consumed over time. It helps customers understand their spending patterns and identify which features or services drive the most usage.Layout

- Stacked bar chart β shows daily credit consumption across different features or services.
- Color-coded legend β distinguishes usage by feature (e.g., Feature 1, Feature 2, Feature 3).
- Total spend β aggregate credits consumed over the selected timeframe.
- Date range selector β allows filtering usage data (e.g., last 7 days, last 30 days).
Customization
- Brand via the no-code widget designer.
- Use custom CSS when deeper styling is required.
Main component
stigg-credit-usage-chart-containerβ The main wrapper for the entire CreditUsageChart componentstigg-credit-usage-chart-cardβ The card container that holds the chart layout and stylingstigg-credit-usage-chart-skeletonβ The loading skeleton displayed while usage data is being fetchedstigg-credit-usage-chart-barβ The bar element used in the usage visualization
Header component
stigg-credit-usage-chart-headerβ The header container at the top of the chartstigg-credit-usage-chart-titleβ The chart title textstigg-credit-usage-chart-totalβ Displays the total spend or total usage amountstigg-credit-usage-chart-time-range-selectβ Dropdown or selector to change the chartβs time range
Tooltip component
stigg-credit-usage-chart-tooltipβ Tooltip showing detailed usage values on hover
Legend component
stigg-credit-usage-chart-legendβ Wrapper for the entire legend sectionstigg-credit-usage-chart-legend-titleβ Title for the legend blockstigg-credit-usage-chart-legend-title-currency-unitsβ Currency or unit label in the legend headerstigg-credit-usage-chart-legend-itemβ Base class for each legend rowstigg-credit-usage-chart-legend-item-{featureId}β Dynamic class applied per feature, where{featureId}is the featureβs unique identifierstigg-credit-usage-chart-legend-bar-containerβ Container holding the color bar representing each featurestigg-credit-usage-chart-legend-feature-nameβ Wrapper for the feature name in the legendstigg-credit-usage-chart-legend-feature-name-textβ Text label of the feature namestigg-credit-usage-chart-legend-valueβ The usage amount displayed for each feature
Empty state component
stigg-credit-usage-chart-empty-stateβ Displayed when no usage data is available
Error state component
stigg-credit-usage-chart-error-stateβ Shown when the chart fails to load due to an error
