question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Approaches to HTML table generation

See original GitHub issue

This ticket is to gather requirements and solicit ideas on drawing HTML tables from Vega, possibly with a new html-table oriented renderer, possibly as a Vega plugin.

Goal

Allow users to generate HTML tables from the data after being processed by the Vega transformations, including interactivity.

Approaches

One possible approach is to have a new cell mark. Having this mark automatically creates an HTML table. The table could be positioned either underneath the <canvas> or <svg> element, or on top of it (TBD - multiple layers?). Multiple cell marks could target either one or multiple output tables. Using groups it may be possible to draw tables inside other tables.

Sizing

Table should occupy the entire space of the container (autosize=fit), or be the same size as the graph (autosize=none and pad).

Parameters

  • name – ID of the mark
  • table – ID of the table - multiple marks could have the same table ID
  • column and row (instead of x,y) - integer cell position within a table. The table will dynamically grow whenever the column or row values exceed currently allocated space.
  • rowspan and colspan – same as HTML table’s params.
  • From the text mark: align, baseline, dir, ellipsis, font, fontSize, fontWeight, fontStyle, limit, text
  • border – TBD

Open questions

  • Table-level parameters - should there be a top-level and group-level tables section, similar to data? Table nesting based on groups?
  • Multiple tables vs a single table - should there always be a single table (similar to how width/height always refer to the main drawing area), or should it be possible to draw multiple ones, and allow table positioning?
  • specifying headers/footers - could be done by a separate cell mark targeting the same table and using bold font

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:21
  • Comments:25 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
farhanchaudhrycommented, Nov 13, 2019

This would be a great feature. waiting for it.

3reactions
iliatimofeevcommented, May 17, 2018

@domoritz do you mean something like this? vega_html

So vega-embed will have not only canvas but tables section?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Tables: When to Use Them and How to Make & Edit ...
Learn how to make and edit a table in HTML so you can present data that's too detailed or complicated for text on...
Read more >
HTML table basics - Learn web development | MDN
This article gets you started with HTML tables, covering the very basics such as rows, cells, headings, making cells span multiple columns ...
Read more >
HTML Tables
A table in HTML consists of table cells inside rows and columns. Example. A simple HTML table: <table> <tr>
Read more >
Back To The Basics: How To Generate a Table With ...
Create a new file named build-table.js in the same folder as build-table.html and start the file with the following array: ... Our first...
Read more >
HTML Tables – Table Tutorial with Example Code
Now, depending on the type of data, you can select between different representation methods using HTML elements. In most cases, tables are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found