Dashboard Technical Stack

by BLSQ

art

Technical implementation guide for dashboard components including GridStack (drag/resize), ECharts (charts), and Tailwind CSS (styling). Referenced by dashboard-builder skill. Do not use directly - use dashboard-builder instead.

Skill Details

Repository Files

1 file in this skill directory


name: dashboard-technical-stack description: Technical implementation guide for dashboard components including GridStack (drag/resize), ECharts (charts), and Tailwind CSS (styling). Referenced by dashboard-builder skill. Do not use directly - use dashboard-builder instead.

Dashboard Technical Stack

Technical specifications for GridStack, ECharts, and Tailwind CSS integration.

GridStack Configuration

Initialization

const grid = GridStack.init({
    float: true,                    // Enable free positioning
    cellHeight: 80,                 // Height of each grid cell in pixels
    draggable: {
        handle: '.card-title'       // Only drag from title element
    },
    resizable: {
        handles: 'se,sw,ne,nw,e,w,n,s'  // All edges and corners
    }
});

Adding Widgets

grid.addWidget({
    w: 6,           // Width in grid units (12 = full width)
    h: 4,           // Height in grid units
    minW: 3,        // Minimum width (prevent too small)
    minH: 3,        // Minimum height (prevent too small)
    content: `
        <div class="grid-stack-item-content">
            <div class="card-title">Chart Title ⋮⋮</div>
            <div class="chart-wrapper">
                <div id="chart1" class="chart-container"></div>
            </div>
        </div>
    `
});

Layout Recommendations

Charts Layout Widget Size
1-2 Full or half width w: 12 or w: 6, h: 5
3-4 2x2 grid w: 6, h: 4
5+ Distribute evenly w: 4-6, h: 3-4

Minimum widget height: 3-4 grid units to ensure readability.

CSS Structure (Critical)

Required Styles

/* GridStack item content - flex container */
.grid-stack-item-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Drag handle styling */
.card-title {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #1E3A5F;
    cursor: move;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

/* Chart wrapper - takes remaining space */
.chart-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    padding: 0.5rem;
}

/* ECharts container - absolute positioning required */
.chart-container {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
}

/* Resize handle visibility */
.grid-stack-item:hover .ui-resizable-handle {
    opacity: 1;
}

.ui-resizable-handle {
    opacity: 0;
    transition: opacity 0.2s;
}

Why Absolute Positioning?

Percentage heights (height: 100%) don't work reliably in dynamically-sized flex containers. Use absolute positioning on the ECharts div to ensure it fills the available space.

ECharts Integration

Chart Initialization

function initChart(containerId, option) {
    const container = document.getElementById(containerId);
    const chart = echarts.init(container);
    chart.setOption(option);

    // Store reference for resize handling
    container._echartInstance = chart;

    // ResizeObserver for automatic resizing
    const observer = new ResizeObserver(() => {
        setTimeout(() => chart.resize(), 50);
    });
    observer.observe(container);

    return chart;
}

Theme Configuration (OpenHexa Branding)

const chartOption = {
    color: ['#ED4B82', '#4361EE', '#F472B6', '#6366F1', '#1E3A5F'],
    backgroundColor: 'transparent',
    textStyle: {
        color: '#1E3A5F',
        fontFamily: 'Inter, system-ui, sans-serif'
    },
    title: {
        textStyle: { color: '#1E3A5F', fontSize: 16, fontWeight: 600 }
    },
    tooltip: {
        backgroundColor: '#FFFFFF',
        borderColor: '#ED4B82',
        textStyle: { color: '#1E3A5F' }
    },
    legend: {
        textStyle: { color: '#1E3A5F' }
    },
    xAxis: {
        axisLine: { lineStyle: { color: '#E5E7EB' } },
        axisLabel: { color: '#1E3A5F' },
        splitLine: { lineStyle: { color: '#F3F4F6' } }
    },
    yAxis: {
        axisLine: { lineStyle: { color: '#E5E7EB' } },
        axisLabel: { color: '#1E3A5F' },
        splitLine: { lineStyle: { color: '#F3F4F6' } }
    }
};

