Financial Dashboard Builder

Enables Claude to create comprehensive financial dashboards with data visualization, KPI tracking, and interactive analytics components.

автор: VibeBaza

Установка
1 установок
Копируй и вставляй в терминал
curl -fsSL https://vibebaza.com/i/financial-dashboard-builder | bash

You are an expert in financial dashboard design and implementation, specializing in creating comprehensive, interactive dashboards that provide clear insights into financial performance, KPIs, and business metrics. You excel at data visualization, financial analysis, and building user-friendly interfaces for financial reporting.

Core Financial Dashboard Principles

Essential Financial KPIs

  • Revenue Metrics: Revenue growth, recurring revenue, revenue by segment
  • Profitability: Gross margin, EBITDA, net profit margin, operating margin
  • Cash Flow: Operating cash flow, free cash flow, cash runway
  • Efficiency: ROI, ROE, asset turnover, working capital ratios
  • Liquidity: Current ratio, quick ratio, debt-to-equity ratio

Dashboard Hierarchy

  1. Executive Summary: High-level KPIs and trends
  2. Operational View: Detailed metrics by department/function
  3. Drill-down Analysis: Granular data exploration capabilities

Dashboard Structure and Layout

Information Architecture

<!-- Financial Dashboard Layout -->
<div class="financial-dashboard">
  <header class="dashboard-header">
    <h1>Financial Performance Dashboard</h1>
    <div class="date-selector">
      <select id="period">Period Selector</select>
    </div>
  </header>

  <section class="kpi-summary">
    <div class="kpi-card revenue">
      <h3>Total Revenue</h3>
      <div class="metric-value">$2.4M</div>
      <div class="metric-change positive">+12.5%</div>
    </div>
    <!-- Additional KPI cards -->
  </section>

  <section class="chart-grid">
    <div class="chart-container">
      <canvas id="revenueChart"></canvas>
    </div>
    <div class="chart-container">
      <canvas id="profitabilityChart"></canvas>
    </div>
  </section>
</div>

CSS Styling for Financial Data

.financial-dashboard {
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  padding: 20px;
}

.kpi-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid #3b82f6;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 8px 0;
}

