json - 无法显示 boxAndWhisker canvasJS
问题描述
我想用 canvasJS 在 boxAndWhisker 图上显示值。我可以显示带有 X 标签和 Y 值的轴,但我不能显示 boxAndWhisker 图
这是我的代码
<c:out value="${pointdata}" escapeXml="false" />
<script type="text/javascript">
window.onload = function() {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
theme: "light2",
title:{
text: "sondes 42"
},
subtitles: [{
text: "controle"
}],
axisY: {
title: "intensite des sondes",
},
data: [{
type: "boxAndWhisker",
yValueFormatString: "###.##",
dataPoints : <%out.print(dataPoints) ;%>
}]
});
chart.render();
}
我的点数据值(json 格式):
[{"y":[146.86,141.54,166.51,121.42],"label":"May 7, 2021 3:24:10 PM"},{"y":[146.86,141.54,166.51,121.42,142.23,135.64,121.04,130.38,132.5,134.26,140.98,121.07,131.79,145.17],"label":"May 6, 2021 3:05:23 PM"},{"y":[146.86,141.54,166.51,121.42,142.23,135.64,121.04,130.38,132.5,134.26,140.98,121.07,131.79,145.17,108.57,119.04,120.21,107.85,106.53,99.82,115.4,95.98],"label":"May 17, 2021 11:46:58 AM"}]
显示图
我不知道如何显示 boxAndWhisker
解决方案
推荐阅读
- makefile - make install 找不到 aclocal
- python-3.x - 分别在目录中的特定文件上运行代码(按文件名)
- bash - 使用 SSH 密钥登录在 Git Bash 上不起作用,但在 Windows 命令提示符中起作用
- javascript - 使用 Google 地球引擎将每日数据减少到每月
- java - 为什么 Dom4JDriver 在 xml 内容的开头附加换行符?
- memory-management - 内核内存与用户内存分配
- mongodb - 如何通过 MongoDB Compass 或 RoboMongo 等 UI 工具连接运行在 Kubernetes 集群上的 MongoDB?
- python - TensorFlow 环境未激活
- python-3.x - 如何拆分 json 有效负载并触发 POST 请求
- nginx - Heroku + nginx-buildpack