client/src/components/core/services/datagraph.js
// calculate the scaling ratio to fill the viewport
calculate the scaling ratio to fill the viewport
calculate the scaling ratio to fill the viewport
function calcBaseScalingRatio(bounds) {
            var marginX = 120;  
            var marginY = 120;
            return Math.max(
                    (Math.abs(bounds.minx - bounds.maxx)) / (window.innerWidth  - marginX),
                    (Math.abs(bounds.miny - bounds.maxy)) / (window.innerHeight - marginY)
                );
        }
function calcBaseScalingRatio ( bounds ) { var marginX = 120 ; var marginY = 120 ; return Math . max ( ( Math . abs ( bounds . minx - bounds . maxx ) ) / ( window . innerWidth - marginX ) , ( Math . abs ( bounds . miny - bounds . maxy ) ) / ( window . innerHeight - marginY ) ) ; }
calculate the scaling ratio to fill the viewport
calculate the scaling ratio to fill the viewport
// duplicates values in layoutService to avoid circular dependency