473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Descendant chart rendered in CSS

Genealogists often display their data as an ascending or descending
chart, and for presentation on the web usually prepare a PDF file or
HTML table. I was interested in a pure CSS solution without using a
table.

So I did a prototype:

www.hartford-hwp.com/genealogy/test.html

Does anyone have suggestions either about how it could be improved or
other approaches that would be preferable to CSS without a table?

--

Haines Brown, KB1GRM

Mar 11 '07 #1
14 2456
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
Genealogists often display their data as an ascending or descending
chart, and for presentation on the web usually prepare a PDF file or
HTML table. I was interested in a pure CSS solution without using a
table.

So I did a prototype:

www.hartford-hwp.com/genealogy/test.html

Does anyone have suggestions either about how it could be improved or
other approaches that would be preferable to CSS without a table?
There are some end tags for span missing.

Any special reason to use XHTML 1.0 Strict rather than 4.01
Strict?

--
dorayme
Mar 11 '07 #2
dorayme <do************@optusnet.com.auwrites:
There are some end tags for span missing.
Ouch. Fixed, and this time validated. Thanks.
Any special reason to use XHTML 1.0 Strict rather than 4.01
Strict?
An old debate. I suppose the reason is that I've got some 15,000
documents on line, and there's no way in the world I'll ever be able
to go back and update them.

Not many people use CSS without tables for report charts, and I'm not
sure why. From what I've seen tables does not really make things any
simpler.

--

Haines Brown, KB1GRM

Mar 11 '07 #3
In article <87************@teufel.hartford-hwp.com>,
Haines Brown <br****@teufel.hartford-hwp.comwrote:
dorayme <do************@optusnet.com.auwrites:
There are some end tags for span missing.

Ouch. Fixed, and this time validated. Thanks.
Any special reason to use XHTML 1.0 Strict rather than 4.01
Strict?

An old debate. I suppose the reason is that I've got some 15,000
documents on line, and there's no way in the world I'll ever be able
to go back and update them.

Not many people use CSS without tables for report charts, and I'm not
sure why. From what I've seen tables does not really make things any
simpler.
I was sort of impressed but have not studied your code properly.
I will, out of interest if not more, when I have time as I am
soon to make a website for a "historical society" which will be
using such charts from time to time among other things).

A data tree is a "tabular" informational structure and so, a
table would seem, prima facie, to be the semantically appropriate
construct. I hope you did what you did because you were exploring
a way to make a tree in a simpler way and not just to avoid
tables <g>

As for "updating" to an earlier doctype, pity the doctypes were
not in an "include" so you could change just one file.

--
dorayme
Mar 12 '07 #4
dorayme <do************@optusnet.com.auwrites:
A data tree is a "tabular" informational structure and so, a table
would seem, prima facie, to be the semantically appropriate
construct. I hope you did what you did because you were exploring a
way to make a tree in a simpler way and not just to avoid tables <g>
I've not yet made up my mind on the first issue. It is an interesting
question, but not all that important in my mind. The thing about a
genealogical chart is that it not only contains some data about
individuals, but more importantly it displays their relationships.

A table also displays relationships, but of a different sort, and
generally organizes data in terms of general categories. If the rows
in a table represent months, the data in that row are instances within
that time frame. In contrast, the relationships in a genealogical
chart are unique, such as person B being the child of person
A. Furthermore, I suspect it is a fact that genealogists actually do
use tables for _layout_ rather than simply expose the relationships of
data, and that's a no-no.

However, if a table seems better, I wouldn't object to it. What are
these criteria of "betterness"? One would be a pleasing visual effect
over which one has extensive control. Another might be how easily data
can be added or subtracted from the whole by means of a script. If
someone prefers not to develop or purchase software for handling data
in this way, then markup should be relatively simple and transparent
so that adjustments can be made with minimal time and effort.

My aim was to explore pure CSS vs. CSS with table in terms of such
criteria by actually trying to develop a descendant chart without a
table. I had no idea it was not a common practice. One thing, though:
pure CSS seems to me to be more fun - more of an interesting challenge.
I was sort of impressed but have not studied your code properly.
"Impressed" in what sense? That it could be done at all? ;-) I only
found two examples of people exploring this path, which rather
surprised me.
As for "updating" to an earlier doctype, pity the doctypes were not
in an "include" so you could change just one file.
The problem here is that with the change of doctype, standards also
change. What would be valid markup years ago certainly wouldn't pass
muster now. For example, it was once conventional to make the element
<HRupper case, but today it would have to be <hr />. XML might not
be the juggurnaut it was once thought, but it seems inevitable.

