Skip to content

Commit

Permalink
resize tables as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
shapiromatron committed Feb 8, 2024
1 parent f7c9b0f commit f885035
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 7 additions & 4 deletions frontend/src/components/IndividualModel/GoodnessFit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {ff} from "@/utils/formatters";

/* eslint-disable */
const hdr_c_normal = [
"Dose", "N", "Sample Mean", "Model fitted Mean",
"Dose", "N", "Sample Mean", "Model Fitted Mean",
"Sample SD", "Model MLE", "Scaled Residual",
],
hdr_c_lognormal = [
"Dose", "N", "Sample Mean", "Approximate Sample Median", "Estimated Median",
"Sample SD", "Approximate Sample GSD", "Model fitted GSD", "Scaled Residual",
"Sample SD", "Approximate Sample GSD", "Model Fitted GSD", "Scaled Residual",
],
hdr_d = [ "Dose", "N", "Observed", "Expected", "Estimated Probability", "Scaled Residual"];
/* eslint-enable */
Expand All @@ -22,8 +22,11 @@ const hdr_c_normal = [
class GoodnessFit extends Component {
getHeaders(dtype, settings) {
if (dtype == Dtype.CONTINUOUS || dtype == Dtype.CONTINUOUS_INDIVIDUAL) {
const headers = isLognormal(settings.disttype) ? hdr_c_lognormal : hdr_c_normal;
return [headers, [10, 10, 10, 12, 12, 12, 10, 12, 12]];
const headers = isLognormal(settings.disttype) ? hdr_c_lognormal : hdr_c_normal,
colWidths = isLognormal(settings.disttype)
? [10, 10, 10, 12, 12, 12, 10, 12, 12]
: [1, 1, 1, 1, 1, 1, 1];
return [headers, colWidths];
}
if (dtype == Dtype.DICHOTOMOUS) {
return [hdr_d, [17, 16, 16, 17, 17, 17]];
Expand Down
10 changes: 4 additions & 6 deletions frontend/src/components/IndividualModel/ModelParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ class ModelParameters extends Component {
return (
<table className="table table-sm table-bordered text-right col-l-1">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="34%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead>
<tr className="bg-custom">
<th colSpan="5">Model Parameters</th>
<th colSpan="3">Model Parameters</th>
</tr>
<tr>
<th>Variable</th>
Expand Down

0 comments on commit f885035

Please sign in to comment.