Documentation

Dashboard Customization

Create custom dashboards and visualizations tailored to your organization's governance, compliance, and security monitoring requirements with PolicyCortex.

Dashboard Types

📊 Executive Dashboard

High-level KPIs and compliance status

• Compliance score trends
• Risk exposure metrics
• Cost optimization insights
• Executive summary reports

🚨 Security Operations

Real-time security monitoring and alerts

• Active violations tracker
• Security incident timeline
• Threat detection metrics
• Response time analytics

📋 Compliance Operations

Framework-specific compliance tracking

• Control effectiveness status
• Audit readiness indicators
• Exception tracking
• Remediation progress

⚙️ Operational Dashboard

Day-to-day governance operations

• Resource inventory status
• Policy deployment tracking
• Performance optimization
• Team productivity metrics

Creating Custom Dashboards

Dashboard Configuration

Define dashboard structure, data sources, and visualizations using YAML configuration.

Custom Dashboard Definitionyaml
# Executive Compliance Dashboard
dashboard:
  name: "executive-compliance-overview"
  title: "Executive Compliance Dashboard"
  description: "High-level compliance status and trends"
  refresh_interval: "15m"
  layout: "grid"

  # Data sources
  data_sources:
    - name: "compliance_scores"
      type: "compliance_api"
      query: |
        SELECT framework, score, trend, last_updated
        FROM compliance_assessments
        WHERE period = 'current_quarter'

    - name: "violation_trends"
      type: "violations_api"
      query: |
        SELECT date, severity, count(*)
        FROM violations
        WHERE created_at >= now() - interval '90 days'
        GROUP BY date, severity

  # Widget definitions
  widgets:
    - id: "compliance_score_summary"
      title: "Overall Compliance Score"
      type: "metric_card"
      size: "large"
      data_source: "compliance_scores"
      config:
        primary_metric: "weighted_average_score"
        comparison_period: "previous_quarter"
        threshold_colors:
          - value: 90
            color: "green"
          - value: 75
            color: "yellow"
          - value: 60
            color: "red"

    - id: "framework_scores"
      title: "Framework Compliance Scores"
      type: "horizontal_bar_chart"
      size: "medium"
      data_source: "compliance_scores"
      config:
        x_axis: "score"
        y_axis: "framework"
        color_by_threshold: true

    - id: "violation_trend"
      title: "Violation Trends (90 days)"
      type: "line_chart"
      size: "large"
      data_source: "violation_trends"
      config:
        x_axis: "date"
        y_axis: "count"
        group_by: "severity"
        colors:
          CRITICAL: "#dc2626"
          HIGH: "#f59e0b"
          MEDIUM: "#3b82f6"
          LOW: "#10b981"

Available Widget Types

Chart Widgets

Chart Widget Examplesyaml
# Line Chart - Trends over time
- id: "compliance_trend"
  type: "line_chart"
  config:
    x_axis: "date"
    y_axis: "compliance_score"
    multiple_series: true
    smooth_curves: true

# Bar Chart - Category comparisons
- id: "violations_by_severity"
  type: "bar_chart"
  config:
    x_axis: "severity"
    y_axis: "count"
    orientation: "vertical"
    stacked: false

# Pie Chart - Proportional data
- id: "resource_distribution"
  type: "pie_chart"
  config:
    value_field: "count"
    label_field: "resource_type"
    show_percentages: true

# Heatmap - Multi-dimensional data
- id: "policy_coverage_matrix"
  type: "heatmap"
  config:
    x_axis: "service"
    y_axis: "compliance_framework"
    value: "coverage_percentage"
    color_scale: "green_to_red"

Data Widgets

Data Display Widgetsyaml
# Metric Cards - Key performance indicators
- id: "active_violations"
  type: "metric_card"
  config:
    title: "Active Violations"
    value_field: "count"
    trend_field: "change_percentage"
    format: "number"
    color_by_trend: true

# Data Table - Detailed listings
- id: "top_violations"
  type: "data_table"
  config:
    columns:
      - field: "policy_name"
        title: "Policy"
        sortable: true
      - field: "count"
        title: "Violations"
        format: "number"
      - field: "trend"
        title: "Trend"
        format: "percentage"
    pagination: true
    max_rows: 20