--

Haines Brown, KB1GRM
Mar 12 '07 #5
On 11 Mar, 22:37, dorayme <doraymeRidT...@optusnet.com.auwrote:
Any special reason to use XHTML 1.0 Strict rather than 4.01
Strict?
The only genealogy I've ever fooled about with on the web used
embedded SVG too. XHTML (as XML) was useful here.

I really like the OP's original example.

I'm not so sure about the <ulinside the boxes though. This is a set
of properties, not a list (although that's not a clear distinction in
HTML). Each property certainly needs a class attahced to it. I'd also
favour losing the <ul/ <limarkup in favour of a simple <divfor
each.

Mar 12 '07 #6
"Andy Dingley" <di*****@codesmiths.comwrites:
Each property certainly needs a class attahced to it. I'd also
favour losing the <ul/ <limarkup in favour of a simple <divfor
each.
Andy, would you mind expanding on your comment? I don't see why
"properties" (in this case, a person's dates, marriage status, place
of residence) are best put into a div rather than, say, merely a set
of lines ending in <br />. While using a div would be one way to put
each property line into its own class, I'm not sure that is what you
are recommending, and if so why.

--

Haines Brown, KB1GRM

Mar 12 '07 #7
dorayme wrote:
>
A data tree is a "tabular" informational structure and so, a
table would seem, prima facie, to be the semantically appropriate
construct.
I disagree. A data tree is more a multi-level list than a table.

--
Berg
Mar 12 '07 #8
On 12 Mar, 00:04, dorayme <doraymeRidT...@optusnet.com.auwrote:
A data tree is a "tabular" informational structure
It isn't. "Tabular" in this local sense means two-dimensional. A tree
is of fractal dimension between 1 and 2 (possibly greater than 2 for
some representations of genealogy).
Mar 12 '07 #9
On 12 Mar, 13:14, Haines Brown <bro...@teufel.hartford-hwp.comwrote:
"Andy Dingley" <ding...@codesmiths.comwrites:
Each property certainly needs a class attahced to it. I'd also
favour losing the <ul/ <limarkup in favour of a simple <divfor
each.

Andy, would you mind expanding on your comment?
Your nodes are coded something like this:

<div class="node">
<div class="line-lower"></div>

<div class="person">
John Gilbert Brown
<ul>
<li>(1881 to 1882)</li>
<li>Not married</li>
<li>Camden, NJ</li>
</ul>
</div>
</div>
As a first refactoring, I'd change to this:

<div class="node person" >

<div class="line-lower"></div>

<div class="full-name" >John Gilbert Brown</div>
<div class="dates" >(1881 to 1882)</div>
<div class="marital-status" >Not married</div>
<div class="location" >Camden, NJ</div>
</div>

Each nested <divrepresents a "property" of a node that is of person-
type.

With trivial CSS, I can make it look identical to the default list
presentation. With more work, I can make it look a lot more
sophisticated in ways that I couldn't for the list markup.

Note that I've also simplified the content model here, in that "name"
is now a property like "dates", rather than merely being the outermost
text part of the node's mixed content model (such a structure is a
pain to process).

I'm also approaching this from an RDF and Semantic Web background. I'd
personally put _much_ more annotation onto this structure, such that
it was also a useful machine-processable document, not just a good
HTML document for human-readbale presentation. That's also a lever
towards using XML.

I might even move the "connector's" class onto the node <div>, rather
than as a nested <div>. This might then be harder to render though, so
maybe not.

In fact I'd sub-divide the property structures even further. I'd use
vCard to structure the name (especially making the surname accessible
to simple CSS). I'd have all the dates, and their meanings, machine-
visible (births, deaths, marriages). I'd probably use a list structure
for partnerings, even for single marriages in a lifetime (this is
easier to process with XML tools, even though RDF/XML would allow me
to have a single-valued ot list-valued resource for the "partners"
property).

I would not try to "minimise" the markup in any way. Verbose and
simple beats complicated and terse, IMHO.

I might even see if there was an existing RDF schema such as FOAF
(maybe even a genealogy schema) that I could incorporate.

I don't see why
"properties" (in this case, a person's dates, marriage status, place
of residence) are best put into a div rather than, say, merely a set
of lines ending in <br />.
A list of <liis fine, so long as each distinct property has a
distinct class (how else would you highlight the dates alone by CSS?)

