Today I realized as I implemented dygraphs on the React app that we need to go beyond graphs. Not all of the data we query is going to look best in a graph. Sometimes it might be better in a table. Or, the query produces a yes or no answer or a key value pair answer. If the answer is as simple as "The number of users fitting your criteria is 42." then we don't need a graph.
I'm refactoring out the functionality in the React app that displays query results as graphs into individual components that will render query results differently. So far I'm making a Graph component (which is pretty self explanatory), a Table component (which breaks down into a
\<table\> with a heading, some rows, and maybe later on some neat buttons they can click for sorting, hiding, or aggregating rows), and a List component. The list component is for the simplest of queries which just return key value pairs. A list item would be a key and a value. For example:
- Active users: 42
- Inactive users: 84