display = {
const display = d3.create("div").attr("width", 800);
display
.append("img")
.attr("id", "display_image")
.attr("src", image_urls[+selected_image])
.attr("width", 500)
.style("padding-right", "10px");
const vis = display
.append("svg")
.attr("width", 150)
.style("vertical-align", "top")
.style("background", "rgba(212, 211, 211, 1)");
const palette_grid = display
.append("svg")
.attr("width", 150)
.style("vertical-align", "top")
.style("padding-left", "10px");
colour_data_hsl.forEach(function (d, i) {
palette_grid
.append("rect")
.attr("fill", d.rgb)
.attr("width", 20)
.attr("height", 10)
.attr("transform", "translate(0," + i * 10 + ")");
});
const vis_colour_wheel = vis
.append("g")
.attr("transform", "translate(25,25)");
vis_colour_wheel
.append("g")
.attr("class", "r axis")
.attr("transform", "translate(50,50)")
.append("circle")
.attr("r", outerRadius)
.attr("fill", "white")
.attr("stroke", "#d4d4dd")
.attr("stroke-dasharray", 2);
vis_colour_wheel
.selectAll("path")
.data(pie_chart_matrix)
.enter()
.append("path")
.attr("d", arc)
.style("fill", function (d) {
return d[1].rgb;
})
.attr("transform", "translate(50,50) rotate(-15)");
let ga_vis = vis_colour_wheel
.append("g")
.attr("class", "a axis")
.attr("transform", "translate(50,50)")
.selectAll("g")
.data(d3.range(-15, 345, 30))
.enter()
.append("g")
.attr("transform", function (d) {
return "rotate (" + d + ")";
});
ga_vis
.append("line")
.attr("x2", outerRadius)
.attr("stroke", "#d4d4dd")
.attr("stroke-dasharray", 2);
return display;
}