我使用谷歌图表API绘制散点图,有没有办法在散点图中标记每个节点.我想它只使用数值.....我可以使用任何其他工具.例:
Name Age Response
Allen 12 40
Tom 16 45
Sim 17 60
Run Code Online (Sandbox Code Playgroud)
X轴和y轴分别是年龄和响应,但图中的每个节点都可以标记为Allen,Tom,Sim
我正在尝试重新创建美国失业的jVectorMap示例可视化.我直接从github上获取了代码.地图,不会加载,控制台给我这个错误:"jvm没有定义."
这是代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Maps</title>
<link rel="stylesheet" media="all" href="../jvectormap/jquery-jvectormap.css"/>
<link rel="stylesheet" media="all" href="css/jquery-ui-1.8.21.custom.css"/>
<script src="../jvectormap/tests/assets/jquery-1.8.2.js"></script>
<script src="../jquery-jvectormap.js"></script>
<script src="../jvectormap/tests/assets/jquery-jvectormap-us-aea-en.js"></script>
<script src="jquery-ui-1.8.21.custom.min.js"></script>
<script>
$(function(){
$.getJSON('data.json', function(data){
var val = 2009;
statesValues = jvm.values.apply({}, jvm.values(data.states)),
metroPopValues = Array.prototype.concat.apply([], jvm.values(data.metro.population)),
metroUnemplValues = Array.prototype.concat.apply([], jvm.values(data.metro.unemployment));
$('.map').vectorMap({
map: 'us_aea_en',
markers: data.metro.coords,
series: {
markers: [{
attribute: 'fill',
scale: ['#FEE5D9', '#A50F15'],
values: data.metro.unemployment[val],
min: jvm.min(metroUnemplValues),
max: jvm.max(metroUnemplValues)
},{
attribute: 'r',
scale: [5, 20],
values: data.metro.population[val],
min: jvm.min(metroPopValues),
max: jvm.max(metroPopValues)
}], …Run Code Online (Sandbox Code Playgroud)