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/line.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>Line Chart</title>7<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>8<style>9{{BASE_STYLES}}10</style>11</head>12<body>13<div class="toolbar">14<div>15<h1>{{TITLE}}</h1>16<div class="subtitle">{{SUBTITLE}}</div>17</div>18<div class="actions">19<button onclick="downloadPNG(this)">๐ฅ Download PNG</button>20<button onclick="copyToClipboard(this)">๐ Copy Image</button>21<button onclick="saveToProject(this)">๐พ Save Image</button>22</div>23</div>2425<div id="chart-area">26<div id="main-chart" style="width:100%;height:450px;"></div>27</div>2829<script>30{{BASE_EXPORT_JS}}31</script>32<script>33// === DATA (replace with real data) ===34const categories = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];35const series = [36{ name: 'Revenue', data: [820,932,901,934,1290,1330,1320,1400,1500,1600,1700,1800] },37{ name: 'Expenses', data: [600,700,680,720,850,900,880,950,1000,1050,1100,1150] },38];3940// === CHART ===41window.CHART_INSTANCES = [];42const chart = echarts.init(document.getElementById('main-chart'), 'dark');43chart.setOption({44backgroundColor: 'transparent',45tooltip: { trigger: 'axis' },46legend: { top: 8 },47grid: { top: 50, right: 30, bottom: 40, left: 60 },48xAxis: { type: 'category', data: categories, boundaryGap: false },49yAxis: { type: 'value' },50dataZoom: [{ type: 'inside' }, { type: 'slider', height: 20, bottom: 5 }],51series: series.map(s => ({52name: s.name,53type: 'line',54data: s.data,55smooth: true,56symbol: 'circle',57symbolSize: 6,58areaStyle: { opacity: 0.08 },59emphasis: { focus: 'series' },60})),61});6263CHART_INSTANCES.push(chart);64</script>65</body>66</html>67