- {% for learning_sequence in page.get_children %}
-
-
{{ learning_sequence.title }}
- {% for learning_unit in learning_sequence.get_children %}
-
-
{{ learning_unit.title }}
+
+ {% for learning_sequence in page.get_children %}
+
+
{{ learning_sequence.title }}
+ {% for learning_unit in learning_sequence.get_children %}
+
+
{{ learning_unit.title }}
+
+ {% endfor %}
{% endfor %}
- {% endfor %}
-
+ var svg = d3.select("svg"),
+ width = svg.attr("width"),
+ height = svg.attr("height"),
+ radius = Math.min(width, height) / 2.5,
+ g = svg.append("g").attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
+ var color = '#99C7E7';
+
+ // Generate the pie
+ var pie = d3.pie();
+
+ // Generate the arcs
+ var arc = d3.arc()
+ .innerRadius(radius / 2.5)
+ .padAngle(12 / 360)
+ .outerRadius(radius);
+
+ // Generate the arrows
+ var arrow = d3.arc()
+ .innerRadius(radius * 1.15)
+ .padAngle(30 / 360)
+ .outerRadius(radius * 1.16);
+
+
+ //Generate groups
+ var arcs = g.selectAll("arc")
+ .data(pie(data))
+ .enter()
+ .append("g")
+ .attr("class", "arc")
+
+
+ //Generate groups
+ var arrows = g.selectAll("arrow")
+ .data(pie(data))
+ .enter()
+ .append("g")
+ .attr("class", "arrow")
+ .attr("marker-start", "url(#triangle)")
+
+
+ var markers = g.selectAll("arrow").attr("transform", "translate(60, 60) rotate(30)")
+
+
+ //Draw arc paths
+ arcs.append("path")
+ .attr("fill", color)
+ .attr("d", arc)
+
+ //Draw arrow paths
+ arrows.append("path")
+ .attr("fill", color)
+ .attr("d", arrow)
+
+
{% endblock %}