4 min readUpdated Mar 2, 2026

ScoreHeaderElement Documentation

Overview

The ScoreHeaderElement is a feature designed for the Vantage analytics and data platform. Its primary purpose is to display a score header that provides a quick visual summary of a specific metric or KPI (Key Performance Indicator). The component features a title, a subtitle, and a score along with a maximum score that allows users to understand performance at a glance, highlighting areas needing attention through color coding.

Settings

The ScoreHeaderElement receives various settings as part of its configuration, influencing its appearance and behavior. Below are the detailed explanations of each setting:

1. label

2. subtitle

3. maxScore

4. style

How It Works

The ScoreHeaderElement component operates by taking an element object which contains configuration details and a workflows array for context.

  1. Configuration Extraction: The config property is accessed from the element to configure the title, subtitle, maximum score, and styling.

  2. Score Calculation: It attempts to find the appropriate workflow from the workflows array using the workflowId present within the element. If a corresponding workflow exists, a mock score of 82 is assigned; otherwise, the score defaults to 0.

  3. Color Logic: The color of the displayed score is determined by applying a function (getScoreColor) which takes the score as an argument. This function assigns:

    • Yellow for scores >= 80
    • Blue for scores >= 50
    • Red for scores < 50
  4. Rendering: Finally, the component is rendered, displaying the title, subtitle, and score within a flexible and responsive layout.

Use Cases & Examples

Use Case 1: Executive Dashboards

A business might use ScoreHeaderElement as part of an executive dashboard to visually represent revenue growth metrics. This would help executives quickly assess performance at a glance.

Use Case 2: Sales Performance Tracking

In a sales department, the component could be used to track monthly sales performance against set targets, providing team members with quick insights into whether they are meeting, exceeding, or falling short of goals.

Configuration Example

Scenario

For a sales performance dashboard, suppose a company wants to track monthly revenue. They wish to highlight performance levels based on a maximum score of $500,000.

Configuration Data

javascript
const elementConfig = {
    label: "Monthly Revenue",
    subtitle: "Sales Performance Overview",
    maxScore: 500000,
    style: {
        backgroundColor: '#f0f4f8',
        border: '1px solid #ccc',
        borderRadius: '8px'
    }
};

const workflowsArray = [
    { id: 'workflow1', /* additional workflow data */ }
];

<ScoreHeaderElement element={{ config: elementConfig }} workflows={workflowsArray} />;

In this example: