ui: log table styling

This commit is contained in:
Jeremy Wall 2024-03-04 21:05:37 -05:00
parent 474bfe4f1d
commit a7a6c99099

View File

@ -33,7 +33,7 @@
* @typedef HeaderOrCell * @typedef HeaderOrCell
* @type {object} * @type {object}
* @property {array} values * @property {array} values
* @property {string=} fill * @property {{color: string}=} fill
* @property {{width: number, color: string}=} line * @property {{width: number, color: string}=} line
* @property {{family: string, size: number, color: string }=} font * @property {{family: string, size: number, color: string }=} font
*/ */
@ -42,7 +42,7 @@
* @typedef TableTrace * @typedef TableTrace
* @type {object} * @type {object}
* @property {string=} name * @property {string=} name
* @property type {string} * @property {string} type
* @property {string=} mode * @property {string=} mode
* @property {HeaderOrCell} headers * @property {HeaderOrCell} headers
* @property {HeaderOrCell} cells - An Array of columns for the table. * @property {HeaderOrCell} cells - An Array of columns for the table.
@ -483,13 +483,16 @@ export class GraphPlot extends HTMLElement {
// TODO(zaphar): subplot.Stream // log lines!!! // TODO(zaphar): subplot.Stream // log lines!!!
const trace = /** @type TableTrace */({ const trace = /** @type TableTrace */({
type: "table", type: "table",
// TODO(zaphar): Column width?
headers: { headers: {
align: "left", align: "left",
values: ["Timestamp", "Log"] values: ["Timestamp", "Log"],
fill: { color: layout.xaxis.gridColor }
}, },
cells: { cells: {
align: "left", align: "left",
values: [] values: [],
fill: { color: layout.paper_bgcolor }
}, },
}); });
const dateColumn = []; const dateColumn = [];