How to adjust the start angle and end angle in in d3 js donut chart for clock data

I have data in specific format like below:

        const clockData = [
            { label: "Balance", value: 360 },
            { label: "Booking 1", value: 255 },
            { label: "Break 1", value: 45 },
            { label: "Booking 2", value: 60 }.. and so on
        ];

// Compute the position of each group on the pie:
            var pie = d3.pie()
                // .startAngle(-1.5)
                .value(function(d) {return d.value; }).sort(null)
            var data_ready = pie(d3.entries(data))

            console.log(data_ready);

            const clockData = [
                { label: "Balance", value: 360 },
                { label: "Booking 1", value: 255 },
                { label: "Break 1", value: 45 },
                { label: "Booking 2", value: 60 }
            ];

    // Use colors from newColors array
                const color = d3.scaleOrdinal()
                    .domain(clockData.map(d => d.label))
                    .range(newColors);
    
    // Calculate total time (720 minutes for a 12-hour clock)
                const totalTime = 720;
    
    // Convert time to minutes (e.g., 9 am = 9 * 60 = 540 minutes)
                let timeInMinutes = initialTimeInMinutes;
    
                console.log("initialTimeInMinutes ",initialTimeInMinutes);
    // Example usage
                console.log(getAngleOffset(0));    // Should print -0.25 (12 o'clock)
                console.log(getAngleOffset(180));  // Should print 0 (3 o'clock)
                console.log(getAngleOffset(360));  // Should print 0.25 (6 o'clock)
                console.log(getAngleOffset(540));  // Should print 0.50 (9 o'clock)
                console.log(getAngleOffset(720));  // Should print -0.25 (12 o'clock again)
    
    // Testing intermediate values
                console.log(getAngleOffset(90));   // Should print between -0.25 and 0
                console.log(getAngleOffset(270));  // Should print between 0 and 0.25
                console.log(getAngleOffset(450));  // Should print between 0.25 and 0.50
                console.log(getAngleOffset(630));  // Should print between 0.50 and -0.25
    
    
                let magicConstant = getAngleOffset(initialTimeInMinutes)
    // Calculate angles for each slice based on the proportion of total time
                // Calculate angles for each slice based on the proportion of total time
                formattedData.forEach(d => {
                    d.startAngle = ((timeInMinutes / totalTime) + magicConstant) * 2 * Math.PI;
                    d.endAngle = (((timeInMinutes + d.value) / totalTime) + magicConstant) * 2 * Math.PI;
                    timeInMinutes += d.value; // Update time for the next slice
                });
    
    // Build the pie chart: Basically, each part of the pie is a path that we build using the arc function.
    // Build the clock representation
                svg.selectAll()
                    .data(clockData)
                    .enter()
                    .append('path')
                    .attr('d', d3.arc()
                        .innerRadius(42) // This is the size of the donut hole
                        .outerRadius(radius)
            )
                    .attr('fill', d => color(d.label));

    function getAngleOffset(minutes) {
        const totalMinutes = 720; // Total minutes in a 12-hour clock
        const offsets = {
            0: -0.25,    // 12 o'clock
            180: 0,      // 3 o'clock
            360: 0.25,   // 6 o'clock
            540: 0.50,   // 9 o'clock
            720: -0.25   // Back to 12 o'clock
        };
    
        // Find the closest base point
        const basePoints = [0, 180, 360, 540, 720];
        let closestBase = 0;
        for (let i = 0; i < basePoints.length; i++) {
            if (minutes <= basePoints[i]) {
                closestBase = basePoints[i];
                break;
            }
        }
    
        // Calculate the proportion of the way to the next base point
        let previousBase = (closestBase === 0) ? 720 : basePoints[basePoints.indexOf(closestBase) - 1];
        let proportion = (minutes - previousBase) / (closestBase - previousBase);
    
        // Calculate the offset
        let startOffset = offsets[previousBase];
        let endOffset = offsets[closestBase];
        return startOffset + proportion * (endOffset - startOffset);
    }

now i want to plot that clock data on donut chart like 540 minutes represents the position of clock is at 9 and also the bookings can be as many as possible but it is not plotting correctly on donut chart here i am considering the donut chart as clock with 12 is -0.25 offset 0 is at 3, offset 0.25 is at 6, and offset 0.50 at 9.
Any help on that will be appreciated much

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật