Skip to main content
This page contains raw component examples. For a comprehensive, organized reference with detailed explanations, see our Component Options Reference.

Databrain Demo - StackBlitz

StackBlitz

📚 Component Options Reference

View the comprehensive, organized reference guide with detailed explanations, examples, and best practices for all component options.

Dashboard Component

Metric Component

For the metric-filter-optionsprop, invalid options will be filtered out.

Server Event.

FAQs

As a web component, it does not automatically re-render upon prop changes. A common approach to address this is to force a re-render by displaying a loader and temporarily hiding the web component during prop updates. Instead of directly changing the props, you can set a temporary state to display the loader or hide the metric, then update the prop after a brief delay.
  • chart-colors is a direct attribute on the component
  • chartColors is a property within the options object
  • Both serve the same purpose but chartColors in options takes precedence
Use the various disable/hide options available:
For metric components:
Common issues with JSON.stringify:
  1. Undefined values are omitted:
  1. Functions are omitted:
  1. Circular references cause errors:
Enable Debug Mode:
Common Debugging Steps:
  1. Open browser DevTools → Console
  2. Look for error messages starting with “Databrain:”
  3. Check Network tab for failed API requests
  4. Verify token validity in Application → Local Storage
  5. Test with minimal component configuration
Component Health Check:
High Performance Impact:
  • disableMainLoader: false - Shows loading animations
  • disableUnderlyingData: false - Loads additional data
  • chart-renderer-type: "svg" - More CPU intensive than canvas
  • Complex chartAppearance configurations
Optimization Recommendations:
For Large Datasets:
Memory Usage:
  • Limit simultaneous dashboard instances
  • Use lazy loading for multiple components
  • Consider component cleanup on unmount