This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17943 - A way to create a graph would be nice. It might be implemented as a "graph" attribute on the table element or a <graph> element.
Summary: A way to create a graph would be nice. It might be implemented as a "graph" a...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 07:21 UTC by contributor
Modified: 2012-10-10 02:36 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-07-18 07:21:08 UTC
This was was cloned from bug 16939 as part of operation convergence.
Originally filed: 2012-05-04 23:28:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2012-05-04 23:28:02 +0000 
--------------------------------------------------------------------------------
Specification: http://www.w3.org/TR/html5/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
A way to create a graph would be nice. It might be implemented as a "graph"
attribute on the table element or a <graph> element.

Posted from: 98.125.138.7
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3
================================================================================
Comment 1 Ian 'Hixie' Hickson 2012-09-28 03:36:56 UTC
Can you elaborate?
Comment 2 Pierre Dubois 2012-09-29 02:47:07 UTC
(In reply to comment #1)
> Can you elaborate?

This wasn't a bug that I reported, but I have interest on generating a graphic from a data table.

I don't think is a great idea to have a new "graph" element. That might cause some issue in regards of the content accessibility and might be other thing.

I see more reliable of having a new attribute for the table element, like the proposed "graph" attribute.


Supporting graph provide a few challenges like
* Having a powerful table parser able to handle complex tabular structure (See my proposal here http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-September/037475.html)
* Determining how the web editor would be able to customize the chart/graph


I am not sure if is a good idea to have a way to create a graph. 
For me that rely more on:
* having a good table parser defined in the specification 
* having a method to specify the customization of the graph (in javascript or using custom data attribute)
* having canvas or SVG

I already developed a plugin for generating chart and graph from an html table in javascript. For the customization it use a mechanism that use CSS class set on strategic tabular elements. It use the SVG to draw the graphic. Also once the graphic is generated, some WAI-ARIA attribute is used to create a better relationships. You can find more information and working example regarding that project here: https://github.com/wet-boew/wet-boew/wiki/Charts-and-graphs


Do you think there is a needs to provide a way to create a graph when some open source javascript projects already do it ?


:-)

Pierre Dubois
Comment 3 Ian 'Hixie' Hickson 2012-10-10 02:36:41 UTC
If this is requesting a way to turn tabular data into a graph, then I don't think we'll be adding this to HTML any time soon, if ever. As Pierre says in comment 2, there's already some scripts that do this. It's a hugely complicated problem; if we're going to solve it, we need to do a lot of research, get all the browser vendors on board, get some graphing experts to explain what all the needs are, figure out how to integrate it with animation and transition features, etc. It's probably better to not go down that road for the foreseeable future.