I recently ran in to a problem with the presentation of data related to a graph. Each series of data has values that define the 'curve'. There can be a lot of these values, and I decided that there was not enough space in the 'legend' to include all the details for the curve. I decided to have a 'details' area, and users could select a curve/series, and the details would be displayed in an area under the graph. This is because there would otherwise be too much data to show in the legend.
The details consist of 4 items, a colour "patch", a series name, the series accuracy, and the data points in the series. A table is what I chose to display these values in.
I want the details area to occupy the base of the screen underneath the graph, and to grow/shrink as the chart grows/shrinks. The last column in the table, the data points, are the largest part of the data, and would 'flood' the area. I want to make it possible to select all the data, but not necessarily make it all visible, a scrolling system would be fine.
In essence, I have this:
What I want reviewed in this question, though, is just the dynamic nature of the 4-column, 1-row table at the bottom, this:
Although the table scales well when the screen-size changes, I believe there must be a better way to implement it.
Here is my extraction of the relevant code, with some test data:
.container {
width: 80%;
margin: 0 auto;
border: 2px solid black;
}
#dummy {
width: 100%;
background-color: lightgreen;
}
.details {
width: 100%;
border-collapse: collapse;
}
.details td {
border: 1px black solid;
padding: 3px;
}
.details td:last-child {
width: 100%;
background-color: lightblue;
padding-right: 7px;
}
.details td:last-child input {
width: 100%;
}
<div id="dummy" >text to show where a graph would be</div>
<hr>
Manual visualization
<table class="details">
<tr>
<td>
<label for="seriesName">Series</label>
<input id="seriesName" type="text" size="15" readonly="readonly" value="Manual Sizing" >
</td>
<td>
<label for="seriesRSquare">RSquared</label>
<input id="seriesRSquare" type="text" size="10" readonly="readonly" value="0.98765432" >
</td>
<td>
<label for="seriesDetail">Description</label>
<input id="seriesDetail" type="text" readonly="readonly"
value="[1,23],[2,20],[4,20],[8,21],[16,23],[32,22],[64,26],[128,28],[256,41],[512,55],[1024,81],[2048,136],[4096,244],[8192,474],[16384,959],[32768,1987],[65536,3613],[131072,6957],[262144,14250],[524288,28215],[1048576,55882],[2097152,116210],[3145728,175000],[4194304,229976],[5242880,291501],[6291456,347649],[7340032,399349],[8388608,485512]">
</td>
</tr>
</table>
My specific concerns for this are:
- The 'input' in the last column has
width: 100%
because otherwise it is too small. The input area unfortunately extends past thetd
border though, so I have had to add a manual padding of 7 px to the right side of the td to make it work. This seems counter-intuitive - the use of read-only input members allows the data to be shown, and scrolled-through, if needed, but is it the 'right way'?
I am open to any suggestions on how to best present this data.