Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

Support for CSS-based plotting selection (bars, lines, points, ...)


Project:graphTable: graph data from HTML table using flot
Version:0.1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have not found an easy way to customise plotting style to change lines to bars or points in graphTable.

For me, the easiest way for choosing plotting style, would be by adding it as a CSS class. For instance <th class="bars">Dataset A Label</gt> would switch to bars. Combination of bars + lines could be written as <th class="bars lines">Dataset A Label</th> etc.

My current workaround is to locally modify graphTable with following changes:

For both columns and rows, capture label as DOM element:

var labelElem = $labelRow.find('th,td').eq(j);
var label = labelElem.text();

Extract class values from label element and pass them to tableData:

var showLines = $(labelElem).hasClass('lines');
var showPoints = $(labelElem).hasClass('points');
var showBars = $(labelElem).hasClass('bars');
if ( !showLines && !showPoints && !showBars ) showLines=true;
tableData[tableData.length] = { label: label, data: colData, points: {show: showPoints}, lines: {show: showLines}, bars: {show: showBars} };

The given approach is not optimal since it requires you to duplicate the above code twice (once for columns and secondly for rows). Moreover, it does not scale to other properties than lines, points and bars.

I kindly request this feature to future graphTable releases.