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/bar.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>Bar 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:450px;"></div>25</div>2627<script>{{BASE_EXPORT_JS}}</script>28<script>29// === DATA ===30const categories = ['Product A','Product B','Product C','Product D','Product E'];31const series = [32{ name: 'Q1', data: [120,200,150,80,70] },33{ name: 'Q2', data: [150,230,180,100,90] },34{ name: 'Q3', data: [180,260,200,120,110] },35];3637// === CHART ===38window.CHART_INSTANCES = [];39const chart = echarts.init(document.getElementById('main-chart'), 'dark');40chart.setOption({41backgroundColor: 'transparent',42tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },43legend: { top: 8 },44grid: { top: 50, right: 30, bottom: 30, left: 60 },45xAxis: { type: 'category', data: categories },46yAxis: { type: 'value' },47series: series.map(s => ({48name: s.name,49type: 'bar',50data: s.data,51barMaxWidth: 40,52emphasis: { focus: 'series' },53itemStyle: { borderRadius: [4, 4, 0, 0] },54})),55});5657CHART_INSTANCES.push(chart);58</script>59</body>60</html>61