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/heatmap.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>Heatmap</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>29const hours = ['12a','1a','2a','3a','4a','5a','6a','7a','8a','9a','10a','11a',30'12p','1p','2p','3p','4p','5p','6p','7p','8p','9p','10p','11p'];31const days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];3233// [dayIndex, hourIndex, value]34const data = [];35for (let d = 0; d < 7; d++) {36for (let h = 0; h < 24; h++) {37data.push([h, d, Math.round(Math.random() * 100)]);38}39}4041window.CHART_INSTANCES = [];42const chart = echarts.init(document.getElementById('main-chart'), 'dark');43chart.setOption({44backgroundColor: 'transparent',45tooltip: {46position: 'top',47formatter: p => `${days[p.data[1]]} ${hours[p.data[0]]}: ${p.data[2]}`,48},49grid: { top: 20, right: 60, bottom: 40, left: 60 },50xAxis: { type: 'category', data: hours, splitArea: { show: true } },51yAxis: { type: 'category', data: days, splitArea: { show: true } },52visualMap: {53min: 0, max: 100, calculable: true, orient: 'vertical', right: 10, top: 'center',54inRange: { color: ['#0f1117', '#1a3a5c', '#2c7be5', '#5d8fff', '#a5c8ff'] },55textStyle: { color: '#9ca3af' },56},57series: [{58type: 'heatmap', data: data,59label: { show: false },60emphasis: { itemStyle: { shadowBlur: 10, shadowColor: 'rgba(0,0,0,0.5)' } },61}],62});6364CHART_INSTANCES.push(chart);65</script>66</body>67</html>68