![]() |
![]() ![]() |
![]() |
sujatha |
![]()
Post
#1
|
Group: Members Posts: 4 Joined: 18-November 23 Member No.: 29,091 ![]() |
I want to make chart using html css design, I have attached design I tried table, tr, td, it didn't work since it is combination of square and triangle. Is there any way to make this design happen? After this code design, i will take care of value passing to all squares and triangles. I need just that diagram code or support. Thanks for your support.
Attached thumbnail(s) ![]() |
Jason Knight |
![]()
Post
#2
|
Member ![]() ![]() ![]() Group: Members Posts: 98 Joined: 25-December 22 Member No.: 28,719 ![]() |
What makes that image a "chart"? What's the DATA? What are the semantic relationships of your data-points to each-other?
HTML is for saying what things are, not what they look like. CSS is appearance, but ... well, I'm guessing but I think whatever you are trying to do is beyond its capabilities. This might be SVG or maybe JavaScript + <canvas>'s job. |
Christian J |
![]()
Post
#3
|
. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 9,565 Joined: 10-August 06 Member No.: 7 ![]() |
I suppose it's an Indian astrological chart, something I alas know nothing about.
|
pandy |
![]()
Post
#4
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,637 Joined: 9-August 06 Member No.: 6 ![]() |
How did Meyer create that chistmas tree again? But I assume the rhombi will be filled with content, so probably whatever method he used wouldn't work.
|
Christian J |
![]()
Post
#5
|
. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 9,565 Joined: 10-August 06 Member No.: 7 ![]() |
Maybe an image map could be used?
|
CharlesEF |
![]()
Post
#6
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,965 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
Could CSS help with this?
CODE table { transform: rotate(45deg); } |
pandy |
![]()
Post
#7
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,637 Joined: 9-August 06 Member No.: 6 ![]() |
I think it could! And assuming the content should not be tilted it could be rotated back again. Not the TDs, because the borders are needed, but a DIV or something inside the TDs. But how to crop the not needed bits off in a not too nasty way?
|
sujatha |
![]()
Post
#8
|
Group: Members Posts: 4 Joined: 18-November 23 Member No.: 29,091 ![]() |
Thanks for all your feed backs, yes it is North Indian style Astrological Chart. Nodejs generated Data is ready to pass on each square and triangle. I already created south indian hora chart using table successfully. Just need html , css diagram for that.
Thanks, Sujatha |
pandy |
![]()
Post
#9
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,637 Joined: 9-August 06 Member No.: 6 ![]() |
Could you show us how a complete chart with data looks? An image would be fine. Just want to get a grip of how it looks.
|
pandy |
![]()
Post
#10
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,637 Joined: 9-August 06 Member No.: 6 ![]() |
OK, using CharlesEF's idea, I came up with this. It's messy, but I can't think of another way. And I haven't figured out how to put a border around the whole thing - I think there is one in your image. I'd still like to see how the content looks. Maybe it isn't needed to rotate it back.
Note that when the table is rotated it sticks out of the box, so to speak. It even sticks out of the viewport. Hence the margins. This may make it hard to place on the page. CODE table { transform: rotate(45deg); empty-cells: show; border-collapse: collapse; margin: 10em 0 0 10em } td { border: 2px solid; width: 6em; height: 6em } td div { transform: rotate(-45deg) } #a .a { border: none } #a .b { border-style: none solid solid none } #a .c { border-style: none none solid solid } #a .d { border: none } #b .a { border-style: none solid solid none } #b .d { border-style: none none solid solid } #c .a { border-style: solid solid none none } #c .d { border-style: solid none none solid } #d .a { border-style: none } #d .b { border-style: solid solid none none } #d .c { border-style: solid none none none } #d .d { border-style: none } HTML <table> <tr id="a"> <td class="a"></td> <td class="b"></td> <td class="c"></td> <td class="d"></td> </tr> <tr id="b"> <td class="a"></td> <td><div>qwerty</div></td> <td><div>qwerty</div></td> <td class="d"></td> </tr> <tr id="c"> <td class="a"></td> <td><div>qwerty</div></td> <td><div>qwerty</div></td> <tdv class="d"></td> </tr> <tr id="d"> <td class="a"></td> <td class="b"></td> <td class="c"></td> <td class="d"></td> </tr> </table> ![]() |
sujatha |
![]()
Post
#11
|
Group: Members Posts: 4 Joined: 18-November 23 Member No.: 29,091 ![]() |
Thank you so much for all your support putting together. I am sending code for south indian chart as you are interested, i may change height width later with little updates...
#######HTML ########## <h4>South Indian Chart</h4> <table className="tableA"> <tr> <td id='Pi'>{PiVal}</td><td id='Ar'>{ArVal}</td><td id='Ta'>{TaVal}</td><td id='Ge'>{GeVal}</td> </tr> <tr> <td id='Aq'>{AqVal}</td><td className="col">Rasi Chart</td><td></td><td id='Ca'>{CnVal}</td> </tr> <tr> <td id='Ca'>{CpVal}</td><td></td><td className="col1"></td><td id='Le'>{LeVal}</td> </tr> <tr> <td id='Sa'>{SgVal}</td><td id='Sc'>{ScVal}</td><td id='Li'>{LiVal}</td><td id='Vi'>{ViVal}</td> </tr> </table> ########### CSS########### .col { border-right: hidden; border-bottom: hidden; } .col1 { border-left: hidden; border-top: hidden; } .tableA { border-collapse: collapse; /* border: 2px solid #ff4d00;*/ background-color:rgb(244, 244, 216); inline-size: 2px solid; height: 400px; width: 600px; margin-left: 10%; &td, th, tr{ border: 1px solid #402cef; text-align: center; table-layout: left; font-size: 15px; }} |
coothead |
![]()
Post
#12
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 169 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 ![]() |
Hi there sujatha,
coothead |
CharlesEF |
![]()
Post
#13
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,965 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
Hi there sujatha, check out the attachment below to see a fully responsive example. ![]() ![]() coothead Looks good to me but what do I know? Nice job. This post has been edited by CharlesEF: Nov 21 2023, 08:09 PM |
coothead |
![]()
Post
#14
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 169 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 ![]() |
coothead |
pandy |
![]()
Post
#15
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,637 Joined: 9-August 06 Member No.: 6 ![]() |
Looks good, but I thought the purpose was to have some kind of structure. The text can't be copied and the chart can't be printed either. That could be problematic, I think,
|
pandy |
![]()
Post
#16
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,637 Joined: 9-August 06 Member No.: 6 ![]() |
Thank you so much for all your support putting together. I am sending code for south indian chart as you are interested, i may change height width later with little updates... I meant I wanted to actually see the content. But I googled and know now it's just text, and horizontal at that. At least the charts I found looked like that. |
CharlesEF |
![]()
Post
#17
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,965 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 ![]() |
...but what do I know? Well, hopefully, you now know how useful SVG can be for this type of task. ![]() Also. you might have noticed that our resident coding guru - Jason Knight had actually suggested it's possible suitability earlier in this thread. ![]() coothead To be honest, in all my years of programming I've never had the need to use an SVG. So, I know nothing about it. |
coothead |
![]()
Post
#18
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 169 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 ![]() |
coothead |
coothead |
![]()
Post
#19
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 169 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 ![]() |
|
coothead |
![]()
Post
#20
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 169 Joined: 12-January 23 From: chertsey, a small town 25 miles south west of london, england Member No.: 28,743 ![]() |
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 10th December 2023 - 12:34 PM |