Module talk:Piechart/cuts.json

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Description[edit]

The values in the cuts.json represent the heights of a triangle cutting a circle every 0.1% of the circle (from 0.1% to 5.0%).

The calculation of the triangle height looks like this:

function cutHeight(v) {
    const x = (90 * v) / 25;
    const angleRadians = mathRadians(x);
    const tgValue = Math.tan(angleRadians);
    const proc = tgValue * 100;
    return proc;
}

See Also[edit]