Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Generate TradingView-style dark-theme candlestick charts with RSI, MACD, Bollinger Bands, and EMA/SMA using mplfinance.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
templates/pie.html
1<!DOCTYPE html>2<html lang="en">3<head>4<meta charset="UTF-8">5<meta name="viewport" content="width=device-width, initial-scale=1.0">6<title>Pie Chart</title>7<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>8<style>{{BASE_STYLES}}</style>9</head>10<body>11<div class="toolbar">12<div>13<h1>{{TITLE}}</h1>14<div class="subtitle">{{SUBTITLE}}</div>15</div>16<div class="actions">17<button onclick="downloadPNG(this)">๐ฅ Download PNG</button>18<button onclick="copyToClipboard(this)">๐ Copy Image</button>19<button onclick="saveToProject(this)">๐พ Save Image</button>20</div>21</div>2223<div id="chart-area">24<div class="grid-2">25<div class="chart-box">26<div class="chart-title">Distribution</div>27<div id="pie-chart" style="width:100%;height:400px;"></div>28</div>29<div class="chart-box">30<div class="chart-title">Breakdown (Donut)</div>31<div id="donut-chart" style="width:100%;height:400px;"></div>32</div>33</div>34</div>3536<script>{{BASE_EXPORT_JS}}</script>37<script>38// === DATA ===39const data = [40{ name: 'Category A', value: 335 },41{ name: 'Category B', value: 234 },42{ name: 'Category C', value: 154 },43{ name: 'Category D', value: 135 },44{ name: 'Category E', value: 108 },45];4647// === PIE ===48window.CHART_INSTANCES = [];49const pie = echarts.init(document.getElementById('pie-chart'), 'dark');50pie.setOption({51backgroundColor: 'transparent',52tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' },53series: [{54type: 'pie', radius: '65%', center: ['50%','55%'],55data: data,56emphasis: { itemStyle: { shadowBlur: 10, shadowColor: 'rgba(0,0,0,0.5)' } },57label: { color: '#c8cdd6' },58}],59});606162CHART_INSTANCES.push(pie);63// === DONUT ===64const donut = echarts.init(document.getElementById('donut-chart'), 'dark');65donut.setOption({66backgroundColor: 'transparent',67tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' },68series: [{69type: 'pie', radius: ['40%','70%'], center: ['50%','55%'],70data: data,71emphasis: { label: { show: true, fontSize: 14, fontWeight: 'bold' } },72label: { show: true, formatter: '{b}\n{d}%', color: '#c8cdd6' },73itemStyle: { borderRadius: 6, borderColor: '#12141c', borderWidth: 2 },74}],75});7677CHART_INSTANCES.push(donut);78</script>79</body>80</html>81