KARKA OF HOUSE 2 WORKING GOOD
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Kundli with 12 Houses</title>
<style>
.chart {
width: 300px;
height: 300px;
position: relative;
border: 2px solid orange;
background: white;
font-family: Arial, sans-serif;
}
.house {
position: absolute;
font-size: 10px;
font-weight: bold;
color: black;
text-align: center;
width: 50px;
height: 50px;
line-height: 50px;
white-space: nowrap;
overflow: visible;
text-overflow: clip;
display: flex;
align-items: center;
justify-content: center;
}
/* Positioning of houses */
.house-1 { top: 30%; left: 35%; transform: translate(50%, 0); }
.house-2 { top: -5%; left: 15%; transform: translate(15%, 50%); }
.house-3 { top: 25%; left: 10%; transform: translate(-50%, -50%); }
.house-4 { top: 45%; left: 17%; transform: translate(50%, 0); }
.house-5 { bottom: 10%; left: 15%; transform: translate(-50%, -50%); }
.house-6 { bottom: 15%; left: 15%; transform: translate(15%, 50%); }
.house-7 { bottom: 30%; left: 35%; transform: translate(50%, 0); }
.house-8 { bottom: 15%; right: 20%; transform: translate(15%, 50%); }
.house-9 { bottom: 5%; right: -5%; transform: translate(-50%, -50%); }
.house-10 { top: 45%; right: 5%; transform: translate(-50%, -50%); }
.house-11 { top: 20%; right: -5%; transform: translate(-50%, -50%); }
.house-12 { top: -5%; right: 15%; transform: translate(15%, 50%); }
.inner-square {
position: absolute;
top: 50%;
left: 50%;
width: 70%;
height: 70%;
background: transparent;
border: 2px solid blue;
transform: translate(-50%, -50%) rotate(45deg);
}
.diagonal {
position: absolute;
background-color: #ff0000;
height: 2px;
z-index: 1;
}
.diagonal.ad {
top: 0;
left: 0;
width: 141%;
transform: rotate(45deg);
transform-origin: top left;
}
.diagonal.bc {
bottom: 0;
left: 0;
width: 141%;
transform: rotate(-45deg);
transform-origin: bottom left;
}
</style>
</head>
<body>
<div class="chart" id="kundli-chart">
<!-- Houses -->
<div class="house house-1" id="house-1">SU</div>
<div class="house house-2" id="house-2">MO</div>
<div class="house house-3" id="house-3">MA</div>
<div class="house house-4" id="house-4">MO ME</div>
<div class="house house-5" id="house-5">VE</div>
<div class="house house-6" id="house-6">MA, SA</div>
<div class="house house-7" id="house-7">JU</div>
<div class="house house-8" id="house-8">SA</div>
<div class="house house-9" id="house-9">SU JU</div>
<div class="house house-10" id="house-10">SU JU RA ME SA</div>
<div class="house house-11" id="house-11">JU</div>
<div class="house house-12" id="house-12">KE SA</div>
<!-- Inner Rotated Square -->
<div class="inner-square"></div>
<!-- Diagonals connecting the outer square corners -->
<div class="diagonal ad"></div>
<div class="diagonal bc"></div>
</div>
<script>
// Example data object
const houseData = {
1: "SU",
2: "MO",
3: "MA",
4: "MO ME",
5: "VE",
6: "MA, SA",
7: "JU",
8: "SA",
9: "SU JU",
10: "SU JU RA ME SA",
11: "JU",
12: "KE SA"
};
function updateChart(data) {
for (let i = 1; i <= 12; i++) {
const houseElement = document.getElementById(`house-${i}`);
if (houseElement) {
houseElement.textContent = data[i] || '';
}
}
}
// Call updateChart with your data object
updateChart(houseData);
</script>
</body>
</html>
SU
MO
MA
MO ME
VE
MA, SA
JU
SA
SU JU
SU JU RA ME SA
JU
KE SA
Comments
Post a Comment