The use of <brwould be a _bad_ idea. <bris an inline element, not
a structural one. Its meaning is no more than a semi-presentational
linebreak, not any real semantic scope. It's harder to manipulate
mixed-content model XML ("data, separator, data" structures) than it
is to work with containment-structured XML, such as "<a>...</a><b>...</
b>".
Mar 12 '07 #10
On Mar 11, 2:58 pm, Haines Brown <bro...@teufel.hartford-hwp.com>
wrote:
Genealogists often display their data as an ascending or descending
chart, and for presentation on the web usually prepare a PDF file or
HTML table. I was interested in a pure CSS solution without using a
table.

So I did a prototype:

www.hartford-hwp.com/genealogy/test.html

Does anyone have suggestions either about how it could be improved or
other approaches that would be preferable to CSS without a table?
I once had a try at rendering family descendants using nested list
elements to show relationships:

<http://theodorakis.net/elvishgenealogy.html>

It was an experimental page, and I sort of lost interest in the
experiment, but there it is if you want to use any ideas from it.

Nick

--
Nick Theodorakis
ni**************@hotmail.com
contact form:
http://theodorakis.net/contact.html

Mar 12 '07 #11
Andy,

Thanks for the raft of stimulating suggestions.

"Andy Dingley" <di*****@codesmiths.comwrites:
Each nested <divrepresents a "property" of a node that is of
person- type.

With trivial CSS, I can make it look identical to the default list
presentation. With more work, I can make it look a lot more
sophisticated in ways that I couldn't for the list markup.
That's easy to do, and the idea of imposing the logical structure is
intellectually appealing. But can you give me an example of how the
appearance might be more sophisticated?
I'm also approaching this from an RDF and Semantic Web
background. I'd personally put _much_ more annotation onto this
structure, such that it was also a useful machine-processable
document, not just a good HTML document for human-readbale
presentation. That's also a lever towards using XML.
Again, very interesting. It goes beyond the purpose of my initial
little prototype chart, but I think I'll pursue it a bit more in that
direction.
I might even move the "connector's" class onto the node <div>,
rather than as a nested <div>. This might then be harder to render
though, so maybe not.
I nested the connector divs mainly to keep alignment problems to a
minimum. I suppose this is what you mean:

<div class="generation">
<div class="horiz-connector">
<div class="node">
<div class="personal_name">...
<div class= ...
</div>
<div class="vert-connector">
</div>

However, it is still not logical in that the "horiz-connector" is
cross-generational. The following strikes me as logical:

<div class="generation">
...
</div<!-- close first generation -->
<div class="horiz-line"></div>
<div class="generation">
<div class="vert-line">
<div class="node">
...
</div>
<div class="node">
</div>
</div<!-- close vert-line -->
</div<!-- close second generation -->

Sorry to go on like this, but you got me started ;-) The logic here is
that people are a specification of sibling relationships, while a
horizontal line is a generational relationship.
In fact I'd sub-divide the property structures even further. I'd use
vCard to structure the name (especially making the surname accessible
to simple CSS).
That would never have occurred to me, but I'll explore the idea.
I might even see if there was an existing RDF schema such as FOAF
(maybe even a genealogy schema) that I could incorporate.
Here is an example of the application of OWL (Web Ontology Language)
to genealogy:

http://www.nucleartoiletpaper.com/genesis/dm-intro.htm

There is much on line for RDF/OWL in genealogy.
A list of <liis fine, so long as each distinct property has a
distinct class (how else would you highlight the dates alone by CSS?)

The use of <brwould be a _bad_ idea. <bris an inline element, not
a structural one. Its meaning is no more than a semi-presentational
linebreak, not any real semantic scope. It's harder to manipulate
mixed-content model XML ("data, separator, data" structures) than it
is to work with containment-structured XML, such as "<a>...</a><b>...</
b>".
Yes. Thanks for sharing your wisdom. Some ideas may be a bit ambitious
for me (lack of time), but I suspect I'll try to implement some of the
logical structure stuff.

--

Haines Brown, KB1GRM

Mar 12 '07 #12
Nick, thanks to the pointer to an interesting approach (names in a UL
list with LI markers being a graphic of a right angle). It makes for a
nice clean markup, but seems to depend on presumptions that are
dissimilar to the usual generalogy chart.

--

Haines Brown, KB1GRM

Mar 12 '07 #13
In article <55*************@mid.individual.net>,
Bergamot <be******@visi.comwrote:
dorayme wrote:

