Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
</app-common-section-card-action-buttons>

<!-- content -->
<app-experiment-metrics-data content *ngIf="isSectionCardExpanded"></app-experiment-metrics-data>
<div content class="data-container" *ngIf="isSectionCardExpanded">
<app-experiment-query-result [experiment]="experiment"></app-experiment-query-result>
</div>
</app-common-section-card>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.data-container {
padding: 32px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '../../../../../../../shared-standalone-component-lib/components';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { ExperimentMetricsDataComponent } from './experiment-metrics-data/experiment-metrics-data.component';
import { ExperimentQueryResultComponent } from './experiment-query-result/experiment-query-result.component';
import { ExperimentService } from '../../../../../../../core/experiments/experiments.service';
import { AuthService } from '../../../../../../../core/auth/auth.service';

Expand All @@ -17,7 +17,7 @@ import { AuthService } from '../../../../../../../core/auth/auth.service';
CommonSectionCardComponent,
CommonSectionCardTitleHeaderComponent,
CommonSectionCardActionButtonsComponent,
ExperimentMetricsDataComponent,
ExperimentQueryResultComponent,
TranslateModule,
],
templateUrl: './experiment-metrics-data-section-card.component.html',
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<div class="experiment-queries-result">
<span class="ft-18-700 main-effect-data-text">{{
'home.experiment-query-result.main-effect.title.text' | translate
}}</span>
<br />
<div *ngFor="let query of experiment.queries">
<span class="ft-16-700 main-effect-data-text">
{{ query.name }}
</span>
<br />
<div *ngIf="experimentType === 'Factorial'">
<ng-container *ngIf="!(isQueryExecuting$ | async); else spinnerTemplate">
<ng-container *ngIf="!isResultExist(query.id); else noResultTemplate">
<div style="display: flex; overflow-x: scroll">
<br />
<div *ngFor="let factor of factors; let i = index" style="margin-right: 100px; height: 320px; width: 40%">
<table style="width: 100%">
<tr>
<td class="ft-14-600 factor-name-main">{{ factor | uppercase }}</td>
</tr>
</table>
<ngx-charts-bar-vertical
[view]="[300, 250]"
[scheme]="colorScheme"
[results]="queryFactorResults[i][query?.id]"
[xAxis]="true"
[yAxis]="true"
[barPadding]="20"
[showXAxisLabel]="true"
[showYAxisLabel]="true"
[xAxisTickFormatting]="formateXAxisLabel"
[yAxisTickFormatting]="formateYAxisLabel"
[trimXAxisTicks]="true"
[rotateXAxisTicks]="false"
>
<ng-template #tooltipTemplate let-model="model">
<span>{{ model.name }}</span>
<br />
<span>{{ model.value }}</span>
<br />
<span>( n = {{ model.extra }} )</span>
</ng-template>
</ngx-charts-bar-vertical>
<br />
</div>
</div>
</ng-container>
</ng-container>
</div>
<div *ngIf="experimentType === 'Simple'">
<ng-container *ngIf="!(isQueryExecuting$ | async); else spinnerTemplate">
<ng-container *ngIf="!isResultExist(query.id); else noResultTemplate">
<div style="height: 250px; width: 30%">
<ngx-charts-bar-vertical
[view]="[400, 250]"
[scheme]="colorScheme"
[results]="queryResults[query?.id]"
[xAxis]="true"
[yAxis]="true"
[barPadding]="10"
[showXAxisLabel]="true"
[showYAxisLabel]="true"
[xAxisTickFormatting]="formateXAxisLabel"
[yAxisTickFormatting]="formateYAxisLabel"
[trimXAxisTicks]="true"
[rotateXAxisTicks]="false"
>
<ng-template #tooltipTemplate let-model="model">
<span>{{ model.name }}</span>
<br />
<span>{{ model.value }}</span>
<br />
<span>( n = {{ model.extra }} )</span>
</ng-template>
</ngx-charts-bar-vertical>
</div>
</ng-container>
</ng-container>
</div>
</div>
<br />
<!-- Interaction Section -->
<div *ngIf="experimentType === 'Factorial'">
<span class="ft-18-700 interaction-effect-data-text">{{
'home.experiment-query-result.interaction-effect.title.text' | translate
}}</span>
<div *ngIf="factors?.length === 2">
<div *ngFor="let query of experiment.queries">
<br />
<span class="ft-16-700 interaction-effect-data-text">
{{ query.name }}
</span>
<br />
<ng-container *ngIf="!(isQueryExecuting$ | async); else spinnerTemplate">
<ng-container *ngIf="!isResultExist(query.id); else noResultTemplate">
<div style="display: table; overflow-x: scroll">
<br />
<div style="display: block; margin-right: 100px">
<table style="width: 100%">
<tr style="white-space: nowrap">
<td class="ft-14-600 factor-name1" *ngFor="let factor of factors">
{{ factor | uppercase }}
</td>
</tr>
<tr style="white-space: nowrap">
<td class="ft-14-600 factor-name2" *ngFor="let factor of factors.slice().reverse()">
({{ factor | uppercase }})
</td>
</tr>
</table>
</div>
<br />
<div style="display: flex">
<div
*ngFor="let factor of factors; let i = index"
style="margin-left: 30px; margin-right: 180px; height: 320px; width: 30%"
>
<ngx-charts-line-chart
[view]="[270, 250]"
[scheme]="colorScheme"
[xAxis]="true"
[yAxis]="true"
[legend]="true"
[showXAxisLabel]="true"
[showYAxisLabel]="true"
[yAxisTickFormatting]="formateYAxisLabel"
[results]="interactionEffectQueryFactorResults[i][query?.id]"
[legendTitle]="null"
[legendPosition]="'below'"
>
<ng-template #tooltipTemplate let-model="model">
<span>{{ model.series }}</span>
<br />
<span>{{ model.value }}</span>
<br />
<span>( n = {{ model.participantsLogged }} )</span>
</ng-template>
</ngx-charts-line-chart>
</div>
</div>
</div>
</ng-container>
</ng-container>
<br />
<br />
</div>
</div>
<div class="table-container table-container-query" *ngIf="factors?.length >= 3">
<!-- Interaction Effect Table -->
<mat-table style="overflow-x: scroll" [dataSource]="dataSource" class="table query-table">
<!-- Factor columns -->
<ng-container *ngFor="let column of factorColumnDefs" [matColumnDef]="column.name">
<mat-header-cell class="ft-12-700" *matHeaderCellDef>{{ column.label | uppercase }}</mat-header-cell>
<mat-cell class="ft-12-600" *matCellDef="let row">{{ row[column.name] }}</mat-cell>
</ng-container>

