zcbot/skills/ppt/templates/charts/butterfly_chart.svg

193 lines
14 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720" width="1280" height="720">
<!--
Diverging Bar Chart (Butterfly Chart) Template
Usage: Left-right comparison, bi-directional data display
Scenarios: Population pyramid, A/B testing, Gender comparison, Income/Expense comparison
Supports: 8 categories, left and right data groups
-->
<defs>
<!-- Left Gradient (Tech Blue) -->
<linearGradient id="leftGrad" x1="100%" y1="0%" x2="0%" y2="0%">
<stop offset="0%" style="stop-color:#3B82F6;stop-opacity:1" />
<stop offset="100%" style="stop-color:#1D4ED8;stop-opacity:1" />
</linearGradient>
<!-- Right Gradient (Elegant Pink) -->
<linearGradient id="rightGrad" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:#EC4899;stop-opacity:1" />
<stop offset="100%" style="stop-color:#BE185D;stop-opacity:1" />
</linearGradient>
<!-- Standard Shadow Filter -->
<filter id="barShadow" x="-15%" y="-15%" width="130%" height="130%">
<feGaussianBlur in="SourceAlpha" stdDeviation="3"/>
<feOffset dx="0" dy="2" result="offsetBlur"/>
<feFlood flood-color="#0F172A" flood-opacity="0.12" result="shadowColor"/>
<feComposite in="shadowColor" in2="offsetBlur" operator="in" result="shadow"/>
<feMerge>
<feMergeNode in="shadow"/>
<feMergeNode in="SourceGraphic"/>
</feMerge>
</filter>
</defs>
<!-- Background -->
<rect width="1280" height="720" fill="#FFFFFF"/>
<!-- Title -->
<text x="640" y="55" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="34" font-weight="bold" fill="#0F172A" text-anchor="middle">User Age Distribution Comparison</text>
<text x="640" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="18" fill="#64748B" text-anchor="middle">2025 User Persona Analysis · Sample Size N=50,000</text>
<!-- Legend -->
<g id="legend" transform="translate(510, 115)">
<rect x="0" y="0" width="20" height="20" rx="3" fill="url(#leftGrad)"/>
<text x="28" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" fill="#475569">Male Users</text>
<rect x="140" y="0" width="20" height="20" rx="3" fill="url(#rightGrad)"/>
<text x="168" y="15" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" fill="#475569">Female Users</text>
</g>
<!-- Chart Area -->
<g id="chartArea">
<!-- Central Axis Label Background (Improves readability) -->
<rect x="580" y="160" width="120" height="460" fill="#F8FAFC" rx="4"/>
<!-- Left X-axis Scale -->
<text x="120" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">20%</text>
<text x="240" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">15%</text>
<text x="360" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">10%</text>
<text x="480" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">5%</text>
<!-- Right X-axis Scale -->
<text x="800" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">5%</text>
<text x="920" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">10%</text>
<text x="1040" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">15%</text>
<text x="1160" y="645" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="13" fill="#64748B" text-anchor="middle">20%</text>
<!-- Grid Lines -->
<line x1="120" y1="160" x2="120" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="240" y1="160" x2="240" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="360" y1="160" x2="360" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="480" y1="160" x2="480" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="800" y1="160" x2="800" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="920" y1="160" x2="920" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="1040" y1="160" x2="1040" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<line x1="1160" y1="160" x2="1160" y2="620" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<!--
Data Description:
Height of each age group bar: 50px, Gap: 6px
Max width: 480px (represents 20%)
Every 1% = 24px
Male data: 3%, 8%, 15%, 18%, 16%, 12%, 6%, 2%
Female data: 4%, 10%, 17%, 15%, 14%, 10%, 5%, 3%
-->
<!-- chart-plot-area: 120,160,1160,620 -->
<!-- Age Group 1: 60+ -->
<g id="row-1" transform="translate(0, 168)">
<rect x="528" y="0" width="72" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="518" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">3%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">60+</text>
<rect x="680" y="0" width="96" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="786" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">4%</text>
</g>
<!-- Age Group 2: 50-59 -->
<g id="row-2" transform="translate(0, 224)">
<rect x="408" y="0" width="192" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="398" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">8%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">50-59</text>
<rect x="680" y="0" width="240" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="930" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">10%</text>
</g>
<!-- Age Group 3: 40-49 -->
<g id="row-3" transform="translate(0, 280)">
<rect x="240" y="0" width="360" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="230" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">15%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">40-49</text>
<rect x="680" y="0" width="408" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="1098" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">17%</text>
</g>
<!-- Age Group 4: 30-39 (Peak) -->
<g id="row-4" transform="translate(0, 336)">
<rect x="168" y="0" width="432" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="158" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="bold" fill="#1D4ED8" text-anchor="end">18%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">30-39</text>
<rect x="680" y="0" width="360" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="1050" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="bold" fill="#BE185D">15%</text>
</g>
<!-- Age Group 5: 25-29 -->
<g id="row-5" transform="translate(0, 392)">
<rect x="216" y="0" width="384" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="206" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">16%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">25-29</text>
<rect x="680" y="0" width="336" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="1026" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">14%</text>
</g>
<!-- Age Group 6: 20-24 -->
<g id="row-6" transform="translate(0, 448)">
<rect x="312" y="0" width="288" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="302" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">12%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">20-24</text>
<rect x="680" y="0" width="240" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="930" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">10%</text>
</g>
<!-- Age Group 7: 18-19 -->
<g id="row-7" transform="translate(0, 504)">
<rect x="456" y="0" width="144" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="446" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">6%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">18-19</text>
<rect x="680" y="0" width="120" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="810" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">5%</text>
</g>
<!-- Age Group 8: <18 -->
<g id="row-8" transform="translate(0, 560)">
<rect x="552" y="0" width="48" height="50" rx="4" fill="url(#leftGrad)" filter="url(#barShadow)"/>
<text x="542" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#1D4ED8" text-anchor="end">2%</text>
<text x="640" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="15" font-weight="600" fill="#0F172A" text-anchor="middle">&lt;18</text>
<rect x="680" y="0" width="72" height="50" rx="4" fill="url(#rightGrad)" filter="url(#barShadow)"/>
<text x="762" y="32" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
font-size="14" font-weight="600" fill="#BE185D">3%</text>
</g>
</g>
<!-- Stats Summary -->
<g id="summary" transform="translate(60, 665)">
<g id="summary-male">
<rect x="0" y="0" width="280" height="40" rx="8" fill="#EFF6FF" stroke="#3B82F6" stroke-width="1"/>
<text x="20" y="26" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="14" fill="#1D4ED8">👨 Male Users: 52% | Avg Age: 34</text>
</g>
<g id="summary-female" transform="translate(300, 0)">
<rect x="0" y="0" width="280" height="40" rx="8" fill="#FDF2F8" stroke="#EC4899" stroke-width="1"/>
<text x="20" y="26" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="14" fill="#BE185D">👩 Female Users: 48% | Avg Age: 32</text>
</g>
</g>
<!-- Data Source -->
<text x="1220" y="695" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"
font-size="14" fill="#94A3B8" text-anchor="end">Data Source: User Data Analytics Platform</text>
</svg>