Re: Tables and Charts

On  6 Jul 95 at 23:00, Alexei Kosut wrote:

> We currently have the TABLE tag and its enclosed elements, which
> allow us to create a table of data, something like this (for
> example):

[snip]

> We take the basic TABLE spec, as is, and add  an attribute to the 
> main TABLE tag, the CHART element. If present, it would define a 
> type of chart, and the browser would take the following table data 
> and attempt to convert it into a graph. For example, to create the 
> above, I might use <TABLE BORDER CHART=bar>. We could define a 
> couple basics, say bar,line, pie and chart. Everything else 
> (including 2D vs. 3D) could bedone via style sheets. Well, actually, 
> charts could be done viastyle sheets entirely too, but I think that 
> HTML needs to stand onits own without them, and this would be a good 
> feature to add directly to the spec.

[snip]

Here's my two-penneth contribution towards this one :-)

In the HTML document

<TABLE CLASS="ChartFormat1">
 <CAPTION>
  Descriptive text about what this data represents
 </CAPTION>
 <TR CLASS="DataHead">
   <TH>Object Name</TD>
   <TH>Width (meters)</TD>
   <TH>Height (meters)</TD>
   <TH>Breadth (meters)</TD>
 </TR>
 <TR CLASS="Set1">
   <TH>Blue Cube</TH>
   <TD>10</TD>
   <TD>7</TD>
   <TD>9</TD>
 </TR>
 <TR CLASS="Set2">
   <TH>Black Cube</TH>
   <TD>5</TD>
   <TD>9</TD>
   <TD>16</TD>
 </TR>
 <TR CLASS="Set3">
   <TH>Mauve Cube</TH>
   <TD>9</TD>
   <TD>18</TD>
   <TD>23</TD>
 </TR>
</TABLE>


Then, in your style sheet ...

Table.ChartFormat1 : renderstyle.type = 2dbar
Table.ChartFormat1 : data.header = DataHead
Table.ChartFormat1 : data.sets = Set1, Set2, Set3

The rest can be inferred by the location of the TH header elements 
within each Row.

This is slightly basic; it could probably be extended to include
 styles for functions such as the visual "angle" or tilt of a 3d 
chart, exploding portions of a pie chart, i.e

Table.ChartFormat : renderstyle.type = 3dpie
Table.ChartFormat : renderstyle.angle = 30
Table.ChartFormat : renderstyle.thickness = 10
Table.ChartFormat : data.header = dataHeaderClass
Table.ChartFormat : data.sets = Set1
TD.ExplodeThisEntry : datasetstyle.type = exploded
TD.ExplodeThisEntry : datasetstyle.size = 10

Why do I think this should be entirely left up to the Style Sheet 
mechanisms, with no attributes added to the table element? What the 
table element represents, in this case, is a collection of data. At 
present, this data is rendered (or presented) in the form of a table, 
constructed using Rows, and Cells within those Rows, using the <td>, 
table data, element or <th>, table header, element. The precise 
rendering of that data is really not a content issue, which the HTML 
markup describes, but a presentation issue, which should be managed 
not in the markup, but in style sheets.

> Comments?

Anyone else have any?

Regards,



Chris

--
Chris Tilbury, Estates Office, University of Warwick, UK, CV4 7AL
Tel: +44 1203 523523 x2665                   Fax: +44 1203 524444
MIME mail welcomed      mailto:Chris.Tilbury@estate.warwick.ac.uk

Received on Friday, 7 July 1995 04:40:42 UTC