brain = {
const height = 400;
const svg = d3
.create("svg")
.attr('width',width/2)
.attr('height',height)
.attr("viewBox", [0,0,1000,1000])
var gOutline = svg.append("g")
.attr("id", "brain_outline")
.selectAll("path")
.data(outline)
.join("path")
.attr("class", "outline")
.attr("d",d=>d.d)
.attr("id",d=>d.id)
.attr("transform",d=>d.transform)
.attr("style",d=>d.style)
var gFills = svg.append("g")
.selectAll('path')
.data(fillsections)
.join("path")
.attr("class", "bp")
.attr("d",d=>d.d)
.attr("id",d=>d.id)
.attr("style",d=>d.style)
var gOverlay = svg.append("g")
.selectAll('path')
.data(overlays)
.join("path")
.attr("class", "touch")
.attr("d",d=>d.d)
.attr("id",d=>d.id)
.attr("style",d=>d.style)
.on("mouseover", function(d) {
/* the target element */
var target = d3.select('#'+this.id.slice(2,))
console.log(target.style('fill'))
target.transition().duration(250)
.style("stroke", d3.hsl(target.style('fill')).brighter(0.2))
.attr("class","bp shadow")
.style("stroke-width", "2px")
.style("stroke-opacity", "1")
.attr("opacity", '1')
/* The other elements */
d3.selectAll('.bp').filter(e => e.id !== this.id.slice(2,))
.transition().duration(100)
.attr("class","bp")
.style("stroke-width", "0px")
.attr("opacity", '0.5')
/* the accordian
console.log(this.id);
var panel_to_active = content.filter(o => { return o.name === this.id.slice(2,) });
var panel = document.getElementById('panel-'+panel_to_active.name);
panel.display = 'block';
*/
})
.on("mouseout", function(d) {
d3.selectAll('.bp')
.transition().duration(200)
.style("stroke-width", "0px")
.attr("opacity", '1.0')
})
// svg.selectAll('g').attr("transform",`translate(-${width/8},0)`)
const p = document.createElement("div");
p.appendChild(svg.node());
p.appendChild(otherhtml);
return p;
}