diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5b51e56b9fdac8b4ed72b4b00f0f3c6b18b97bce..e386fe63e09506f9dd154af9f19d59bfe41fadcb 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -34,7 +34,8 @@ import { CalculatorNameComponent } from './components/generic-calculator/calc-na import { CalcCanvasComponent } from './components/canvas/canvas.component'; import { SectionCanvasComponent } from './components/section-canvas/section-canvas.component'; import { RemousResultsComponent } from './components/remous-results/remous-results.component'; -import { ResultsGraphComponent, GraphTypeSelectComponent } from './components/results-graph/results-graph.component'; +import { ResultsGraphComponent } from './components/results-graph/results-graph.component'; +import { GraphTypeSelectComponent } from './components/results-graph/graph-type.component'; import { LogComponent } from './components/log/log.component'; import { CalculatorListComponent } from './components/calculator-list/calculator-list.component'; import { ApplicationSetupComponent } from './components/app-setup/app-setup.component'; diff --git a/src/app/components/results-graph/graph-type.component.ts b/src/app/components/results-graph/graph-type.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..4415170097085256f94e1ee1163a6a852817acbd --- /dev/null +++ b/src/app/components/results-graph/graph-type.component.ts @@ -0,0 +1,22 @@ +import { Component } from '@angular/core'; + +import { GenericSelectComponent } from '../generic-select/generic-select.component'; +import { GraphType } from "../../results/fixed-var-results"; + +@Component({ + selector: "graph-type", + templateUrl: "../generic-select/generic-select.component.html" +}) +export class GraphTypeSelectComponent extends GenericSelectComponent<GraphType> { + private _entries: GraphType[] = [GraphType.Histogram, GraphType.Scatter]; + private _entriesLabels: string[] = ["Histogramme", "XY"]; + + protected get entries(): GraphType[] { + return this._entries; + } + + protected entryLabel(entry: GraphType): string { + const i = this._entries.indexOf(entry); + return this._entriesLabels[i]; + } +} diff --git a/src/app/components/results-graph/results-graph.component.ts b/src/app/components/results-graph/results-graph.component.ts index ceba3ed605228d082014ac93c7723b69b3ad1fc5..861ea67986221e41e08c9b36d1198e0578072b02 100644 --- a/src/app/components/results-graph/results-graph.component.ts +++ b/src/app/components/results-graph/results-graph.component.ts @@ -1,25 +1,7 @@ import { Component, AfterViewInit, EventEmitter, Output, ViewChild } from '@angular/core'; import { FixedVarResults, GraphType } from "../../results/fixed-var-results"; -import { GenericSelectComponent } from '../generic-select/generic-select.component'; - -@Component({ - selector: "graph-type", - templateUrl: "../generic-select/generic-select.component.html" -}) -export class GraphTypeSelectComponent extends GenericSelectComponent<GraphType> { - private _entries: GraphType[] = [GraphType.Histogram, GraphType.Scatter]; - private _entriesLabels: string[] = ["Histogramme", "XY"]; - - protected get entries(): GraphType[] { - return this._entries; - } - - protected entryLabel(entry: GraphType): string { - const i = this._entries.indexOf(entry); - return this._entriesLabels[i]; - } -} +import { GraphTypeSelectComponent } from './graph-type.component'; @Component({ selector: 'results-graph',