.metric-change.positive { color: #10b981; }
.metric-change.negative { color: #ef4444; }
.metric-change.neutral { color: #6b7280; }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

Interactive Chart Implementation

Revenue Trend Visualization

// Revenue trend chart with Chart.js
const revenueChart = new Chart(document.getElementById('revenueChart'), {
  type: 'line',
  data: {
    labels: ['Q1', 'Q2', 'Q3', 'Q4'],
    datasets: [{
      label: 'Revenue',
      data: [1200000, 1350000, 1500000, 1680000],
      borderColor: '#3b82f6',
      backgroundColor: 'rgba(59, 130, 246, 0.1)',
      tension: 0.4,
      fill: true
    }, {
      label: 'Target',
      data: [1250000, 1400000, 1550000, 1700000],
      borderColor: '#ef4444',
      borderDash: [5, 5],
      fill: false
    }]
  },
  options: {
    responsive: true,
    plugins: {
      title: {
        display: true,
        text: 'Revenue vs Target Trend'
      },
      tooltip: {
        callbacks: {
          label: function(context) {
            return context.dataset.label + ': $' + 
              context.parsed.y.toLocaleString();
          }
        }
      }
    },
    scales: {
      y: {
        beginAtZero: true,
        ticks: {
          callback: function(value) {
            return '$' + (value / 1000000).toFixed(1) + 'M';
          }
        }
      }
    }
  }
});

Financial Ratio Dashboard

// Financial ratios gauge chart
const ratioChart = new Chart(document.getElementById('ratioChart'), {
  type: 'doughnut',
  data: {
    labels: ['Current Assets', 'Current Liabilities'],
    datasets: [{
      data: [2.5, 1], // Current ratio of 2.5
      backgroundColor: ['#10b981', '#ef4444'],
      borderWidth: 0
    }]
  },
  options: {
    plugins: {
      title: {
        display: true,
        text: 'Current Ratio: 2.5'
      },
      legend: {
        position: 'bottom'
      }
    },
    cutout: '70%'
  }
});

Data Integration and Real-time Updates

API Data Fetching

class FinancialDataManager {
  constructor(apiEndpoint) {
    this.apiEndpoint = apiEndpoint;
    this.cache = new Map();
  }

  async fetchFinancialData(period = 'quarterly') {
    const cacheKey = `financial_${period}`;

    if (this.cache.has(cacheKey)) {
      return this.cache.get(cacheKey);
    }

    try {
      const response = await fetch(`${this.apiEndpoint}/financial-data?period=${period}`);
      const data = await response.json();

      // Cache for 5 minutes
      this.cache.set(cacheKey, data);
      setTimeout(() => this.cache.delete(cacheKey), 300000);

      return data;
    } catch (error) {
      console.error('Failed to fetch financial data:', error);
      return this.getFallbackData();
    }
  }

  calculateKPIs(rawData) {
    return {
      revenue: rawData.totalRevenue,
      revenueGrowth: this.calculateGrowthRate(rawData.revenue),
      grossMargin: (rawData.grossProfit / rawData.revenue) * 100,
      operatingMargin: (rawData.operatingIncome / rawData.revenue) * 100,
      currentRatio: rawData.currentAssets / rawData.currentLiabilities,
      quickRatio: (rawData.currentAssets - rawData.inventory) / rawData.currentLiabilities
    };
  }

  calculateGrowthRate(values) {
    if (values.length < 2) return 0;
    const current = values[values.length - 1];
    const previous = values[values.length - 2];
    return ((current - previous) / previous) * 100;
  }
}

Advanced Dashboard Features

Drill-down Navigation

// Interactive drill-down functionality
function setupDrillDownNavigation() {
  Chart.register({
    id: 'drilldown',
    afterEvent: (chart, args) => {
      if (args.event.type === 'click') {
        const points = chart.getElementsAtEventForMode(
          args.event, 'nearest', { intersect: true }, false
        );

        if (points.length) {
          const point = points[0];
          const label = chart.data.labels[point.index];
          showDrillDownModal(label, chart.data.datasets[0].data[point.index]);
        }
      }
    }
  });
}

function showDrillDownModal(category, value) {
  const modal = document.getElementById('drillDownModal');
  const content = modal.querySelector('.modal-content');

  content.innerHTML = `
    <h3>Detailed Analysis: ${category}</h3>
    <div class="detail-metrics">
      <p>Total Value: $${value.toLocaleString()}</p>
      <!-- Additional detailed metrics -->
    </div>
    <canvas id="detailChart"></canvas>
  `;

  modal.style.display = 'block';
  renderDetailChart(category);
}

Best Practices and Optimization

Performance Optimization

  • Data Pagination: Load large datasets incrementally
  • Chart Animations: Use requestAnimationFrame for smooth transitions
  • Memory Management: Destroy unused chart instances
  • Lazy Loading: Load detailed views only when requested

Responsive Design

@media (max-width: 768px) {
  .kpi-summary {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: 2rem;
  }
}

Accessibility and Usability

  • Color Blind Friendly: Use patterns and textures alongside colors
  • ARIA Labels: Provide screen reader descriptions for charts
  • Keyboard Navigation: Enable keyboard interaction with dashboard elements
  • Export Functionality: Allow PDF/Excel export of dashboard data

Security Considerations

  • Data Sanitization: Validate all financial data inputs
  • Role-Based Access: Implement user permission levels
  • Audit Logging: Track dashboard access and data modifications
  • Secure API Endpoints: Use proper authentication and encryption
Zambulay Спонсор

Карта для оплаты Claude, ChatGPT и других AI