问题描述
我正在尝试使用具有收集到的3个数据列表的chartjs构建气泡图。
使用以下HTML代码
var ctx = document.getElementById('chart').getContext('2d');
var chart = new Chart(ctx,{
// The type of chart we want to create
type: 'bubble',// The data for our dataset
data: {
datasets: [{
label: 'list1-list2-list3',backgroundColor: 'rgb(255,99,132)',pointStyle:'circle'
borderColor: 'rgb(255,data: {
x: {{list1|safe}},y: {{list2|safe}},r: {{list3|safe}}
}
}]
},// Configuration options go here
options: {}
});
我尝试将这些列表转换为数组,然后使用它,但没有成功。 我得到这个 enter image description here
我想要实现类似enter image description here的目标。请指导,非常感谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)