Resize Handling

GridStack Events

// Resize all charts after GridStack operations
function resizeAllCharts() {
    document.querySelectorAll('.chart-container').forEach(container => {
        if (container._echartInstance) {
            setTimeout(() => container._echartInstance.resize(), 100);
        }
    });
}

// Listen to GridStack events
grid.on('resizestop', resizeAllCharts);
grid.on('dragstop', resizeAllCharts);
grid.on('change', resizeAllCharts);

// Window resize
window.addEventListener('resize', resizeAllCharts);

Delay Reasoning

Use setTimeout with 100ms delay before calling chart.resize() to let the DOM settle after GridStack operations.

Visual Feedback

Drag Indicator

Add a visual hint that elements are draggable:

<div class="card-title">
    <span class="drag-indicator">⋮⋮</span> Chart Title
</div>
.drag-indicator {
    opacity: 0.5;
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

User Hint

Add a hint text in the header or as a tooltip:

<p class="text-sm text-gray-500">Drag titles to move • Drag corners to resize</p>

Tailwind CSS Usage

Responsive Classes

<!-- Container with responsive padding -->
<div class="p-2 md:p-4 lg:p-6">

<!-- Hide on mobile -->
<div class="hidden md:block">

<!-- Responsive text -->
<h1 class="text-lg md:text-xl lg:text-2xl">

Brand Colors (from openhexa-branding)

<!-- Primary pink -->
<button class="bg-[#ED4B82] hover:bg-[#BE185D] text-white">

<!-- Primary blue -->
<a class="text-[#4361EE] hover:text-[#3730A3]">

<!-- Dark blue text -->
<p class="text-[#1E3A5F]">

<!-- Light pink background -->
<div class="bg-[#FDF2F8]">

Complete Widget HTML Template

<div class="grid-stack-item" gs-w="6" gs-h="4" gs-min-w="3" gs-min-h="3">
    <div class="grid-stack-item-content">
        <div class="card-title flex items-center justify-between">
            <span><span class="drag-indicator opacity-50 mr-2">⋮⋮</span>Chart Title</span>
        </div>
        <div class="chart-wrapper">
            <div id="chart1" class="chart-container"></div>
        </div>
    </div>
</div>

Related Skills

Team Composition Analysis

This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.

artdesign

Startup Financial Modeling

This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.

art

Startup Metrics Framework

This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.

art

Market Sizing Analysis

This skill should be used when the user asks to "calculate TAM", "determine SAM", "estimate SOM", "size the market", "calculate market opportunity", "what's the total addressable market", or requests market sizing analysis for a startup or business opportunity.

art

Anndata

This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.

arttooldata

Geopandas

Python library for working with geospatial vector data including shapefiles, GeoJSON, and GeoPackage files. Use when working with geographic data for spatial analysis, geometric operations, coordinate transformations, spatial joins, overlay operations, choropleth mapping, or any task involving reading/writing/analyzing vector geographic data. Supports PostGIS databases, interactive maps, and integration with matplotlib/folium/cartopy. Use for tasks like buffer analysis, spatial joins between dat

artdatacli

Market Research Reports

Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter's Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.

artdata

Plotly

Interactive scientific and statistical data visualization library for Python. Use when creating charts, plots, or visualizations including scatter plots, line charts, bar charts, heatmaps, 3D plots, geographic maps, statistical distributions, financial charts, and dashboards. Supports both quick visualizations (Plotly Express) and fine-grained customization (graph objects). Outputs interactive HTML or static images (PNG, PDF, SVG).

artdata

Excel Analysis

Analyze Excel spreadsheets, create pivot tables, generate charts, and perform data analysis. Use when analyzing Excel files, spreadsheets, tabular data, or .xlsx files.

artdata

Neurokit2

Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.

arttooldata

Skill Information

Category:Creative
Last Updated:1/29/2026