A data tree is a "tabular" informational structure and so, a
table would seem, prima facie, to be the semantically appropriate
construct.

I disagree. A data tree is more a multi-level list than a table.
I did say "prima facie" - I was beginning to wonder myself
actually!

OP said, poignantly enough, at one stage, "the relationships in a
genealogical chart are unique, such as person B being the child
of person A." and "Furthermore, I suspect it is a fact that
genealogists actually do use tables for _layout_ rather than
simply expose the relationships of data, and that's a no-no."

I suspect he is right about the latter. As for the former, the
matter is not quite as simple. At least it does not preclude the
idea of tabular data applying to these descendant relationships.
Remember, while the relationship of a particular parent to a
child is unique enough in one sense, it is still the same kind of
relationship that other parents have to their children. In a very
abstract sense, I sense that this is tabular material.

About multilevel lists and such charts. Fine, but they are very
ordered too. Order is at the heart of them. And you might know I
think that I think ordered lists are at bottom tabular in nature.

What you and OP and AD are saying is likely a better practical
way to think about things. It is perhaps awkward practically to
come up with a table or tables within tables (that is not just
for layout) to represent the order required. But I will think
about it!

--
dorayme
Mar 12 '07 #14
On 12 Mar, 20:11, Haines Brown <bro...@teufel.hartford-hwp.comwrote:
That's easy to do, and the idea of imposing the logical structure is
intellectually appealing. But can you give me an example of how the
appearance might be more sophisticated?
The obvious ones would be as simple as applying CSS and bold fonts to
a property like the birth dates rather than the deaths, or (if you use
vCard too) to the surname rather than the whole name.
I might even move the "connector's" class onto the node <div>,
rather than as a nested <div>. This might then be harder to render
though, so maybe not.

I nested the connector divs mainly to keep alignment problems to a
minimum. I suppose this is what you mean:

<div class="generation">
<div class="horiz-connector">
<div class="node">
<div class="personal_name">...
<div class= ...
</div>
<div class="vert-connector">
</div>
Not really. I was looking at the structure inside "node", such as the
person's information and the connector. I haven't looked in detail at
just how you make the connectors appear, or at how you mark-up nodes
"within" generations. After all, "generation" doesn't really exist and
it can be problematic to assume it does, if distant cousins start
marrying between generations (I live near Wiltshire).

My thought was whether you really needed a <divfor the "connector"
insode the "node", or if you could manage by simply adding the class
to the node itself's <div>.

http://www.nucleartoiletpaper.com/genesis/dm-intro.htm

There is much on line for RDF/OWL in genealogy.
You might enjoy fiddling with Protege and Jambalaya then.

Given the complexity of this application, I'd want to be using RDF/OWL
to represent it, not paltry XML or even HTML

Mar 13 '07 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Shade | last post by:
Hi all. I am having a bit of a problem with my Perl script and the creation of a chart. I can create the chart and create a new SeriesCollection. I then specify the XValues and the Values parameter...
8
by: Prabhakar | last post by:
Friends, I have been migrating ASP applications from IIS4.0/NT4.0 to IIS5.0/W2K. All the applications working perfectly except one. This particular application will make use of asp chart object....
7
by: Philip Herlihy | last post by:
If I'm reading my reference books correctly, I should be able to pick out cells in a table by combining a <col> selector with a class selector, like this: col#thisid td.thisclass {color: red; }...
1
by: Jim | last post by:
I have this chart on a form. I'm trying to get this chart to render only if the user chooses to do so. This because of that the chart is quite complex and takes some time to render. I know that I...
22
by: PeteCresswell | last post by:
I've been to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp, but still don't have a clue. For example, I've got a chart object namde...
2
by: joeau | last post by:
I would like to chart control (which can be rendered according to the data returned from the database) to my web form. How can I do it? Thanks.
1
by: Scott H. | last post by:
Hello: I am trying to use Crystal Reports from VS.NET 2003 to produce a simple line chart, where the x axis represents the number of measurements taken and the y axis represents the range of...
1
by: Saintor | last post by:
This is for A97 in runtime or MDE mode. My intent was to define a temporary query using the recordsetclone property / filter / orderby. The controlsource of my chart would be based on a grouped...
1
by: cubekid | last post by:
I am using OWC 11 in my new web application for displaying charts. Is it possible in OWC 11 to combine and display a column and a line graph (Looking like they overlap each other)? I tried it using...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.