gui/src/components/MiningResultDensity.js
// A function that updates the chart when the user zoom and thus new boundaries are available
A function that updates the chart when the user zoom and thus new boundaries are available
A function that updates the chart when the user zoom and thus new boundaries are available
function updateChart() {
            let newX = d3.event.transform.rescaleX(xScale);
            let newY = d3.event.transform.rescaleY(yScale);
            scatter
                .selectAll("circle")
                .attr("cx", d => newX(d[0]))
                .attr("cy", d => newY(d[1]));
        }
function updateChart ( ) { let newX = d3 . event . transform . rescaleX ( xScale ) ; let newY = d3 . event . transform . rescaleY ( yScale ) ; scatter . selectAll ( "circle" ) . attr ( "cx" , d => newX ( d [ 0 ] ) ) . attr ( "cy" , d => newY ( d [ 1 ] ) ) ; }
A function that updates the chart when the user zoom and thus new boundaries are available
A function that updates the chart when the user zoom and thus new boundaries are available
// recover the new scale // update axes with these new boundaries // xAxis.call(d3.axisBottom(newX)); // yAxis.call(d3.axisLeft(newY)); // update circle position