Skip to content

Commit

Permalink
Cornelius/dev (#94)
Browse files Browse the repository at this point in the history
* Implemented Tooltips:
- file format explanations
- info that n dimensions are being supported
- info that t-SNE and PCA is used
- info that local execution can push a device to its limits
- info that the download file format is png

Deleted unnecessary routeToLogin() method.

* Changes by cedricpurwin

* Update input.component.html

Correction of previous commit: Made the expert options disable again when no file is uploaded

* Update input.component.html

Fixed syntax error (missing ")

* Update input.component.html

Made more precise tooltop regarding PCA and t-SNE

* Update input.component.html

Made even more precise tooltip regarding t-SNE and PCA on request of Klaus

---------

Co-authored-by: cookie.exe <[email protected]>
Co-authored-by: Cornelius Daemberg <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2023
1 parent eb0f943 commit c337414
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle'
import { TableComponent } from './home/chart-container/table/table.component'
import { MatTabsModule } from '@angular/material/tabs'
import { MatTableModule } from '@angular/material/table'
import { MatTooltipModule } from '@angular/material/tooltip'

const routes: Routes = [{ path: 'home', component: HomeComponent },
{ path: '', redirectTo: '/home', pathMatch: 'full' }]
Expand Down Expand Up @@ -53,7 +54,8 @@ const routes: Routes = [{ path: 'home', component: HomeComponent },
MatExpansionModule,
MatSlideToggleModule,
MatTabsModule,
MatTableModule
MatTableModule,
MatTooltipModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
2 changes: 1 addition & 1 deletion src/app/home/chart-container/chart/chart.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<canvas class="chart-canvas" id="Chart">{{ chart }}</canvas>
</div>
<a id="chartDownload">
<button mat-button>Download Chart</button>
<button mat-button matTooltip="Als PNG herunterladen">Download Chart</button>
</a>

</div>
4 changes: 0 additions & 4 deletions src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,4 @@ export class HomeComponent {
public handleLoading (status: boolean): void {
this.isLoading = status
}

public routeToLogin (): void {
void this.router.navigate(['/login'])
}
}
3 changes: 3 additions & 0 deletions src/app/home/input/input.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

.button-row{
horiz-align: center;
display: grid;
text-align: left;
grid-template-columns: 20% 60% 20%;
}
}
.dropzone:hover{
Expand Down
20 changes: 14 additions & 6 deletions src/app/home/input/input.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
<form class="form-container" [formGroup]="clusterInputFormGroup" (ngSubmit)="submit()">
<h1 class="grid-over-two-columns">K-Means durchführen</h1>

<div class="grid-over-two-columns dropzone" (dragover)="onDragOver($event)" (drop)="onDropSuccess($event)">
<div class="grid-over-two-columns dropzone" (dragover)="onDragOver($event)" (drop)="onDropSuccess($event)" matTooltip="">
<input type="file" style="display: none" (change)="onChange($event)" #fileUpload >

<h3>Ziehe eine .csv / .xlsx Datei per Drag & Drop hierher</h3>
<h3>oder</h3>

<div class="button-row">
<button mat-raised-button (click)="fileUpload.click()" color="accent" type="button">
<div></div>
<button mat-raised-button (click)="fileUpload.click()" color="accent" type="button" matTooltip="Bei CSV-Dateien wird das Trennzeichen automatisch erkannt.">
Lade eine Datei hoch <mat-icon>upload_file</mat-icon>
</button>
<div>
<mat-icon style="color: #616161; margin-left: 8px; margin-top: 5px;" fontIcon="info"
matTooltip="Jede Spalte der Datei entspricht einer Dimension. Es werden beliebig viele Dimensionen unterstützt."></mat-icon></div>

</div>

</div>
Expand All @@ -31,17 +36,20 @@ <h3>oder</h3>

<div class="settings-grid">
<div>Spaltenauswahl</div>

<mat-form-field class="fixed-width-field"
[class.has-error]="clusterInputFormGroup.get('selectedColumns')?.hasError('twoColumnsRequired')">
[class.has-error]="clusterInputFormGroup.get('selectedColumns')?.hasError('twoColumnsRequired')" >
<mat-label>Spalten</mat-label>
<mat-select multiple formControlName="selectedColumns">
<mat-select multiple formControlName="selectedColumns" matTooltip="Bei mehr als zwei Dimensionen wird zur Dimensionsreduzierung bei lokaler Ausführung PCA, bei Server-Ausführung t-SNE verwendet" matTooltipPosition="above">
<mat-option *ngFor="let column of columnNames" [value]="column">{{column}} </mat-option>
</mat-select>
<mat-error *ngIf="clusterInputFormGroup.get('selectedColumns')?.hasError('twoColumnsRequired')">
<mat-error *ngIf="clusterInputFormGroup.get('selectedColumns')?.hasError('twoColumnsRequired') ">
Bitte mindestens 2 Spalten auswählen.
</mat-error>
</mat-form-field>



<div>Anzahl der Cluster (optional)</div>
<div>
<mat-form-field floatLabel="always" class="fixed-width-field">
Expand Down Expand Up @@ -69,7 +77,7 @@ <h3>oder</h3>
</mat-button-toggle-group>
</div>
<div class="grid-over-two-columns">
<mat-slide-toggle name="localSelector" aria-label="execute locally" formControlName="offlineKmeans" (change)="updateClusterDetermination()">Lokal im Browser ausführen</mat-slide-toggle> </div>
<mat-slide-toggle name="localSelector" aria-label="execute locally" formControlName="offlineKmeans" (change)="updateClusterDetermination()" matTooltip="Je nach Datenmenge kann diese Option dein Gerät an die Grenzen bringen.">Lokal im Browser ausführen</mat-slide-toggle></div>
</div>
</mat-expansion-panel>
</mat-accordion>
Expand Down

0 comments on commit c337414

Please sign in to comment.