40
rated 0 times
[
43]
[
3]
/ answers: 1 / hits: 15567
/ 10 Years ago, sat, july 5, 2014, 12:00:00
I want to populate simple drop down list in html ,
with values that exist in csv file.
I try something like that , but it doesn't work.
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<title></title>
</head>
<body>
</body>
<script src=http://d3js.org/d3.v3.js></script>
<script>
d3.csv(valuesforDD.csv, function(error, data) {
var select = d3.select(body)
.append(div)
.append(select)
select.selectAll(option)
.data(data)
.enter().append(option)
.attr(value, function (d) { return d; })
.text(function (d) { return d; });
}
</script>
</html>
What should I change?
thank you
More From » html