function zoomedCallback(event) {
d3.selectAll('.svg1-tooltip').style("visibility", 'hidden');
xSubgroupYear.rangeRound([0, x.bandwidth()]);
x.range([0, width].map(d => event.transform.applyX(d)));
svg.select(".x-axis").call(d3.axisBottom(x));
svg.selectAll(".barGroup").attr("transform", (d) => "translate(" + x(d.group) + ",0)");
if (
(event.sourceEvent && event.sourceEvent.type) !== "brush"
) {
dispatchZoom.call("zoomCallingBrush", event);
}
const transformValue = Math.abs(event.transform.k - zoomScale);
if (transformValue < 0.00001) {
if (event.sourceEvent && event.sourceEvent.type !== "brush") {
if (svg.selectAll("[class*='x-axis-2']").empty()) {
const monthlyAxes = getMonthlyAxes(svg, height, true);
if (svg.selectAll(".barGroup-Secondary").empty()) {
generateBarsMonthZoomed(svg, monthlyAxes, y);
}
}
}
} else {
svg.selectAll(".bar")
.attr("x", function(d) { return xSubgroupYear(d.key);})
.attr("width", xSubgroupYear.bandwidth());
if (!svg.selectAll(".barGroup-Secondary").empty()) {
generateBarsYear(svg, x, y, height, color);
svg.selectAll("[class*='x-axis-2']").remove();
}
}
}