<!-- Query columns -->
<ng-container *ngFor="let column of queryColumnDefs" [matColumnDef]="column.name">
<mat-header-cell class="ft-12-700" *matHeaderCellDef>{{ column.label | uppercase }}</mat-header-cell>
<mat-cell class="ft-12-600" *matCellDef="let row">{{ row[column.name] }}</mat-cell>
</ng-container>

<!-- Header row -->
<mat-header-row *matHeaderRowDef="headerColumns"></mat-header-row>

<!-- Data rows -->
<mat-row *matRowDef="let row; columns: dataColumns"></mat-row>
</mat-table>
</div>
<br />
</div>
<ng-template #noResultTemplate>
<span class="zero-state" [innerHTML]="'query.result.empty-result.text' | translate"> </span>
</ng-template>
<ng-template #spinnerTemplate>
<div class="loading-container">
<mat-spinner diameter="60"></mat-spinner>
</div>
</ng-template>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.experiment-queries-result {
padding: 0 34px 34px;

.metric-data-text {
display: block;
}

.main-effect-data-text {
display: block;
}

.interaction-effect-data-text {
display: block;
}

.metric-data-detail-text {
color: var(--grey-3);
margin-bottom: 10px;
}

.factor-name-main {
color: var(--grey-3);
margin-top: 10px;
padding-left: 150px;
}

.factor-name1 {
color: var(--grey-3);
margin-top: 10px;
padding-left: 150px;
padding-right: 330px;
}

.factor-name2 {
color: var(--grey-3);
margin-bottom: -50px;
padding-left: 150px;
padding-right: 330px;
}

.table-container {
padding: 24px 34px;

.table {
mat-cell,
mat-header-cell {
justify-content: flex-start !important;
}
}

&-query .query-table {
justify-content: space-between;

.mat-mdc-header-cell {
justify-content: left;
}

.mat-mdc-cell {
justify-content: left;
}
}
}

::ng-deep .ngx-charts {
::ng-deep text {
font-family: 'Open Sans';
font-weight: 600;
display: flex;
flex-grow: 1;
}
}

::ng-deep .ngx-charts g.line-chart > g:last-of-type > g:nth-child(n) g.line-series > path {
stroke-width: 5px;
}

::ng-deep {
.legend-labels {
background: none !important;
margin-left: 50px;
}
}

// ::ng-deep{
// .legend-label-text{
// color: white;
// }
// }

.loading-container {
display: flex;
flex-grow: 1;
align-items: center;
justify-content: center;
}

::ng-deep .mat-expansion-panel-body {
padding: 0 0 16px;
}
}
Loading