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/scatter.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>Scatter 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 id="main-chart" style="width:100%;height:500px;"></div>25</div>2627<script>{{BASE_EXPORT_JS}}</script>28<script>29// === DATA: [x, y, size, category] ===30const data = {31'Group A': Array.from({length:30}, () => [Math.random()*100, Math.random()*100, Math.random()*40+5]),32'Group B': Array.from({length:30}, () => [Math.random()*100, Math.random()*100, Math.random()*40+5]),33};3435window.CHART_INSTANCES = [];36const chart = echarts.init(document.getElementById('main-chart'), 'dark');37chart.setOption({38backgroundColor: 'transparent',39tooltip: { formatter: p => `${p.seriesName}<br>X: ${p.data[0].toFixed(1)}, Y: ${p.data[1].toFixed(1)}` },40legend: { top: 8 },41grid: { top: 50, right: 30, bottom: 40, left: 60 },42xAxis: { type: 'value', name: 'X Axis' },43yAxis: { type: 'value', name: 'Y Axis' },44series: Object.entries(data).map(([name, vals]) => ({45name, type: 'scatter', data: vals,46symbolSize: d => d[2] / 3,47emphasis: { focus: 'series' },48itemStyle: { opacity: 0.75 },49})),50});5152CHART_INSTANCES.push(chart);53</script>54</body>55</html>56