admin管理员组文章数量:1391929
I created a Github Pages with cal-heatmap as shown in the code snippet index.html below. However, no color displayed based on the provided values.
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src=".v7.min.js"></script> <script src=".min.js"></script> <link rel="stylesheet" href=".css"> <title>Monthly Activity</title> </head> <body> <h1>Monthly Activity</h1> <div id="cal-heatmap"></div> <script type="module"> const currentDate = new Date(); const startDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1); const cal = new CalHeatmap(); cal.paint({ itemSelector: "#cal-heatmap", date: { start: startDate }, range: 3, domain: { type: "month", gutter: 10 }, subDomain: { type: "xDay", label: 'DD'}, data: [ { date: "2025-03-01", value: 1 }, { date: "2025-03-02", value: 58 }, { date: "2025-04-12", value: 400 } ], scale: { color: { type: "linear", scheme: 'Cool', domain: [1, 500] } } }); </script> </body> </html>
cat-heatmap
本文标签: github pagesNo color displayed based on the provided values in calheatmapStack Overflow
版权声明:本文标题:github pages - No color displayed based on the provided values in cal-heatmap - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744673606a2618975.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论