diff --git a/back-end/pyworkflow/pyworkflow/node_factory.py b/back-end/pyworkflow/pyworkflow/node_factory.py index ecf1a8a..56ca669 100644 --- a/back-end/pyworkflow/pyworkflow/node_factory.py +++ b/back-end/pyworkflow/pyworkflow/node_factory.py @@ -34,6 +34,8 @@ def flow_node(node_key, node_info): def io_node(node_key, node_info): if node_key == 'ReadCsvNode': return ReadCsvNode(node_info) + elif node_key == 'TableCreatorNode': + return TableCreatorNode(node_info) elif node_key == 'WriteCsvNode': return WriteCsvNode(node_info) else: diff --git a/back-end/pyworkflow/pyworkflow/nodes/io/__init__.py b/back-end/pyworkflow/pyworkflow/nodes/io/__init__.py index bc516ac..a90d4fd 100644 --- a/back-end/pyworkflow/pyworkflow/nodes/io/__init__.py +++ b/back-end/pyworkflow/pyworkflow/nodes/io/__init__.py @@ -1,2 +1,3 @@ from .read_csv import ReadCsvNode from .write_csv import WriteCsvNode +from .table_creator import TableCreatorNode diff --git a/back-end/pyworkflow/pyworkflow/nodes/custom_nodes/table_creator.py b/back-end/pyworkflow/pyworkflow/nodes/io/table_creator.py similarity index 100% rename from back-end/pyworkflow/pyworkflow/nodes/custom_nodes/table_creator.py rename to back-end/pyworkflow/pyworkflow/nodes/io/table_creator.py diff --git a/front-end/src/components/CustomNode/GraphView.js b/front-end/src/components/CustomNode/GraphView.js index e872a86..91b573d 100644 --- a/front-end/src/components/CustomNode/GraphView.js +++ b/front-end/src/components/CustomNode/GraphView.js @@ -23,7 +23,7 @@ export default class GraphView extends React.Component { }; columnWidths = (index) => { - return 10 * this.state.widths[index]; + return 12 * this.state.widths[index]; }; rowHeights = () => new Array(765) @@ -56,11 +56,15 @@ export default class GraphView extends React.Component { for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) { const row = data[column][rowIndex.toString()]; - if (row != null && row.length > widths[index]) { - widths[index] = row.length; + if (row != null) { + const rowContents = row.toString(); + + if (rowContents.length > widths[index]) { + widths[index] = rowContents.length; + } } - maxWidth += widths[index] * 10; + maxWidth += widths[index] * 12; } }