希望这不是一个非常困难的问题。问题就在这里:
<script type="text/javascript">
var cal = new CalHeatMap();
cal.init({
itemSelector: "#subDomainTextFormat-b",
start: new Date(2017, 3), // April, 1st 2017
data: "http://localhost/2017OS.json",
domain: "month",
subDomain: "x_day",
cellSize: 20,
range: 6,
displayLegend: false,
subDomainTextFormat: function(date ,value) {
return value;
}
});
</script>json格式正确,日历初始显示中的日期是正确的。当我应用上述代码时,我没有看到显示的值。作为参考,json看起来如下:
{
"1491004800":40,
"1491091200":56,
"1491177600":52,
"1491264000":53,
"1491350400":58,
"1491436800":48,
"1491523200":44,
"1491609600":57,
"1491696000":62,
"1491782400":68,
"1491868800":73,
"1491955200":61
}如有任何帮助,将不胜感激:)
发布于 2022-03-22 22:07:25
在您的应用程序中从https://github.com/wa0x6e/cal-heatmap/archive/master.zip下载最新版本的Cal我认为您使用3.3.10版本,您应该使用v3.6.2版本。
https://stackoverflow.com/questions/47799190
复制相似问题