[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EQ5895XRK0ZV7FSN2SNZ07":3,"skill-same:01M6EQ5895XRK0ZV7FSN2SNZ07":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M6EQ5895XRK0ZV7FSN2SNZ07","chart-generator",null,"Generate charts and visualizations from data using various charting libraries and formats.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fchart-generator\u002FSKILL.md",[],[19,20,21,22,23,24,25,26],"chart","chart generator","libraries","Charting","generate","data","Charts","visualizations","2026-11-10 10:12:30",false,"---\nname: chart-generator\ndescription: Generate charts and visualizations from data using various charting libraries and formats.\n---\n\n# Chart Generator Skill\n\nGenerate charts and visualizations from data using various charting libraries and formats.\n\n## Instructions\n\nYou are a data visualization expert. When invoked:\n\n1. **Analyze Data**:\n   - Understand data structure and types\n   - Identify appropriate chart types\n   - Detect data patterns and trends\n   - Calculate aggregations and statistics\n   - Determine visualization goals\n\n2. **Generate Charts**:\n   - Create bar, line, pie, scatter plots\n   - Generate heatmaps and tree maps\n   - Create histograms and box plots\n   - Build time series visualizations\n   - Design multi-dimensional charts\n\n3. **Style and Customize**:\n   - Apply color schemes and themes\n   - Add labels, legends, and annotations\n   - Format axes and gridlines\n   - Customize tooltips and interactions\n   - Ensure accessibility and readability\n\n4. **Export and Embed**:\n   - Save as PNG, SVG, PDF\n   - Generate interactive HTML charts\n   - Embed in markdown reports\n   - Create chart APIs\n   - Support responsive design\n\n## Usage Examples\n\n```\n@chart-generator data.csv --type bar\n@chart-generator --line --time-series\n@chart-generator --pie --group-by category\n@chart-generator --scatter x:age y:income\n@chart-generator --heatmap --correlation\n@chart-generator --interactive --html\n```\n\n## Chart Types and Use Cases\n\n### When to Use Each Chart Type\n\n| Chart Type | Best For | Example Use Case |\n|------------|----------|------------------|\n| Bar Chart | Comparing categories | Sales by product |\n| Line Chart | Trends over time | Revenue over months |\n| Pie Chart | Part-to-whole relationships | Market share |\n| Scatter Plot | Relationships between variables | Height vs Weight |\n| Histogram | Distribution of values | Age distribution |\n| Box Plot | Statistical distribution | Salary ranges by department |\n| Heatmap | Matrix data, correlations | Feature correlations |\n| Area Chart | Cumulative trends | Stacked revenue streams |\n| Bubble Chart | 3-dimensional data | Sales vs Profit vs Market Share |\n| Treemap | Hierarchical data | Disk space usage |\n\n## Python - Matplotlib\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\ndef create_bar_chart(data, x_col, y_col, title='Bar Chart', output='chart.png'):\n    \"\"\"\n    Create a bar chart\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n\n    if isinstance(data, pd.DataFrame):\n        x = data[x_col]\n        y = data[y_col]\n    else:\n        x = data['labels']\n        y = data['values']\n\n    bars = plt.bar(x, y, color='steelblue', alpha=0.8)\n\n    # Add value labels on bars\n    for bar in bars:\n        height = bar.get_height()\n        plt.text(bar.get_x() + bar.get_width()\u002F2., height,\n                f'{height:.1f}',\n                ha='center', va='bottom')\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(x_col if isinstance(data, pd.DataFrame) else 'Category', fontsize=12)\n    plt.ylabel(y_col if isinstance(data, pd.DataFrame) else 'Value', fontsize=12)\n    plt.xticks(rotation=45, ha='right')\n    plt.grid(axis='y', alpha=0.3)\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_line_chart(data, x_col, y_col, title='Line Chart', output='chart.png'):\n    \"\"\"\n    Create a line chart\n    \"\"\"\n    plt.figure(figsize=(12, 6))\n\n    if isinstance(data, pd.DataFrame):\n        x = data[x_col]\n        y = data[y_col]\n    else:\n        x = data['x']\n        y = data['y']\n\n    plt.plot(x, y, marker='o', linewidth=2, markersize=6, color='steelblue')\n\n    # Add grid\n    plt.grid(True, alpha=0.3)\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(x_col if isinstance(data, pd.DataFrame) else 'X', fontsize=12)\n    plt.ylabel(y_col if isinstance(data, pd.DataFrame) else 'Y', fontsize=12)\n    plt.xticks(rotation=45, ha='right')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_pie_chart(data, labels_col, values_col, title='Pie Chart', output='chart.png'):\n    \"\"\"\n    Create a pie chart\n    \"\"\"\n    plt.figure(figsize=(10, 8))\n\n    if isinstance(data, pd.DataFrame):\n        labels = data[labels_col]\n        values = data[values_col]\n    else:\n        labels = data['labels']\n        values = data['values']\n\n    # Create color palette\n    colors = plt.cm.Set3(np.linspace(0, 1, len(labels)))\n\n    # Create pie chart\n    wedges, texts, autotexts = plt.pie(\n        values,\n        labels=labels,\n        autopct='%1.1f%%',\n        startangle=90,\n        colors=colors,\n        explode=[0.05] * len(labels)  # Slightly separate slices\n    )\n\n    # Style percentage text\n    for autotext in autotexts:\n        autotext.set_color('white')\n        autotext.set_fontweight('bold')\n        autotext.set_fontsize(10)\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.axis('equal')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_scatter_plot(data, x_col, y_col, color_col=None, size_col=None,\n                       title='Scatter Plot', output='chart.png'):\n    \"\"\"\n    Create a scatter plot\n    \"\"\"\n    plt.figure(figsize=(10, 8))\n\n    if isinstance(data, pd.DataFrame):\n        x = data[x_col]\n        y = data[y_col]\n        c = data[color_col] if color_col else None\n        s = data[size_col] if size_col else 50\n    else:\n        x = data['x']\n        y = data['y']\n        c = None\n        s = 50\n\n    scatter = plt.scatter(x, y, c=c, s=s, alpha=0.6, cmap='viridis')\n\n    if color_col:\n        plt.colorbar(scatter, label=color_col)\n\n    # Add trend line\n    z = np.polyfit(x, y, 1)\n    p = np.poly1d(z)\n    plt.plot(x, p(x), \"r--\", alpha=0.8, label='Trend')\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(x_col if isinstance(data, pd.DataFrame) else 'X', fontsize=12)\n    plt.ylabel(y_col if isinstance(data, pd.DataFrame) else 'Y', fontsize=12)\n    plt.grid(True, alpha=0.3)\n    plt.legend()\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_histogram(data, column, bins=30, title='Histogram', output='chart.png'):\n    \"\"\"\n    Create a histogram\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n\n    if isinstance(data, pd.DataFrame):\n        values = data[column]\n    else:\n        values = data\n\n    n, bins, patches = plt.hist(values, bins=bins, color='steelblue',\n                                 alpha=0.7, edgecolor='black')\n\n    # Add mean line\n    mean_val = np.mean(values)\n    plt.axvline(mean_val, color='red', linestyle='dashed', linewidth=2,\n                label=f'Mean: {mean_val:.2f}')\n\n    # Add median line\n    median_val = np.median(values)\n    plt.axvline(median_val, color='green', linestyle='dashed', linewidth=2,\n                label=f'Median: {median_val:.2f}')\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(column if isinstance(data, pd.DataFrame) else 'Value', fontsize=12)\n    plt.ylabel('Frequency', fontsize=12)\n    plt.legend()\n    plt.grid(axis='y', alpha=0.3)\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_box_plot(data, columns, title='Box Plot', output='chart.png'):\n    \"\"\"\n    Create a box plot\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n\n    if isinstance(data, pd.DataFrame):\n        data_to_plot = [data[col].dropna() for col in columns]\n        labels = columns\n    else:\n        data_to_plot = data\n        labels = [f'Group {i+1}' for i in range(len(data))]\n\n    bp = plt.boxplot(data_to_plot, labels=labels, patch_artist=True)\n\n    # Color boxes\n    for patch in bp['boxes']:\n        patch.set_facecolor('lightblue')\n        patch.set_alpha(0.7)\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.ylabel('Value', fontsize=12)\n    plt.grid(axis='y', alpha=0.3)\n    plt.xticks(rotation=45, ha='right')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_heatmap(data, title='Heatmap', output='chart.png'):\n    \"\"\"\n    Create a heatmap (correlation matrix)\n    \"\"\"\n    plt.figure(figsize=(10, 8))\n\n    if isinstance(data, pd.DataFrame):\n        # Calculate correlation matrix\n        corr_matrix = data.corr()\n    else:\n        corr_matrix = data\n\n    # Create heatmap\n    im = plt.imshow(corr_matrix, cmap='coolwarm', aspect='auto',\n                    vmin=-1, vmax=1)\n\n    # Add colorbar\n    cbar = plt.colorbar(im)\n    cbar.set_label('Correlation', rotation=270, labelpad=20)\n\n    # Set ticks and labels\n    plt.xticks(range(len(corr_matrix.columns)), corr_matrix.columns,\n               rotation=45, ha='right')\n    plt.yticks(range(len(corr_matrix.columns)), corr_matrix.columns)\n\n    # Add correlation values\n    for i in range(len(corr_matrix)):\n        for j in range(len(corr_matrix.columns)):\n            text = plt.text(j, i, f'{corr_matrix.iloc[i, j]:.2f}',\n                          ha='center', va='center', color='black', fontsize=9)\n\n    plt.title(title, fontsize=16, fontweight='bold', pad=20)\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n```\n\n## Python - Seaborn\n\n```python\nimport seaborn as sns\n\ndef create_seaborn_chart(data, chart_type, x, y=None, hue=None,\n                        title='Chart', output='chart.png'):\n    \"\"\"\n    Create charts using Seaborn\n    \"\"\"\n    plt.figure(figsize=(12, 6))\n\n    # Set style\n    sns.set_style(\"whitegrid\")\n    sns.set_palette(\"husl\")\n\n    if chart_type == 'bar':\n        sns.barplot(data=data, x=x, y=y, hue=hue)\n\n    elif chart_type == 'line':\n        sns.lineplot(data=data, x=x, y=y, hue=hue, marker='o')\n\n    elif chart_type == 'scatter':\n        sns.scatterplot(data=data, x=x, y=y, hue=hue, size=hue, alpha=0.6)\n\n    elif chart_type == 'box':\n        sns.boxplot(data=data, x=x, y=y, hue=hue)\n\n    elif chart_type == 'violin':\n        sns.violinplot(data=data, x=x, y=y, hue=hue)\n\n    elif chart_type == 'dist':\n        sns.histplot(data=data, x=x, hue=hue, kde=True)\n\n    elif chart_type == 'heatmap':\n        sns.heatmap(data.corr(), annot=True, fmt='.2f', cmap='coolwarm',\n                   center=0, square=True, linewidths=1)\n\n    elif chart_type == 'pairplot':\n        # Special case - creates its own figure\n        g = sns.pairplot(data, hue=hue)\n        g.savefig(output, dpi=300, bbox_inches='tight')\n        return output\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xticks(rotation=45, ha='right')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\n# Advanced Seaborn visualizations\ndef create_facet_grid(data, x, y, col=None, row=None, hue=None,\n                     title='Facet Grid', output='chart.png'):\n    \"\"\"\n    Create faceted charts\n    \"\"\"\n    g = sns.FacetGrid(data, col=col, row=row, hue=hue, height=4)\n    g.map(sns.scatterplot, x, y, alpha=0.6)\n    g.add_legend()\n    g.fig.suptitle(title, y=1.02, fontsize=16, fontweight='bold')\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n```\n\n## JavaScript - Chart.js\n\n```javascript\nconst { ChartJSNodeCanvas } = require('chartjs-node-canvas');\n\nasync function createBarChart(data, options = {}) {\n  const width = options.width || 800;\n  const height = options.height || 600;\n\n  const chartJSNodeCanvas = new ChartJSNodeCanvas({ width, height });\n\n  const configuration = {\n    type: 'bar',\n    data: {\n      labels: data.labels,\n      datasets: [{\n        label: options.label || 'Dataset',\n        data: data.values,\n        backgroundColor: 'rgba(54, 162, 235, 0.6)',\n        borderColor: 'rgba(54, 162, 235, 1)',\n        borderWidth: 2\n      }]\n    },\n    options: {\n      responsive: true,\n      plugins: {\n        title: {\n          display: true,\n          text: options.title || 'Bar Chart',\n          font: { size: 18 }\n        },\n        legend: {\n          display: true,\n          position: 'top'\n        }\n      },\n      scales: {\n        y: {\n          beginAtZero: true\n        }\n      }\n    }\n  };\n\n  const imageBuffer = await chartJSNodeCanvas.renderToBuffer(configuration);\n  return imageBuffer;\n}\n\nasync function createLineChart(data, options = {}) {\n  const width = options.width || 800;\n  const height = options.height || 600;\n\n  const chartJSNodeCanvas = new ChartJSNodeCanvas({ width, height });\n\n  const configuration = {\n    type: 'line',\n    data: {\n      labels: data.labels,\n      datasets: [{\n        label: options.label || 'Dataset',\n        data: data.values,\n        borderColor: 'rgba(75, 192, 192, 1)',\n        backgroundColor: 'rgba(75, 192, 192, 0.2)',\n        borderWidth: 2,\n        tension: 0.4\n      }]\n    },\n    options: {\n      responsive: true,\n      plugins: {\n        title: {\n          display: true,\n          text: options.title || 'Line Chart',\n          font: { size: 18 }\n        }\n      },\n      scales: {\n        y: {\n          beginAtZero: true\n        }\n      }\n    }\n  };\n\n  const imageBuffer = await chartJSNodeCanvas.renderToBuffer(configuration);\n  return imageBuffer;\n}\n\nasync function createPieChart(data, options = {}) {\n  const width = options.width || 800;\n  const height = options.height || 600;\n\n  const chartJSNodeCanvas = new ChartJSNodeCanvas({ width, height });\n\n  const configuration = {\n    type: 'pie',\n    data: {\n      labels: data.labels,\n      datasets: [{\n        data: data.values,\n        backgroundColor: [\n          'rgba(255, 99, 132, 0.6)',\n          'rgba(54, 162, 235, 0.6)',\n          'rgba(255, 206, 86, 0.6)',\n          'rgba(75, 192, 192, 0.6)',\n          'rgba(153, 102, 255, 0.6)',\n          'rgba(255, 159, 64, 0.6)'\n        ],\n        borderWidth: 2\n      }]\n    },\n    options: {\n      responsive: true,\n      plugins: {\n        title: {\n          display: true,\n          text: options.title || 'Pie Chart',\n          font: { size: 18 }\n        },\n        legend: {\n          position: 'right'\n        }\n      }\n    }\n  };\n\n  const imageBuffer = await chartJSNodeCanvas.renderToBuffer(configuration);\n  return imageBuffer;\n}\n```\n\n## Interactive Charts - Plotly\n\n```python\nimport plotly.express as px\nimport plotly.graph_objects as go\n\ndef create_interactive_bar(data, x, y, title='Bar Chart', output='chart.html'):\n    \"\"\"\n    Create interactive bar chart with Plotly\n    \"\"\"\n    fig = px.bar(data, x=x, y=y, title=title,\n                 color=y, color_continuous_scale='Viridis')\n\n    fig.update_layout(\n        font=dict(size=14),\n        showlegend=True,\n        hovermode='x unified'\n    )\n\n    fig.write_html(output)\n    return output\n\ndef create_interactive_line(data, x, y, title='Line Chart', output='chart.html'):\n    \"\"\"\n    Create interactive line chart\n    \"\"\"\n    fig = px.line(data, x=x, y=y, title=title, markers=True)\n\n    fig.update_traces(line=dict(width=3))\n\n    fig.update_layout(\n        hovermode='x unified',\n        font=dict(size=14)\n    )\n\n    fig.write_html(output)\n    return output\n\ndef create_interactive_scatter(data, x, y, color=None, size=None,\n                              title='Scatter Plot', output='chart.html'):\n    \"\"\"\n    Create interactive scatter plot\n    \"\"\"\n    fig = px.scatter(data, x=x, y=y, color=color, size=size,\n                    title=title, hover_data=data.columns)\n\n    fig.update_traces(marker=dict(line=dict(width=0.5, color='white')))\n\n    fig.write_html(output)\n    return output\n\ndef create_3d_scatter(data, x, y, z, color=None, title='3D Scatter',\n                     output='chart.html'):\n    \"\"\"\n    Create 3D scatter plot\n    \"\"\"\n    fig = px.scatter_3d(data, x=x, y=y, z=z, color=color, title=title)\n\n    fig.update_layout(scene=dict(\n        xaxis_title=x,\n        yaxis_title=y,\n        zaxis_title=z\n    ))\n\n    fig.write_html(output)\n    return output\n\ndef create_time_series(data, date_col, value_col, title='Time Series',\n                      output='chart.html'):\n    \"\"\"\n    Create time series chart\n    \"\"\"\n    fig = go.Figure()\n\n    fig.add_trace(go.Scatter(\n        x=data[date_col],\n        y=data[value_col],\n        mode='lines+markers',\n        name=value_col,\n        line=dict(width=2),\n        marker=dict(size=6)\n    ))\n\n    # Add range slider\n    fig.update_xaxes(\n        rangeslider_visible=True,\n        rangeselector=dict(\n            buttons=list([\n                dict(count=7, label=\"1w\", step=\"day\", stepmode=\"backward\"),\n                dict(count=1, label=\"1m\", step=\"month\", stepmode=\"backward\"),\n                dict(count=3, label=\"3m\", step=\"month\", stepmode=\"backward\"),\n                dict(count=1, label=\"1y\", step=\"year\", stepmode=\"backward\"),\n                dict(step=\"all\")\n            ])\n        )\n    )\n\n    fig.update_layout(\n        title=title,\n        xaxis_title=date_col,\n        yaxis_title=value_col,\n        font=dict(size=14)\n    )\n\n    fig.write_html(output)\n    return output\n\ndef create_dashboard(data, output='dashboard.html'):\n    \"\"\"\n    Create multi-chart dashboard\n    \"\"\"\n    from plotly.subplots import make_subplots\n\n    fig = make_subplots(\n        rows=2, cols=2,\n        subplot_titles=('Bar Chart', 'Line Chart', 'Pie Chart', 'Scatter Plot'),\n        specs=[[{'type': 'bar'}, {'type': 'scatter'}],\n               [{'type': 'pie'}, {'type': 'scatter'}]]\n    )\n\n    # Add charts\n    # Bar chart\n    fig.add_trace(\n        go.Bar(x=data['category'], y=data['value1'], name='Bar'),\n        row=1, col=1\n    )\n\n    # Line chart\n    fig.add_trace(\n        go.Scatter(x=data['date'], y=data['value2'], mode='lines', name='Line'),\n        row=1, col=2\n    )\n\n    # Pie chart\n    fig.add_trace(\n        go.Pie(labels=data['category'], values=data['value1'], name='Pie'),\n        row=2, col=1\n    )\n\n    # Scatter plot\n    fig.add_trace(\n        go.Scatter(x=data['value1'], y=data['value2'], mode='markers', name='Scatter'),\n        row=2, col=2\n    )\n\n    fig.update_layout(height=800, showlegend=True, title_text=\"Dashboard\")\n\n    fig.write_html(output)\n    return output\n```\n\n## Chart Styling and Themes\n\n```python\n# Matplotlib themes\ndef apply_matplotlib_theme(theme='default'):\n    \"\"\"\n    Apply theme to matplotlib charts\n    \"\"\"\n    themes = {\n        'default': 'seaborn-v0_8-darkgrid',\n        'minimal': 'seaborn-v0_8-whitegrid',\n        'dark': 'dark_background',\n        'classic': 'classic',\n        'ggplot': 'ggplot'\n    }\n\n    plt.style.use(themes.get(theme, 'default'))\n\n# Custom color palettes\nCOLOR_PALETTES = {\n    'corporate': ['#003f5c', '#58508d', '#bc5090', '#ff6361', '#ffa600'],\n    'pastel': ['#a8e6cf', '#dcedc1', '#ffd3b6', '#ffaaa5', '#ff8b94'],\n    'vibrant': ['#e74c3c', '#3498db', '#2ecc71', '#f39c12', '#9b59b6'],\n    'monochrome': ['#2c3e50', '#34495e', '#7f8c8d', '#95a5a6', '#bdc3c7']\n}\n\ndef apply_color_palette(palette_name='corporate'):\n    \"\"\"Apply custom color palette\"\"\"\n    colors = COLOR_PALETTES.get(palette_name, COLOR_PALETTES['corporate'])\n    plt.rcParams['axes.prop_cycle'] = plt.cycler(color=colors)\n```\n\n## Export Formats\n\n```python\ndef export_chart_multiple_formats(fig, base_name='chart'):\n    \"\"\"\n    Export chart in multiple formats\n    \"\"\"\n    formats = {\n        'png': {'dpi': 300, 'transparent': False},\n        'svg': {'format': 'svg'},\n        'pdf': {'format': 'pdf'},\n        'jpg': {'dpi': 300, 'format': 'jpg'}\n    }\n\n    files = []\n\n    for fmt, kwargs in formats.items():\n        output_file = f\"{base_name}.{fmt}\"\n        fig.savefig(output_file, bbox_inches='tight', **kwargs)\n        files.append(output_file)\n\n    return files\n```\n\n## Chart Generation Pipeline\n\n```python\ndef generate_charts_from_data(data, chart_configs, output_dir='charts'):\n    \"\"\"\n    Generate multiple charts from data based on configurations\n\n    chart_configs = [\n        {\n            'type': 'bar',\n            'x': 'category',\n            'y': 'value',\n            'title': 'Sales by Category',\n            'output': 'sales_bar.png'\n        },\n        ...\n    ]\n    \"\"\"\n    import os\n    os.makedirs(output_dir, exist_ok=True)\n\n    generated_charts = []\n\n    for config in chart_configs:\n        chart_type = config['type']\n        output = os.path.join(output_dir, config['output'])\n\n        if chart_type == 'bar':\n            create_bar_chart(data, config['x'], config['y'],\n                           config.get('title', 'Chart'), output)\n\n        elif chart_type == 'line':\n            create_line_chart(data, config['x'], config['y'],\n                            config.get('title', 'Chart'), output)\n\n        elif chart_type == 'pie':\n            create_pie_chart(data, config['x'], config['y'],\n                           config.get('title', 'Chart'), output)\n\n        elif chart_type == 'scatter':\n            create_scatter_plot(data, config['x'], config['y'],\n                              config.get('color'), config.get('size'),\n                              config.get('title', 'Chart'), output)\n\n        elif chart_type == 'heatmap':\n            create_heatmap(data, config.get('title', 'Chart'), output)\n\n        generated_charts.append({\n            'type': chart_type,\n            'title': config.get('title'),\n            'file': output\n        })\n\n    return generated_charts\n```\n\n## Best Practices\n\n1. **Choose appropriate chart types** for your data\n2. **Use clear, descriptive titles** and labels\n3. **Apply consistent color schemes** across charts\n4. **Ensure readability** (font sizes, contrast)\n5. **Add context** (annotations, reference lines)\n6. **Export in high resolution** (300 DPI minimum)\n7. **Consider accessibility** (color-blind friendly palettes)\n8. **Test on different screen sizes** (responsive design)\n9. **Optimize file sizes** for web use\n10. **Document chart generation** code for reproducibility\n\n## Common Chart Patterns\n\n### Comparison Charts\n- Bar charts for categorical comparisons\n- Grouped bar charts for multi-series comparison\n- Stacked bar charts for part-to-whole comparisons\n\n### Trend Charts\n- Line charts for time series\n- Area charts for cumulative trends\n- Sparklines for inline trends\n\n### Distribution Charts\n- Histograms for frequency distribution\n- Box plots for statistical distribution\n- Violin plots for distribution shape\n\n### Relationship Charts\n- Scatter plots for correlations\n- Bubble charts for 3D relationships\n- Heatmaps for matrix relationships\n\n### Composition Charts\n- Pie charts for simple part-to-whole\n- Stacked area charts for trends over time\n- Treemaps for hierarchical composition\n\n## Notes\n\n- Always label axes and provide units\n- Use appropriate scales (linear, logarithmic)\n- Consider data-ink ratio (minimize chart junk)\n- Test charts with different data ranges\n- Provide legends when using multiple series\n- Use annotations to highlight key insights\n- Export charts in vector formats for publications\n- Keep color schemes consistent across related charts\n- Consider cultural differences in color meanings\n- Validate data before visualization\n","# Chart Generator Skill\n\nGenerate charts and visualizations from data using various charting libraries and formats.\n\n## Instructions\n\nYou are a data visualization expert. When invoked:\n\n1. **Analyze Data**:\n   - Understand data structure and types\n   - Identify appropriate chart types\n   - Detect data patterns and trends\n   - Calculate aggregations and statistics\n   - Determine visualization goals\n\n2. **Generate Charts**:\n   - Create bar, line, pie, scatter plots\n   - Generate heatmaps and tree maps\n   - Create histograms and box plots\n   - Build time series visualizations\n   - Design multi-dimensional charts\n\n3. **Style and Customize**:\n   - Apply color schemes and themes\n   - Add labels, legends, and annotations\n   - Format axes and gridlines\n   - Customize tooltips and interactions\n   - Ensure accessibility and readability\n\n4. **Export and Embed**:\n   - Save as PNG, SVG, PDF\n   - Generate interactive HTML charts\n   - Embed in markdown reports\n   - Create chart APIs\n   - Support responsive design\n\n## Usage Examples\n\n```\n@chart-generator data.csv --type bar\n@chart-generator --line --time-series\n@chart-generator --pie --group-by category\n@chart-generator --scatter x:age y:income\n@chart-generator --heatmap --correlation\n@chart-generator --interactive --html\n```\n\n## Chart Types and Use Cases\n\n### When to Use Each Chart Type\n\n| Chart Type | Best For | Example Use Case |\n|------------|----------|------------------|\n| Bar Chart | Comparing categories | Sales by product |\n| Line Chart | Trends over time | Revenue over months |\n| Pie Chart | Part-to-whole relationships | Market share |\n| Scatter Plot | Relationships between variables | Height vs Weight |\n| Histogram | Distribution of values | Age distribution |\n| Box Plot | Statistical distribution | Salary ranges by department |\n| Heatmap | Matrix data, correlations | Feature correlations |\n| Area Chart | Cumulative trends | Stacked revenue streams |\n| Bubble Chart | 3-dimensional data | Sales vs Profit vs Market Share |\n| Treemap | Hierarchical data | Disk space usage |\n\n## Python - Matplotlib\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\ndef create_bar_chart(data, x_col, y_col, title='Bar Chart', output='chart.png'):\n    \"\"\"\n    Create a bar chart\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n\n    if isinstance(data, pd.DataFrame):\n        x = data[x_col]\n        y = data[y_col]\n    else:\n        x = data['labels']\n        y = data['values']\n\n    bars = plt.bar(x, y, color='steelblue', alpha=0.8)\n\n    # Add value labels on bars\n    for bar in bars:\n        height = bar.get_height()\n        plt.text(bar.get_x() + bar.get_width()\u002F2., height,\n                f'{height:.1f}',\n                ha='center', va='bottom')\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(x_col if isinstance(data, pd.DataFrame) else 'Category', fontsize=12)\n    plt.ylabel(y_col if isinstance(data, pd.DataFrame) else 'Value', fontsize=12)\n    plt.xticks(rotation=45, ha='right')\n    plt.grid(axis='y', alpha=0.3)\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_line_chart(data, x_col, y_col, title='Line Chart', output='chart.png'):\n    \"\"\"\n    Create a line chart\n    \"\"\"\n    plt.figure(figsize=(12, 6))\n\n    if isinstance(data, pd.DataFrame):\n        x = data[x_col]\n        y = data[y_col]\n    else:\n        x = data['x']\n        y = data['y']\n\n    plt.plot(x, y, marker='o', linewidth=2, markersize=6, color='steelblue')\n\n    # Add grid\n    plt.grid(True, alpha=0.3)\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(x_col if isinstance(data, pd.DataFrame) else 'X', fontsize=12)\n    plt.ylabel(y_col if isinstance(data, pd.DataFrame) else 'Y', fontsize=12)\n    plt.xticks(rotation=45, ha='right')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_pie_chart(data, labels_col, values_col, title='Pie Chart', output='chart.png'):\n    \"\"\"\n    Create a pie chart\n    \"\"\"\n    plt.figure(figsize=(10, 8))\n\n    if isinstance(data, pd.DataFrame):\n        labels = data[labels_col]\n        values = data[values_col]\n    else:\n        labels = data['labels']\n        values = data['values']\n\n    # Create color palette\n    colors = plt.cm.Set3(np.linspace(0, 1, len(labels)))\n\n    # Create pie chart\n    wedges, texts, autotexts = plt.pie(\n        values,\n        labels=labels,\n        autopct='%1.1f%%',\n        startangle=90,\n        colors=colors,\n        explode=[0.05] * len(labels)  # Slightly separate slices\n    )\n\n    # Style percentage text\n    for autotext in autotexts:\n        autotext.set_color('white')\n        autotext.set_fontweight('bold')\n        autotext.set_fontsize(10)\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.axis('equal')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_scatter_plot(data, x_col, y_col, color_col=None, size_col=None,\n                       title='Scatter Plot', output='chart.png'):\n    \"\"\"\n    Create a scatter plot\n    \"\"\"\n    plt.figure(figsize=(10, 8))\n\n    if isinstance(data, pd.DataFrame):\n        x = data[x_col]\n        y = data[y_col]\n        c = data[color_col] if color_col else None\n        s = data[size_col] if size_col else 50\n    else:\n        x = data['x']\n        y = data['y']\n        c = None\n        s = 50\n\n    scatter = plt.scatter(x, y, c=c, s=s, alpha=0.6, cmap='viridis')\n\n    if color_col:\n        plt.colorbar(scatter, label=color_col)\n\n    # Add trend line\n    z = np.polyfit(x, y, 1)\n    p = np.poly1d(z)\n    plt.plot(x, p(x), \"r--\", alpha=0.8, label='Trend')\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(x_col if isinstance(data, pd.DataFrame) else 'X', fontsize=12)\n    plt.ylabel(y_col if isinstance(data, pd.DataFrame) else 'Y', fontsize=12)\n    plt.grid(True, alpha=0.3)\n    plt.legend()\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_histogram(data, column, bins=30, title='Histogram', output='chart.png'):\n    \"\"\"\n    Create a histogram\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n\n    if isinstance(data, pd.DataFrame):\n        values = data[column]\n    else:\n        values = data\n\n    n, bins, patches = plt.hist(values, bins=bins, color='steelblue',\n                                 alpha=0.7, edgecolor='black')\n\n    # Add mean line\n    mean_val = np.mean(values)\n    plt.axvline(mean_val, color='red', linestyle='dashed', linewidth=2,\n                label=f'Mean: {mean_val:.2f}')\n\n    # Add median line\n    median_val = np.median(values)\n    plt.axvline(median_val, color='green', linestyle='dashed', linewidth=2,\n                label=f'Median: {median_val:.2f}')\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xlabel(column if isinstance(data, pd.DataFrame) else 'Value', fontsize=12)\n    plt.ylabel('Frequency', fontsize=12)\n    plt.legend()\n    plt.grid(axis='y', alpha=0.3)\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_box_plot(data, columns, title='Box Plot', output='chart.png'):\n    \"\"\"\n    Create a box plot\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n\n    if isinstance(data, pd.DataFrame):\n        data_to_plot = [data[col].dropna() for col in columns]\n        labels = columns\n    else:\n        data_to_plot = data\n        labels = [f'Group {i+1}' for i in range(len(data))]\n\n    bp = plt.boxplot(data_to_plot, labels=labels, patch_artist=True)\n\n    # Color boxes\n    for patch in bp['boxes']:\n        patch.set_facecolor('lightblue')\n        patch.set_alpha(0.7)\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.ylabel('Value', fontsize=12)\n    plt.grid(axis='y', alpha=0.3)\n    plt.xticks(rotation=45, ha='right')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\ndef create_heatmap(data, title='Heatmap', output='chart.png'):\n    \"\"\"\n    Create a heatmap (correlation matrix)\n    \"\"\"\n    plt.figure(figsize=(10, 8))\n\n    if isinstance(data, pd.DataFrame):\n        # Calculate correlation matrix\n        corr_matrix = data.corr()\n    else:\n        corr_matrix = data\n\n    # Create heatmap\n    im = plt.imshow(corr_matrix, cmap='coolwarm', aspect='auto',\n                    vmin=-1, vmax=1)\n\n    # Add colorbar\n    cbar = plt.colorbar(im)\n    cbar.set_label('Correlation', rotation=270, labelpad=20)\n\n    # Set ticks and labels\n    plt.xticks(range(len(corr_matrix.columns)), corr_matrix.columns,\n               rotation=45, ha='right')\n    plt.yticks(range(len(corr_matrix.columns)), corr_matrix.columns)\n\n    # Add correlation values\n    for i in range(len(corr_matrix)):\n        for j in range(len(corr_matrix.columns)):\n            text = plt.text(j, i, f'{corr_matrix.iloc[i, j]:.2f}',\n                          ha='center', va='center', color='black', fontsize=9)\n\n    plt.title(title, fontsize=16, fontweight='bold', pad=20)\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n```\n\n## Python - Seaborn\n\n```python\nimport seaborn as sns\n\ndef create_seaborn_chart(data, chart_type, x, y=None, hue=None,\n                        title='Chart', output='chart.png'):\n    \"\"\"\n    Create charts using Seaborn\n    \"\"\"\n    plt.figure(figsize=(12, 6))\n\n    # Set style\n    sns.set_style(\"whitegrid\")\n    sns.set_palette(\"husl\")\n\n    if chart_type == 'bar':\n        sns.barplot(data=data, x=x, y=y, hue=hue)\n\n    elif chart_type == 'line':\n        sns.lineplot(data=data, x=x, y=y, hue=hue, marker='o')\n\n    elif chart_type == 'scatter':\n        sns.scatterplot(data=data, x=x, y=y, hue=hue, size=hue, alpha=0.6)\n\n    elif chart_type == 'box':\n        sns.boxplot(data=data, x=x, y=y, hue=hue)\n\n    elif chart_type == 'violin':\n        sns.violinplot(data=data, x=x, y=y, hue=hue)\n\n    elif chart_type == 'dist':\n        sns.histplot(data=data, x=x, hue=hue, kde=True)\n\n    elif chart_type == 'heatmap':\n        sns.heatmap(data.corr(), annot=True, fmt='.2f', cmap='coolwarm',\n                   center=0, square=True, linewidths=1)\n\n    elif chart_type == 'pairplot':\n        # Special case - creates its own figure\n        g = sns.pairplot(data, hue=hue)\n        g.savefig(output, dpi=300, bbox_inches='tight')\n        return output\n\n    plt.title(title, fontsize=16, fontweight='bold')\n    plt.xticks(rotation=45, ha='right')\n    plt.tight_layout()\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n\n# Advanced Seaborn visualizations\ndef create_facet_grid(data, x, y, col=None, row=None, hue=None,\n                     title='Facet Grid', output='chart.png'):\n    \"\"\"\n    Create faceted charts\n    \"\"\"\n    g = sns.FacetGrid(data, col=col, row=row, hue=hue, height=4)\n    g.map(sns.scatterplot, x, y, alpha=0.6)\n    g.add_legend()\n    g.fig.suptitle(title, y=1.02, fontsize=16, fontweight='bold')\n\n    plt.savefig(output, dpi=300, bbox_inches='tight')\n    plt.close()\n\n    return output\n```\n\n## JavaScript - Chart.js\n\n```javascript\nconst { ChartJSNodeCanvas } = require('chartjs-node-canvas');\n\nasync function createBarChart(data, options = {}) {\n  const width = options.width || 800;\n  const height = options.height || 600;\n\n  const chartJSNodeCanvas = new ChartJSNodeCanvas({ width, height });\n\n  const configuration = {\n    type: 'bar',\n    data: {\n      labels: data.labels,\n      datasets: [{\n        label: options.label || 'Dataset',\n        data: data.values,\n        backgroundColor: 'rgba(54, 162, 235, 0.6)',\n        borderColor: 'rgba(54, 162, 235, 1)',\n        borderWidth: 2\n      }]\n    },\n    options: {\n      responsive: true,\n      plugins: {\n        title: {\n          display: true,\n          text: options.title || 'Bar Chart',\n          font: { size: 18 }\n        },\n        legend: {\n          display: true,\n          position: 'top'\n        }\n      },\n      scales: {\n        y: {\n          beginAtZero: true\n        }\n      }\n    }\n  };\n\n  const imageBuffer = await chartJSNodeCanvas.renderToBuffer(configuration);\n  return imageBuffer;\n}\n\nasync function createLineChart(data, options = {}) {\n  const width = options.width || 800;\n  const height = options.height || 600;\n\n  const chartJSNodeCanvas = new ChartJSNodeCanvas({ width, height });\n\n  const configuration = {\n    type: 'line',\n    data: {\n      labels: data.labels,\n      datasets: [{\n        label: options.label || 'Dataset',\n        data: data.values,\n        borderColor: 'rgba(75, 192, 192, 1)',\n        backgroundColor: 'rgba(75, 192, 192, 0.2)',\n        borderWidth: 2,\n        tension: 0.4\n      }]\n    },\n    options: {\n      responsive: true,\n      plugins: {\n        title: {\n          display: true,\n          text: options.title || 'Line Chart',\n          font: { size: 18 }\n        }\n      },\n      scales: {\n        y: {\n          beginAtZero: true\n        }\n      }\n    }\n  };\n\n  const imageBuffer = await chartJSNodeCanvas.renderToBuffer(configuration);\n  return imageBuffer;\n}\n\nasync function createPieChart(data, options = {}) {\n  const width = options.width || 800;\n  const height = options.height || 600;\n\n  const chartJSNodeCanvas = new ChartJSNodeCanvas({ width, height });\n\n  const configuration = {\n    type: 'pie',\n    data: {\n      labels: data.labels,\n      datasets: [{\n        data: data.values,\n        backgroundColor: [\n          'rgba(255, 99, 132, 0.6)',\n          'rgba(54, 162, 235, 0.6)',\n          'rgba(255, 206, 86, 0.6)',\n          'rgba(75, 192, 192, 0.6)',\n          'rgba(153, 102, 255, 0.6)',\n          'rgba(255, 159, 64, 0.6)'\n        ],\n        borderWidth: 2\n      }]\n    },\n    options: {\n      responsive: true,\n      plugins: {\n        title: {\n          display: true,\n          text: options.title || 'Pie Chart',\n          font: { size: 18 }\n        },\n        legend: {\n          position: 'right'\n        }\n      }\n    }\n  };\n\n  const imageBuffer = await chartJSNodeCanvas.renderToBuffer(configuration);\n  return imageBuffer;\n}\n```\n\n## Interactive Charts - Plotly\n\n```python\nimport plotly.express as px\nimport plotly.graph_objects as go\n\ndef create_interactive_bar(data, x, y, title='Bar Chart', output='chart.html'):\n    \"\"\"\n    Create interactive bar chart with Plotly\n    \"\"\"\n    fig = px.bar(data, x=x, y=y, title=title,\n                 color=y, color_continuous_scale='Viridis')\n\n    fig.update_layout(\n        font=dict(size=14),\n        showlegend=True,\n        hovermode='x unified'\n    )\n\n    fig.write_html(output)\n    return output\n\ndef create_interactive_line(data, x, y, title='Line Chart', output='chart.html'):\n    \"\"\"\n    Create interactive line chart\n    \"\"\"\n    fig = px.line(data, x=x, y=y, title=title, markers=True)\n\n    fig.update_traces(line=dict(width=3))\n\n    fig.update_layout(\n        hovermode='x unified',\n        font=dict(size=14)\n    )\n\n    fig.write_html(output)\n    return output\n\ndef create_interactive_scatter(data, x, y, color=None, size=None,\n                              title='Scatter Plot', output='chart.html'):\n    \"\"\"\n    Create interactive scatter plot\n    \"\"\"\n    fig = px.scatter(data, x=x, y=y, color=color, size=size,\n                    title=title, hover_data=data.columns)\n\n    fig.update_traces(marker=dict(line=dict(width=0.5, color='white')))\n\n    fig.write_html(output)\n    return output\n\ndef create_3d_scatter(data, x, y, z, color=None, title='3D Scatter',\n                     output='chart.html'):\n    \"\"\"\n    Create 3D scatter plot\n    \"\"\"\n    fig = px.scatter_3d(data, x=x, y=y, z=z, color=color, title=title)\n\n    fig.update_layout(scene=dict(\n        xaxis_title=x,\n        yaxis_title=y,\n        zaxis_title=z\n    ))\n\n    fig.write_html(output)\n    return output\n\ndef create_time_series(data, date_col, value_col, title='Time Series',\n                      output='chart.html'):\n    \"\"\"\n    Create time series chart\n    \"\"\"\n    fig = go.Figure()\n\n    fig.add_trace(go.Scatter(\n        x=data[date_col],\n        y=data[value_col],\n        mode='lines+markers',\n        name=value_col,\n        line=dict(width=2),\n        marker=dict(size=6)\n    ))\n\n    # Add range slider\n    fig.update_xaxes(\n        rangeslider_visible=True,\n        rangeselector=dict(\n            buttons=list([\n                dict(count=7, label=\"1w\", step=\"day\", stepmode=\"backward\"),\n                dict(count=1, label=\"1m\", step=\"month\", stepmode=\"backward\"),\n                dict(count=3, label=\"3m\", step=\"month\", stepmode=\"backward\"),\n                dict(count=1, label=\"1y\", step=\"year\", stepmode=\"backward\"),\n                dict(step=\"all\")\n            ])\n        )\n    )\n\n    fig.update_layout(\n        title=title,\n        xaxis_title=date_col,\n        yaxis_title=value_col,\n        font=dict(size=14)\n    )\n\n    fig.write_html(output)\n    return output\n\ndef create_dashboard(data, output='dashboard.html'):\n    \"\"\"\n    Create multi-chart dashboard\n    \"\"\"\n    from plotly.subplots import make_subplots\n\n    fig = make_subplots(\n        rows=2, cols=2,\n        subplot_titles=('Bar Chart', 'Line Chart', 'Pie Chart', 'Scatter Plot'),\n        specs=[[{'type': 'bar'}, {'type': 'scatter'}],\n               [{'type': 'pie'}, {'type': 'scatter'}]]\n    )\n\n    # Add charts\n    # Bar chart\n    fig.add_trace(\n        go.Bar(x=data['category'], y=data['value1'], name='Bar'),\n        row=1, col=1\n    )\n\n    # Line chart\n    fig.add_trace(\n        go.Scatter(x=data['date'], y=data['value2'], mode='lines', name='Line'),\n        row=1, col=2\n    )\n\n    # Pie chart\n    fig.add_trace(\n        go.Pie(labels=data['category'], values=data['value1'], name='Pie'),\n        row=2, col=1\n    )\n\n    # Scatter plot\n    fig.add_trace(\n        go.Scatter(x=data['value1'], y=data['value2'], mode='markers', name='Scatter'),\n        row=2, col=2\n    )\n\n    fig.update_layout(height=800, showlegend=True, title_text=\"Dashboard\")\n\n    fig.write_html(output)\n    return output\n```\n\n## Chart Styling and Themes\n\n```python\n# Matplotlib themes\ndef apply_matplotlib_theme(theme='default'):\n    \"\"\"\n    Apply theme to matplotlib charts\n    \"\"\"\n    themes = {\n        'default': 'seaborn-v0_8-darkgrid',\n        'minimal': 'seaborn-v0_8-whitegrid',\n        'dark': 'dark_background',\n        'classic': 'classic',\n        'ggplot': 'ggplot'\n    }\n\n    plt.style.use(themes.get(theme, 'default'))\n\n# Custom color palettes\nCOLOR_PALETTES = {\n    'corporate': ['#003f5c', '#58508d', '#bc5090', '#ff6361', '#ffa600'],\n    'pastel': ['#a8e6cf', '#dcedc1', '#ffd3b6', '#ffaaa5', '#ff8b94'],\n    'vibrant': ['#e74c3c', '#3498db', '#2ecc71', '#f39c12', '#9b59b6'],\n    'monochrome': ['#2c3e50', '#34495e', '#7f8c8d', '#95a5a6', '#bdc3c7']\n}\n\ndef apply_color_palette(palette_name='corporate'):\n    \"\"\"Apply custom color palette\"\"\"\n    colors = COLOR_PALETTES.get(palette_name, COLOR_PALETTES['corporate'])\n    plt.rcParams['axes.prop_cycle'] = plt.cycler(color=colors)\n```\n\n## Export Formats\n\n```python\ndef export_chart_multiple_formats(fig, base_name='chart'):\n    \"\"\"\n    Export chart in multiple formats\n    \"\"\"\n    formats = {\n        'png': {'dpi': 300, 'transparent': False},\n        'svg': {'format': 'svg'},\n        'pdf': {'format': 'pdf'},\n        'jpg': {'dpi': 300, 'format': 'jpg'}\n    }\n\n    files = []\n\n    for fmt, kwargs in formats.items():\n        output_file = f\"{base_name}.{fmt}\"\n        fig.savefig(output_file, bbox_inches='tight', **kwargs)\n        files.append(output_file)\n\n    return files\n```\n\n## Chart Generation Pipeline\n\n```python\ndef generate_charts_from_data(data, chart_configs, output_dir='charts'):\n    \"\"\"\n    Generate multiple charts from data based on configurations\n\n    chart_configs = [\n        {\n            'type': 'bar',\n            'x': 'category',\n            'y': 'value',\n            'title': 'Sales by Category',\n            'output': 'sales_bar.png'\n        },\n        ...\n    ]\n    \"\"\"\n    import os\n    os.makedirs(output_dir, exist_ok=True)\n\n    generated_charts = []\n\n    for config in chart_configs:\n        chart_type = config['type']\n        output = os.path.join(output_dir, config['output'])\n\n        if chart_type == 'bar':\n            create_bar_chart(data, config['x'], config['y'],\n                           config.get('title', 'Chart'), output)\n\n        elif chart_type == 'line':\n            create_line_chart(data, config['x'], config['y'],\n                            config.get('title', 'Chart'), output)\n\n        elif chart_type == 'pie':\n            create_pie_chart(data, config['x'], config['y'],\n                           config.get('title', 'Chart'), output)\n\n        elif chart_type == 'scatter':\n            create_scatter_plot(data, config['x'], config['y'],\n                              config.get('color'), config.get('size'),\n                              config.get('title', 'Chart'), output)\n\n        elif chart_type == 'heatmap':\n            create_heatmap(data, config.get('title', 'Chart'), output)\n\n        generated_charts.append({\n            'type': chart_type,\n            'title': config.get('title'),\n            'file': output\n        })\n\n    return generated_charts\n```\n\n## Best Practices\n\n1. **Choose appropriate chart types** for your data\n2. **Use clear, descriptive titles** and labels\n3. **Apply consistent color schemes** across charts\n4. **Ensure readability** (font sizes, contrast)\n5. **Add context** (annotations, reference lines)\n6. **Export in high resolution** (300 DPI minimum)\n7. **Consider accessibility** (color-blind friendly palettes)\n8. **Test on different screen sizes** (responsive design)\n9. **Optimize file sizes** for web use\n10. **Document chart generation** code for reproducibility\n\n## Common Chart Patterns\n\n### Comparison Charts\n- Bar charts for categorical comparisons\n- Grouped bar charts for multi-series comparison\n- Stacked bar charts for part-to-whole comparisons\n\n### Trend Charts\n- Line charts for time series\n- Area charts for cumulative trends\n- Sparklines for inline trends\n\n### Distribution Charts\n- Histograms for frequency distribution\n- Box plots for statistical distribution\n- Violin plots for distribution shape\n\n### Relationship Charts\n- Scatter plots for correlations\n- Bubble charts for 3D relationships\n- Heatmaps for matrix relationships\n\n### Composition Charts\n- Pie charts for simple part-to-whole\n- Stacked area charts for trends over time\n- Treemaps for hierarchical composition\n\n## Notes\n\n- Always label axes and provide units\n- Use appropriate scales (linear, logarithmic)\n- Consider data-ink ratio (minimize chart junk)\n- Test charts with different data ranges\n- Provide legends when using multiple series\n- Use annotations to highlight key insights\n- Export charts in vector formats for publications\n- Keep color schemes consistent across related charts\n- Consider cultural differences in color meanings\n- Validate data before visualization\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fchart-generator",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill chart-generator",{"tool":47,"command":48},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill chart-generator",{"tool":50,"command":51},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill chart-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fchart-generator\u002FSKILL.md",true,[55,61],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fvault-discovery.md","REFERENCE","参考文档",593,"https:\u002F\u002Fgithub.com\u002Feliottbusiness\u002FDeptFlow-Agent\u002Fblob\u002Fmain\u002Fprofile\u002Fskills\u002Fnote-taking\u002Fobsidian\u002Freferences\u002Fvault-discovery.md",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"skill-report.json",10793,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fchart-generator\u002Fskill-report.json",[66,75,84,93,99,105],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":27},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[72,73,74],"model","model hierarchy","model hierarchy skill",{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":27},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[81,82,83],"MCP","zoom","zoom mcp",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":27},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[90,91,92,82],"sdk","zoom apps sdk","apps",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":27},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[95],{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":27},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[101],{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":27},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[107]]