# Progress Bar - Goal tracking
- id: "remediation_progress"
  type: "progress_bar"
  config:
    current_value: "remediated_count"
    target_value: "total_violations"
    show_percentage: true
    color_segments:
      - threshold: 25
        color: "red"
      - threshold: 75
        color: "yellow"
      - threshold: 100
        color: "green"

Interactive Dashboard Features

🔍 Drill-Down Capabilities

Interactive Drill-Downyaml
# Enable drill-down from summary to detail
drill_down:
  enabled: true
  target_dashboard: "detailed-violations"
  parameters:
    - source: "framework"
      target: "compliance_framework"
    - source: "date_range"
      target: "time_period"

# Click actions
on_click:
  action: "navigate"
  url: "/dashboards/violation-details"
  params: "widget_context"

🎛️ Dynamic Filters

Dashboard Filtersyaml
# Global dashboard filters
filters:
  - name: "time_range"
    type: "date_range"
    default: "last_30_days"
    affects_all_widgets: true

  - name: "compliance_framework"
    type: "multi_select"
    options: ["SOC2", "HIPAA", "PCI_DSS"]
    default: "all"

  - name: "severity_filter"
    type: "checkbox_group"
    options: ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
    default: ["CRITICAL", "HIGH"]

Advanced Customization

Custom Data Sources

External Data Integrationyaml
# Custom API data source
data_sources:
  - name: "jira_tickets"
    type: "rest_api"
    endpoint: "https://company.atlassian.net/rest/api/3/search"
    authentication:
      type: "bearer_token"
      token_env: "JIRA_API_TOKEN"
    query_params:
      jql: "project = SEC AND status != Done"
    transform: |
      return {
        "open_security_tickets": data.total,
        "tickets": data.issues.map(issue => ({
          "key": issue.key,
          "summary": issue.fields.summary,
          "priority": issue.fields.priority.name,
          "created": issue.fields.created
        }))
      }

  # Database integration
  - name: "risk_assessments"
    type: "postgresql"
    connection: "risk_db"
    query: |
      SELECT
        risk_category,
        avg(risk_score) as avg_score,
        count(*) as assessment_count
      FROM risk_assessments
      WHERE assessment_date >= CURRENT_DATE - INTERVAL '30 days'
      GROUP BY risk_category

Custom Styling & Themes

Dashboard Themingyaml
# Custom dashboard theme
theme:
  name: "company_branded"
  colors:
    primary: "#1e40af"
    secondary: "#0ea5e9"
    success: "#10b981"
    warning: "#f59e0b"
    danger: "#dc2626"
    background: "#0f172a"
    surface: "#1e293b"
    text_primary: "#f8fafc"
    text_secondary: "#94a3b8"

  typography:
    font_family: "Inter, sans-serif"
    heading_sizes:
      h1: "2.25rem"
      h2: "1.875rem"
      h3: "1.5rem"
    font_weights:
      normal: 400
      bold: 600

  layout:
    grid_gap: "1rem"
    border_radius: "0.5rem"
    shadow: "0 10px 25px rgba(0,0,0,0.1)"

# Custom CSS for advanced styling
custom_css: |
  .metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
  .compliance-score.high {
    animation: pulse 2s infinite;
  }

Dashboard Management

Deploy and Manage Dashboards

Dashboard Operationsbash
# Deploy custom dashboard
policycortex dashboard deploy \
  --config executive-compliance.yaml \
  --environment production \
  --validate-data-sources

# List available dashboards
policycortex dashboard list \
  --include-shared \
  --filter-by-owner security-team

# Share dashboard with team
policycortex dashboard share \
  --dashboard executive-compliance-overview \
  --users security-team,compliance-team \
  --permissions view,export

# Schedule dashboard reports
policycortex dashboard schedule \
  --dashboard executive-compliance-overview \
  --format pdf \
  --recipients executives@company.com \
  --frequency weekly \
  --time "monday 09:00"

# Export dashboard data
policycortex dashboard export \
  --dashboard executive-compliance-overview \
  --format json \
  --date-range "2024-01-01,2024-03-31" \
  --output quarterly-compliance-data.json