function render_chart(){
const svg = d3.create("svg")
.classed("malls_chart", true)
.attr("viewBox", [0, 0, renderData.width, renderData.height])
const group1 = svg.append("g")
svg.selectAll('.label')
.attr("transform", "translate(20, 13)")
const circle = d3.symbol().type(d3.symbolCircle);
const symbolScale = d3.scaleOrdinal()
.domain(['SM Supermall', 'Robinsons Mall', 'Ayala Mall'])
.range([ "blue", "red", "orange"] );
const legendCircle = d3Legend
.legendColor()
.shape("path", d3.symbol().type(d3.symbolCircle).size(25)())
.scale(symbolScale)
.shapePadding(15)
.labelOffset(5)
.labels(["SM Supermalls"]);
svg.append("g")
.attr("class", "legend_circle")
.style('font-size', 12)
.style('font-family', 'sans-serif')
.attr("transform", "translate(10,20)")
.call(legendCircle)
const margin_top_legend = 70;
const margin_right_legend = 250;
svg.select(".legend_auto")
.attr("transform", `translate(${centerScale(8)},${margin_top_legend})`)
svg.select(".legend_circle")
.attr("transform", `translate(${centerScale(8)},${margin_top_legend+220})`)
const pathGen = d3.geoPath(geoMercator);
const stage = svg
.append('g')
.attr('transform', `translate(${renderData.margin},${renderData.margin})`);
const textX = 10;
const textY = 10;
const infoText = stage
.append('g');
const tEnter = enter =>
enter
.append('path')
.attr('d', pathGen)
.attr('stroke', 'white')
.attr('fill', mapColor)
.attr('opacity', '0.35')
.classed('geopath', true)
const tUpdate = null;
const tExit = null;
stage
.selectAll('.geopath')
.data(geoJson.features)
.join(tEnter, tUpdate, tExit);
return svg.node();
}