diff --git a/e2e/calculator.po.ts b/e2e/calculator.po.ts index 9c957539f1164c39f2b039378a13222ba9faba26..42f3ea3f7b35d963a47c5a307773b69e5ad0505f 100644 --- a/e2e/calculator.po.ts +++ b/e2e/calculator.po.ts @@ -97,7 +97,7 @@ export class CalculatorPage { return ( await element(by.css("fixedvar-results fixed-results > .fixed-results-container")).isPresent() || - await element(by.css("fixedvar-results results-graph > graph-results-container")).isPresent() + await element(by.css("fixedvar-results results-chart > chart-results-container")).isPresent() || await element(by.css("remous-results #main-chart")).isPresent() || diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 88491f10940562b8b2e468b752a27a9029f24cbf..22f1e48af327c8001cb6d4acff880669fc0c1eca 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -70,10 +70,10 @@ 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 } from "./components/results-graph/results-graph.component"; +import { ResultsChartComponent } from "./components/results-chart/results-chart.component"; import { PabResultsComponent } from "./components/pab-results/pab-results.component"; import { PabResultsTableComponent } from "./components/pab-results/pab-results-table.component"; -import { GraphTypeSelectComponent } from "./components/results-graph/graph-type.component"; +import { ChartTypeSelectComponent } from "./components/results-chart/chart-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"; @@ -83,7 +83,7 @@ import { VarResultsComponent } from "./components/fixedvar-results/var-results.c import { LogEntryComponent } from "./components/log-entry/log-entry.component"; import { ParamLinkComponent } from "./components/param-link/param-link.component"; import { SelectModelFieldLineComponent } from "./components/select-model-field-line/select-model-field-line.component"; -import { PabProfileGraphComponent } from "./components/pab-profile-graph/pab-profile-graph.component"; +import { PabProfileChartComponent } from "./components/pab-profile-chart/pab-profile-chart.component"; import { PabTableComponent } from "./components/pab-table/pab-table.component"; import { VariableResultsSelectorComponent } from "./components/variable-results-selector/variable-results-selector.component"; import { QuicknavComponent } from "./components/quicknav/quicknav.component"; @@ -187,7 +187,7 @@ const appRoutes: Routes = [ FlexLtXsShowHideDirective, FlexXxsShowHideDirective, GenericCalculatorComponent, - GraphTypeSelectComponent, + ChartTypeSelectComponent, JalhydAsyncModelValidationDirective, JalhydModelValidationDirective, JalhydModelValidationMinDirective, @@ -197,7 +197,7 @@ const appRoutes: Routes = [ LogEntryComponent, ModulesDiagramComponent, NgParamInputComponent, - PabProfileGraphComponent, + PabProfileChartComponent, PabResultsComponent, PabResultsTableComponent, PabTableComponent, @@ -210,7 +210,7 @@ const appRoutes: Routes = [ ParamValuesComponent, QuicknavComponent, RemousResultsComponent, - ResultsGraphComponent, + ResultsChartComponent, SectionCanvasComponent, SectionResultsComponent, SelectFieldLineComponent, diff --git a/src/app/components/fixedvar-results/fixedvar-results.component.html b/src/app/components/fixedvar-results/fixedvar-results.component.html index 3ce5407546563ed4768f6c3990648ac5d0a341b5..0b7fc09fc5ae489d93a4520fb4c4083a83c2cae9 100644 --- a/src/app/components/fixedvar-results/fixedvar-results.component.html +++ b/src/app/components/fixedvar-results/fixedvar-results.component.html @@ -2,7 +2,7 @@ <!-- journal --> <log></log> - <results-graph *ngIf="showVarResults"></results-graph> + <results-chart *ngIf="showVarResults"></results-chart> <div> <!-- table des résultats fixés --> diff --git a/src/app/components/fixedvar-results/fixedvar-results.component.ts b/src/app/components/fixedvar-results/fixedvar-results.component.ts index a237409538c464527bc1b9e48a643c70bfd5729e..db97318390a3d125168c87cd489316826ab72fde 100644 --- a/src/app/components/fixedvar-results/fixedvar-results.component.ts +++ b/src/app/components/fixedvar-results/fixedvar-results.component.ts @@ -3,7 +3,7 @@ import { Component, ViewChild, DoCheck } from "@angular/core"; import { LogComponent } from "../../components/log/log.component"; import { FixedResults } from "../../results/fixed-results"; import { VarResults } from "../../results/var-results"; -import { ResultsGraphComponent } from "../results-graph/results-graph.component"; +import { ResultsChartComponent } from "../results-chart/results-chart.component"; import { CalculatorResults } from "../../results/calculator-results"; import { Result, cLog } from "jalhyd"; import { NgParameter } from "../../formulaire/ngparam"; @@ -45,8 +45,8 @@ export class FixedVarResultsComponent extends ResultsComponent implements DoChec /** * graphique dans le cas d'un paramètre à varier */ - @ViewChild(ResultsGraphComponent, { static: false }) - private resultsGraphComponent: ResultsGraphComponent; + @ViewChild(ResultsChartComponent, { static: false }) + private resultsChartComponent: ResultsChartComponent; public set results(rs: CalculatorResults[]) { this._fixedResults = undefined; @@ -74,8 +74,8 @@ export class FixedVarResultsComponent extends ResultsComponent implements DoChec if (this.varResultsComponent) { this.varResultsComponent.results = undefined; } - if (this.resultsGraphComponent) { - this.resultsGraphComponent.results = undefined; + if (this.resultsChartComponent) { + this.resultsChartComponent.results = undefined; } // set _doUpdate flag so that results are rebuilt on the next Angular display cycle @@ -133,10 +133,10 @@ export class FixedVarResultsComponent extends ResultsComponent implements DoChec this.varResultsComponent.results = this._varResults; } - graphUpdated = this.resultsGraphComponent !== undefined; + graphUpdated = this.resultsChartComponent !== undefined; if (graphUpdated) { - this.resultsGraphComponent.results = this._varResults; - this.resultsGraphComponent.updateView(); + this.resultsChartComponent.results = this._varResults; + this.resultsChartComponent.updateView(); } } else { varUpdated = true; diff --git a/src/app/components/fixedvar-results/var-results.component.ts b/src/app/components/fixedvar-results/var-results.component.ts index ca21f1807ce1d20b8748e80e92b5d72527a5b3cd..98f780ab746fd7a01664f94388a2dbe5a3864dda 100644 --- a/src/app/components/fixedvar-results/var-results.component.ts +++ b/src/app/components/fixedvar-results/var-results.component.ts @@ -177,11 +177,11 @@ export class VarResultsComponent extends ResultsComponent { } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } /** Shows a modal displaying the log messages details for a calcutation step */ diff --git a/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts b/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts index 47158dc9a9c4a11e30bdcf69aa2fd1577a215d40..899b18d24b836eab80085555888ce356706cba00 100644 --- a/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts +++ b/src/app/components/macrorugo-compound-results/macrorugo-compound-results-table.component.ts @@ -135,10 +135,10 @@ export class MacrorugoCompoundResultsTableComponent extends ResultsComponent { } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } } diff --git a/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.html b/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.html index e03d0b2b10ec65cf17c17297c6d9544c240818f7..58fb3b8616cc2572d5859418c7379219d98df768 100644 --- a/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.html +++ b/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.html @@ -16,10 +16,10 @@ [currentItem]="'charts'" [align]="'left'"></quicknav> <div id="macrorugo-compound-graphs-container" class="container" fxLayout="row wrap" fxLayoutAlign="space-around start"> - <!-- <pab-profile-graph *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> - </pab-profile-graph> --> - <results-graph *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> - </results-graph> + <!-- <pab-profile-chart *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> + </pab-profile-chart> --> + <results-chart *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> + </results-chart> </div> </div> diff --git a/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.scss b/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.scss index 6f5eb10d525664ef64b09c7c5eda9a8a074218b1..446313ba6da367fde3da7c3b760e39086f71a804 100644 --- a/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.scss +++ b/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.scss @@ -1,4 +1,4 @@ -results-graph { +results-chart { margin-left: 1em; margin-right: 1em; } diff --git a/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.ts b/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.ts index 042da7ba5aba706aa328566e26ecd0b7c3266f01..13aba78553cb928fc954bd4d3e701016f85b2920 100644 --- a/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.ts +++ b/src/app/components/macrorugo-compound-results/macrorugo-compound-results.component.ts @@ -7,7 +7,7 @@ import { CalculatorResults } from "../../results/calculator-results"; import { NgParameter } from "../../formulaire/ngparam"; import { ApplicationSetupService } from "../../services/app-setup.service"; import { PlottableData } from "../../results/plottable-data"; -import { ResultsGraphComponent } from "../results-graph/results-graph.component"; +import { ResultsChartComponent } from "../results-chart/results-chart.component"; import { I18nService } from "../../services/internationalisation.service"; import { VariableResultsSelectorComponent } from "../variable-results-selector/variable-results-selector.component"; import { MacrorugoCompoundResultsTableComponent } from "./macrorugo-compound-results-table.component"; @@ -44,8 +44,8 @@ export class MacrorugoCompoundResultsComponent implements DoCheck { @ViewChild("iterationLog", { static: false }) private iterationLogComponent: LogComponent; - @ViewChild(ResultsGraphComponent, { static: false }) - private resultsGraphComponent: ResultsGraphComponent; + @ViewChild(ResultsChartComponent, { static: false }) + private resultsChartComponent: ResultsChartComponent; constructor( private appSetupService: ApplicationSetupService, @@ -84,8 +84,8 @@ export class MacrorugoCompoundResultsComponent implements DoCheck { if (this.variableResultsSelectorComponent) { this.variableResultsSelectorComponent.results = undefined; } - if (this.resultsGraphComponent) { - this.resultsGraphComponent.results = undefined; + if (this.resultsChartComponent) { + this.resultsChartComponent.results = undefined; } // set _doUpdate flag so that results are rebuilt on the next Angular display cycle this._doUpdate = false; @@ -240,7 +240,7 @@ export class MacrorugoCompoundResultsComponent implements DoCheck { */ private updateResults() { let mrcUpdated: boolean; - let resultsGraphUpdated: boolean; + let resultsChartUpdated: boolean; let selectorUpdated: boolean; // results or not, there might be a log @@ -260,18 +260,18 @@ export class MacrorugoCompoundResultsComponent implements DoCheck { if (selectorUpdated) { this.variableResultsSelectorComponent.results = this._mrcResults; } - resultsGraphUpdated = this.resultsGraphComponent !== undefined; - if (resultsGraphUpdated) { - this.resultsGraphComponent.results = this.plottableResults; - this.resultsGraphComponent.updateView(); + resultsChartUpdated = this.resultsChartComponent !== undefined; + if (resultsChartUpdated) { + this.resultsChartComponent.results = this.plottableResults; + this.resultsChartComponent.updateView(); } } else { mrcUpdated = true; - resultsGraphUpdated = true; + resultsChartUpdated = true; selectorUpdated = true; } - return mrcUpdated && logUpdated && resultsGraphUpdated && selectorUpdated; + return mrcUpdated && logUpdated && resultsChartUpdated && selectorUpdated; } public get mrcResults() { @@ -310,7 +310,7 @@ export class MacrorugoCompoundResultsComponent implements DoCheck { return this.i18nService.localizeText("INFO_TITREJOURNAL_GLOBAL"); } - /** builds a set of PlottableData from MacrorugoCompoundResults, to feed the graph */ + /** builds a set of PlottableData from MacrorugoCompoundResults, to feed the chart */ protected get plottableResults(): PlottableData { this._plottableResults.setMrcResults(this.mrcResults); return this._plottableResults; diff --git a/src/app/components/modules-diagram/modules-diagram.component.ts b/src/app/components/modules-diagram/modules-diagram.component.ts index 1c91b462a147bfedceadefd0d063be3b34aa0974..7aaad2e1def3673bd1de9a0d8908ed3e3dfee9c8 100644 --- a/src/app/components/modules-diagram/modules-diagram.component.ts +++ b/src/app/components/modules-diagram/modules-diagram.component.ts @@ -90,7 +90,7 @@ export class ModulesDiagramComponent implements AfterContentInit, AfterViewCheck } public ngAfterViewInit(): void { - // add click listener on every calculator node in the graph, that + // add click listener on every calculator node in the chart, that // corresponds to an open module this.nativeElement.querySelectorAll("g.node").forEach(item => { if (item.id && this.formIsOpen(item.id)) { @@ -113,7 +113,7 @@ export class ModulesDiagramComponent implements AfterContentInit, AfterViewCheck this.nativeElement = this.diagram.nativeElement; if (this.hasModules) { - // generate graph description + // generate chart description const graphDefinition = this.graphDefinition(); // draw try { @@ -140,10 +140,10 @@ export class ModulesDiagramComponent implements AfterContentInit, AfterViewCheck } /** - * Builds a Mermaid graph text definition + * Builds a Mermaid chart text definition */ private graphDefinition() { - const def: string[] = [ "graph TB" ]; + const def: string[] = [ "chart TB" ]; const forms = this.formulaireService.formulaires; for (const f of forms) { diff --git a/src/app/components/pab-profile-graph/pab-profile-graph.component.html b/src/app/components/pab-profile-chart/pab-profile-chart.component.html similarity index 90% rename from src/app/components/pab-profile-graph/pab-profile-graph.component.html rename to src/app/components/pab-profile-chart/pab-profile-chart.component.html index 28b4288fd2bbf48bcedac4e7a4ed9375a2f91cc1..ae6745863734aab5955aaae0e6946a6565e3f1a6 100644 --- a/src/app/components/pab-profile-graph/pab-profile-graph.component.html +++ b/src/app/components/pab-profile-chart/pab-profile-chart.component.html @@ -1,6 +1,6 @@ -<div class="graph-results-container" #graphProfile fxLayout="row wrap" fxLayoutAlign="center center"> +<div class="chart-results-container" #graphProfile fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> - <div class="graph-profile-buttons"> + <div class="chart-profile-buttons"> <button mat-icon-button (click)="resetZoom()" [disabled]="! zoomWasChanged" [title]="uitextResetZoomTitle"> <mat-icon color="primary">replay</mat-icon> </button> diff --git a/src/app/components/pab-profile-graph/pab-profile-graph.component.scss b/src/app/components/pab-profile-chart/pab-profile-chart.component.scss similarity index 89% rename from src/app/components/pab-profile-graph/pab-profile-graph.component.scss rename to src/app/components/pab-profile-chart/pab-profile-chart.component.scss index 465866a6ce03ef7eaa710c1e4545563c44d2e9dd..9a8cb5b696d40fb038853e5bf3f5ed33da5112ad 100644 --- a/src/app/components/pab-profile-graph/pab-profile-graph.component.scss +++ b/src/app/components/pab-profile-chart/pab-profile-chart.component.scss @@ -1,9 +1,9 @@ -.graph-results-container{ +.chart-results-container{ display: block; background-color: white; } -.graph-profile-buttons { +.chart-profile-buttons { padding-right: 10px; padding-top: 4px; margin-bottom: -30px; diff --git a/src/app/components/pab-profile-graph/pab-profile-graph.component.ts b/src/app/components/pab-profile-chart/pab-profile-chart.component.ts similarity index 95% rename from src/app/components/pab-profile-graph/pab-profile-graph.component.ts rename to src/app/components/pab-profile-chart/pab-profile-chart.component.ts index a75c958f98502a774b2523c44ad13504b3da483a..e9c54b57443988fc90f607364f7d51d5741c1694 100644 --- a/src/app/components/pab-profile-graph/pab-profile-graph.component.ts +++ b/src/app/components/pab-profile-chart/pab-profile-chart.component.ts @@ -11,13 +11,13 @@ import { fv } from "../../util"; import { CloisonAval, Cloisons } from "jalhyd"; @Component({ - selector: "pab-profile-graph", - templateUrl: "./pab-profile-graph.component.html", + selector: "pab-profile-chart", + templateUrl: "./pab-profile-chart.component.html", styleUrls: [ - "./pab-profile-graph.component.scss" + "./pab-profile-chart.component.scss" ] }) -export class PabProfileGraphComponent extends ResultsComponent { +export class PabProfileChartComponent extends ResultsComponent { @ViewChild(ChartComponent, { static: false }) private chartComponent; @@ -150,13 +150,13 @@ export class PabProfileGraphComponent extends ResultsComponent { } public updateView() { - this.generateScatterGraph(); + this.generateScatterChart(); } /** * génère les données d'un graphe de type "scatter" */ - private generateScatterGraph() { + private generateScatterChart() { const ySeries = this.getYSeries(); this.graph_data = { @@ -189,19 +189,19 @@ export class PabProfileGraphComponent extends ResultsComponent { } public get uitextResetZoomTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_RESET_ZOOM"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_RESET_ZOOM"); } public get uitextExportImageTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXPORT_IMAGE"); } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } private getXSeries(): number[] { diff --git a/src/app/components/pab-results/pab-results-table.component.ts b/src/app/components/pab-results/pab-results-table.component.ts index f48b7d49926bd3128c6c2920c71fca9bfbafb466..e07d28f16b83c4eac83e33c67cbf23369045eefb 100644 --- a/src/app/components/pab-results/pab-results-table.component.ts +++ b/src/app/components/pab-results/pab-results-table.component.ts @@ -160,10 +160,10 @@ export class PabResultsTableComponent extends ResultsComponent { } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } } diff --git a/src/app/components/pab-results/pab-results.component.html b/src/app/components/pab-results/pab-results.component.html index d601347bd661f08b02a75e331a0e9b083122a53c..78f7d98451f94d60873f316ca54f794f29fcdb40 100644 --- a/src/app/components/pab-results/pab-results.component.html +++ b/src/app/components/pab-results/pab-results.component.html @@ -16,10 +16,10 @@ [currentItem]="'charts'" [align]="'left'"></quicknav> <div id="pab-graphs-container" class="container" fxLayout="row wrap" fxLayoutAlign="space-around start"> - <pab-profile-graph *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> - </pab-profile-graph> - <results-graph *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> - </results-graph> + <pab-profile-chart *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> + </pab-profile-chart> + <results-chart *ngIf="hasDisplayableResults" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> + </results-chart> </div> </div> diff --git a/src/app/components/pab-results/pab-results.component.scss b/src/app/components/pab-results/pab-results.component.scss index 6f5eb10d525664ef64b09c7c5eda9a8a074218b1..446313ba6da367fde3da7c3b760e39086f71a804 100644 --- a/src/app/components/pab-results/pab-results.component.scss +++ b/src/app/components/pab-results/pab-results.component.scss @@ -1,4 +1,4 @@ -results-graph { +results-chart { margin-left: 1em; margin-right: 1em; } diff --git a/src/app/components/pab-results/pab-results.component.ts b/src/app/components/pab-results/pab-results.component.ts index 0718c2a12e6e51073859ad96b5fce264320b6404..137d6c1b69708e006fdb26d13ba0a294abd7749f 100644 --- a/src/app/components/pab-results/pab-results.component.ts +++ b/src/app/components/pab-results/pab-results.component.ts @@ -10,9 +10,9 @@ import { PabResults } from "../../results/pab-results"; import { VariableResultsSelectorComponent } from "../variable-results-selector/variable-results-selector.component"; import { PlottableData } from "../../results/plottable-data"; import { PlottablePabResults } from "../../results/plottable-pab-results"; -import { ResultsGraphComponent } from "../results-graph/results-graph.component"; +import { ResultsChartComponent } from "../results-chart/results-chart.component"; import { I18nService } from "../../services/internationalisation.service"; -import { PabProfileGraphComponent } from "../pab-profile-graph/pab-profile-graph.component"; +import { PabProfileChartComponent } from "../pab-profile-chart/pab-profile-chart.component"; @Component({ selector: "pab-results", @@ -44,11 +44,11 @@ export class PabResultsComponent implements DoCheck { @ViewChild("iterationLog", { static: false }) private iterationLogComponent: LogComponent; - @ViewChild(ResultsGraphComponent, { static: false }) - private resultsGraphComponent: ResultsGraphComponent; + @ViewChild(ResultsChartComponent, { static: false }) + private resultsChartComponent: ResultsChartComponent; - @ViewChild(PabProfileGraphComponent, { static: false }) - private profileGraphComponent: PabProfileGraphComponent; + @ViewChild(PabProfileChartComponent, { static: false }) + private profileChartComponent: PabProfileChartComponent; constructor( private i18nService: I18nService, @@ -86,11 +86,11 @@ export class PabResultsComponent implements DoCheck { if (this.variableResultsSelectorComponent) { this.variableResultsSelectorComponent.results = undefined; } - if (this.resultsGraphComponent) { - this.resultsGraphComponent.results = undefined; + if (this.resultsChartComponent) { + this.resultsChartComponent.results = undefined; } - if (this.profileGraphComponent) { - this.profileGraphComponent.results = undefined; + if (this.profileChartComponent) { + this.profileChartComponent.results = undefined; } // set _doUpdate flag so that results are rebuilt on the next Angular display cycle this._doUpdate = false; @@ -271,8 +271,8 @@ export class PabResultsComponent implements DoCheck { */ private updateResults() { let pabUpdated: boolean; - let resultsGraphUpdated: boolean; - let profileGraphUpdated: boolean; + let resultsChartUpdated: boolean; + let profileChartUpdated: boolean; let selectorUpdated: boolean; // results or not, there might be a log @@ -292,24 +292,24 @@ export class PabResultsComponent implements DoCheck { if (selectorUpdated) { this.variableResultsSelectorComponent.results = this._pabResults; } - resultsGraphUpdated = this.resultsGraphComponent !== undefined; - if (resultsGraphUpdated) { - this.resultsGraphComponent.results = this.plottableResults; - this.resultsGraphComponent.updateView(); + resultsChartUpdated = this.resultsChartComponent !== undefined; + if (resultsChartUpdated) { + this.resultsChartComponent.results = this.plottableResults; + this.resultsChartComponent.updateView(); } - profileGraphUpdated = this.profileGraphComponent !== undefined; - if (profileGraphUpdated) { - this.profileGraphComponent.results = this._pabResults; - this.profileGraphComponent.updateView(); + profileChartUpdated = this.profileChartComponent !== undefined; + if (profileChartUpdated) { + this.profileChartComponent.results = this._pabResults; + this.profileChartComponent.updateView(); } } else { pabUpdated = true; - resultsGraphUpdated = true; - profileGraphUpdated = true; + resultsChartUpdated = true; + profileChartUpdated = true; selectorUpdated = true; } - return pabUpdated && logUpdated && resultsGraphUpdated && profileGraphUpdated && selectorUpdated; + return pabUpdated && logUpdated && resultsChartUpdated && profileChartUpdated && selectorUpdated; } public get pabResults() { @@ -343,7 +343,7 @@ export class PabResultsComponent implements DoCheck { return this.i18nService.localizeText("INFO_TITREJOURNAL_GLOBAL"); } - /** builds a set of PlottableData from PabResults, to feed the graph */ + /** builds a set of PlottableData from PabResults, to feed the chart */ protected get plottableResults(): PlottableData { this._plottableResults.setPabResults(this.pabResults); return this._plottableResults; diff --git a/src/app/components/remous-results/remous-results.component.html b/src/app/components/remous-results/remous-results.component.html index 8c324393901319fb6f0c0f6e7e9a1875f9fbc38a..8a51ef96d4ae095aa02c782e212979b90b08f040 100644 --- a/src/app/components/remous-results/remous-results.component.html +++ b/src/app/components/remous-results/remous-results.component.html @@ -18,7 +18,7 @@ </div> </div> -<div class="remous-results-extragraph-container" #remousResultsExtra *ngIf="extraGraph" fxLayout="row wrap" fxLayoutAlign="center center"> +<div class="remous-results-extragraph-container" #remousResultsExtra *ngIf="extraChart" fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> <div class="remous-results-buttons"> <button mat-icon-button (click)="exportAsImage(remousResultsExtra)" [title]="uitextExportImageTitle"> diff --git a/src/app/components/remous-results/remous-results.component.ts b/src/app/components/remous-results/remous-results.component.ts index d8b46bcd340baa762480629fc8f0a225a057265c..f7a0be85dd476940d2979a06fe494754b7eed246 100644 --- a/src/app/components/remous-results/remous-results.component.ts +++ b/src/app/components/remous-results/remous-results.component.ts @@ -28,7 +28,7 @@ class LineData { /** * graphe auquel aapartient la ligne */ - private _parentGraph: GraphData; + private _parentChart: ChartData; /** * données fournies à ChartJS @@ -41,8 +41,8 @@ class LineData { */ public z: number; - constructor(gr: GraphData) { - this._parentGraph = gr; + constructor(gr: ChartData) { + this._parentChart = gr; this._tx = gr.tx; for (let i = this._tx.length - 1; i >= 0; i--) { this._ty.push(null); @@ -60,7 +60,7 @@ class LineData { } public mapPoint(x: number, y: number) { - this.setPoint(x, this._parentGraph.mapY(x, y)); + this.setPoint(x, this._parentChart.mapY(x, y)); } public get ty() { @@ -90,7 +90,7 @@ class LineData { } } -class GraphData { +class ChartData { /** * tableau des (labels) des abscisses */ @@ -283,19 +283,19 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck } public get uitextExportImageTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXPORT_IMAGE"); } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } - public get extraGraph(): boolean { - return this._remousResults === undefined ? false : this._remousResults.extraGraph; + public get extraChart(): boolean { + return this._remousResults === undefined ? false : this._remousResults.extraChart; } private get extraParamLabel(): string { @@ -372,7 +372,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck private updateResults() { if (this.logComponent !== undefined && this._remousResults !== undefined) { this.logComponent.log = this._remousResults.log; - this.generateGraph(); + this.generateChart(); return true; } return false; @@ -443,7 +443,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck } } - private generateGraph() { + private generateChart() { // http://www.chartjs.org/docs/latest/charts/line.html // le dernier dataset de la liste datasets est dessiné en 1er @@ -473,10 +473,10 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck // init graphiques - const gr1 = new GraphData(labs, penteFond, xmax); - let gr2: GraphData; - if (this._remousResults.extraGraph) { - gr2 = new GraphData(labs, 0, xmax); + const gr1 = new ChartData(labs, penteFond, xmax); + let gr2: ChartData; + if (this._remousResults.extraChart) { + gr2 = new ChartData(labs, 0, xmax); } // ligne de fond @@ -513,7 +513,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck } let lineExtra: LineData; if (this._remousResults.hasExtra) { - if (this._remousResults.extraGraph) { + if (this._remousResults.extraChart) { lineExtra = gr2.newLine(2); } else { lineExtra = gr1.newLine(2); @@ -523,7 +523,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck const itX = this.abscisseIterator; for (const re of this._remousResults.result.resultElements) { if (!itX.hasNext) { - throw new Error("RemousResultsComponent.generateGraph() : erreur interne (itérateur sur x)"); + throw new Error("RemousResultsComponent.generateChart() : erreur interne (itérateur sur x)"); } const x = itX.next().value; @@ -544,7 +544,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck } if (this._remousResults.hasExtra) { - if (this._remousResults.extraGraph) { + if (this._remousResults.extraChart) { lineExtra.data = { label: this.extraParamLabel, tension: 0, spanGaps: true, borderColor: "#0093BD", pointRadius: 4 @@ -622,7 +622,7 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck } }; - if (this._remousResults.extraGraph) { + if (this._remousResults.extraChart) { this.graph2_data = gr2.data; this.graph2_options = { diff --git a/src/app/components/results-graph/graph-type.component.scss b/src/app/components/results-chart/chart-type.component.scss similarity index 100% rename from src/app/components/results-graph/graph-type.component.scss rename to src/app/components/results-chart/chart-type.component.scss diff --git a/src/app/components/results-graph/graph-type.component.ts b/src/app/components/results-chart/chart-type.component.ts similarity index 67% rename from src/app/components/results-graph/graph-type.component.ts rename to src/app/components/results-chart/chart-type.component.ts index 5d70501b0a3a42349c3f58463b745bffcec26716..f3ed66b5a768c1367b435b1b0e55a7599a1f8bcf 100644 --- a/src/app/components/results-graph/graph-type.component.ts +++ b/src/app/components/results-chart/chart-type.component.ts @@ -1,49 +1,49 @@ import { Component } from "@angular/core"; import { Observable, IObservable, Observer } from "jalhyd"; import { I18nService } from "../../services/internationalisation.service"; -import { GraphType } from "../../results/graph-type"; +import { ChartType } from "../../results/chart-type"; @Component({ - selector: "graph-type", + selector: "chart-type", templateUrl: "../generic-select/generic-select.component.html", styleUrls: [ - "./graph-type.component.scss" + "./chart-type.component.scss" ] }) -export class GraphTypeSelectComponent implements IObservable { - private _entries: GraphType[] = [ GraphType.Histogram, GraphType.Dots, GraphType.Scatter ]; +export class ChartTypeSelectComponent implements IObservable { + private _entries: ChartType[] = [ ChartType.Histogram, ChartType.Dots, ChartType.Scatter ]; private _entriesLabels: string[] = []; - private _selected: GraphType; + private _selected: ChartType; private _observable: Observable; public get selectId() { - return "graph-type"; // for generic select component + return "chart-type"; // for generic select component } constructor(private intlService: I18nService) { this._observable = new Observable(); this._entriesLabels = [ - this.intlService.localizeText("INFO_PARAMFIELD_GRAPH_TYPE_HISTOGRAM"), - this.intlService.localizeText("INFO_PARAMFIELD_GRAPH_TYPE_DOTS"), + this.intlService.localizeText("INFO_PARAMFIELD_CHART_TYPE_HISTOGRAM"), + this.intlService.localizeText("INFO_PARAMFIELD_CHART_TYPE_DOTS"), "XY" ]; } - public get entries(): GraphType[] { + public get entries(): ChartType[] { return this._entries; } - protected entryLabel(entry: GraphType): string { + protected entryLabel(entry: ChartType): string { const i = this._entries.indexOf(entry); return this._entriesLabels[i]; } - public get selectedValue(): GraphType { + public get selectedValue(): ChartType { return this._selected; } - public set selectedValue(v: GraphType) { + public set selectedValue(v: ChartType) { if (this._selected !== v) { this._selected = v; this.notifyObservers({ @@ -54,7 +54,7 @@ export class GraphTypeSelectComponent implements IObservable { } public get label() { - return this.intlService.localizeText("INFO_PARAMFIELD_GRAPH_TYPE"); + return this.intlService.localizeText("INFO_PARAMFIELD_CHART_TYPE"); } // interface IObservable diff --git a/src/app/components/results-graph/results-graph.component.html b/src/app/components/results-chart/results-chart.component.html similarity index 93% rename from src/app/components/results-graph/results-graph.component.html rename to src/app/components/results-chart/results-chart.component.html index d27357a5e101741950d26cdde8409611d6e989a1..7b95757ae948e592f0f80b90739f18a39c5384d2 100644 --- a/src/app/components/results-graph/results-graph.component.html +++ b/src/app/components/results-chart/results-chart.component.html @@ -1,6 +1,6 @@ -<div class="graph-results-container" #graphResults fxLayout="row wrap" fxLayoutAlign="center center"> +<div class="chart-results-container" #graphResults fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> - <div class="graph-results-buttons"> + <div class="chart-results-buttons"> <button mat-icon-button (click)="resetZoom()" [disabled]="! zoomWasChanged" [title]="uitextResetZoomTitle"> <mat-icon color="primary">replay</mat-icon> </button> @@ -21,7 +21,7 @@ </div> </div> -<graph-type></graph-type> +<chart-type></chart-type> <div class="select-x-y-axis" fxLayout="row wrap" fxLayoutAlign="space-between start"> <mat-form-field fxFlex.gt-xs="1 0 auto" fxFlex.lt-sm="1 0 100%"> diff --git a/src/app/components/results-graph/results-graph.component.scss b/src/app/components/results-chart/results-chart.component.scss similarity index 92% rename from src/app/components/results-graph/results-graph.component.scss rename to src/app/components/results-chart/results-chart.component.scss index 4eab50fee6ca30b52c952b3aed76d350a987e95f..732889c5e8e2cfa2e0b131be398fdcd1135ae457 100644 --- a/src/app/components/results-graph/results-graph.component.scss +++ b/src/app/components/results-chart/results-chart.component.scss @@ -1,9 +1,9 @@ -.graph-results-container{ +.chart-results-container{ display: block; background-color: white; } -.graph-results-buttons { +.chart-results-buttons { padding-right: 10px; padding-top: 4px; margin-bottom: -30px; diff --git a/src/app/components/results-graph/results-graph.component.ts b/src/app/components/results-chart/results-chart.component.ts similarity index 91% rename from src/app/components/results-graph/results-graph.component.ts rename to src/app/components/results-chart/results-chart.component.ts index 420583a3304c54ce1fcd8d37667118409d0d8bbb..0560e343fd1bcbab8650141f7bd03ee691ae05d3 100644 --- a/src/app/components/results-graph/results-graph.component.ts +++ b/src/app/components/results-chart/results-chart.component.ts @@ -4,23 +4,23 @@ import { ChartComponent } from "angular2-chartjs"; import { Observer, ParamFamily } from "jalhyd"; -import { GraphTypeSelectComponent } from "./graph-type.component"; +import { ChartTypeSelectComponent } from "./chart-type.component"; import { I18nService } from "../../services/internationalisation.service"; import { PlottableData } from "../../results/plottable-data"; -import { GraphType } from "../../results/graph-type"; +import { ChartType } from "../../results/chart-type"; import { ResultsComponent } from "../fixedvar-results/results.component"; import { IYSeries } from "../../results/y-series"; import { VarResults } from "../../results/var-results"; import { fv } from "../../util"; @Component({ - selector: "results-graph", - templateUrl: "./results-graph.component.html", + selector: "results-chart", + templateUrl: "./results-chart.component.html", styleUrls: [ - "./results-graph.component.scss" + "./results-chart.component.scss" ] }) -export class ResultsGraphComponent extends ResultsComponent implements AfterContentInit, Observer { +export class ResultsChartComponent extends ResultsComponent implements AfterContentInit, Observer { @ViewChild(ChartComponent, { static: false }) private chartComponent; @@ -32,8 +32,8 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont private _zoomWasChanged = false; - @ViewChild(GraphTypeSelectComponent, { static: true }) // true, or else adding observer will fail in ngAfterContentInit() - private _graphTypeComponent: GraphTypeSelectComponent; + @ViewChild(ChartTypeSelectComponent, { static: true }) // true, or else adding observer will fail in ngAfterContentInit() + private _graphTypeComponent: ChartTypeSelectComponent; /* * config du graphe @@ -105,7 +105,7 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont public get availableYAxis() { if (this._results) { - if (this._results.graphType !== GraphType.Scatter) { + if (this._results.graphType !== ChartType.Scatter) { // do not use real Y axis (that include families), if chart cannot display multiple series return this._results.getAvailableXAxis(); } else { @@ -152,11 +152,11 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont } public get uitextSelectX() { - return this.intlService.localizeText("INFO_PARAMFIELD_GRAPH_SELECT_X_AXIS"); + return this.intlService.localizeText("INFO_PARAMFIELD_CHART_SELECT_X_AXIS"); } public get uitextSelectY() { - return this.intlService.localizeText("INFO_PARAMFIELD_GRAPH_SELECT_Y_AXIS"); + return this.intlService.localizeText("INFO_PARAMFIELD_CHART_SELECT_Y_AXIS"); } public zoomComplete() { @@ -171,19 +171,19 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont public updateView() { // (re)generate chart switch (this._graphTypeComponent.selectedValue) { - case GraphType.Histogram: + case ChartType.Histogram: this.graph_type = "bar"; - this.generateBarGraph(); + this.generateBarChart(); break; - case GraphType.Dots: + case ChartType.Dots: this.graph_type = "line"; - this.generateLineGraph(); + this.generateLineChart(); break; default: this.graph_type = "scatter"; - this.generateScatterGraph(); + this.generateScatterChart(); break; } } @@ -223,7 +223,7 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont /** * génère les données d'un graphe de type "bar" */ - private generateBarGraph() { + private generateBarChart() { const labs = []; const dat = []; const xSeries = this._results.getValuesSeries(this.chartX); @@ -300,9 +300,9 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont /** * génère les données d'un graphe de type "line" */ - private generateLineGraph() { - // same as bar graph (histogram) - this.generateBarGraph(); + private generateLineChart() { + // same as bar chart (histogram) + this.generateBarChart(); // override style this.graph_data.datasets[0].backgroundColor = "rgba(0,0,0,0)"; // fill color under the line : transparent this.graph_data.datasets[0].borderColor = ResultsComponent.distinctColors[0]; @@ -312,7 +312,7 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont /** * génère les données d'un graphe de type "scatter" */ - private generateScatterGraph() { + private generateScatterChart() { this.graph_data = { datasets: [] }; @@ -461,25 +461,25 @@ export class ResultsGraphComponent extends ResultsComponent implements AfterCont } public get uitextResetZoomTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_RESET_ZOOM"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_RESET_ZOOM"); } public get uitextExportImageTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXPORT_IMAGE"); } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } // interface Observer update(sender: any, data: any) { - if (sender instanceof GraphTypeSelectComponent) { + if (sender instanceof ChartTypeSelectComponent) { if (data.action === "graphTypeChanged") { this._results.graphType = data.value; } diff --git a/src/app/components/section-results/section-results.component.ts b/src/app/components/section-results/section-results.component.ts index e3aeb50834cf1d043ff584296c3fe066686102a5..3ab72436e9d7d8aad9b340affd720164553ad174 100644 --- a/src/app/components/section-results/section-results.component.ts +++ b/src/app/components/section-results/section-results.component.ts @@ -176,14 +176,14 @@ export class SectionResultsComponent extends ResultsComponent implements DoCheck } public get uitextExportImageTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXPORT_IMAGE"); } public get uitextEnterFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_ENTER_FS"); } public get uitextExitFSTitle() { - return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + return this.intlService.localizeText("INFO_CHART_BUTTON_TITLE_EXIT_FS"); } } diff --git a/src/app/formulaire/definition/form-compute-courbe-remous.ts b/src/app/formulaire/definition/form-compute-courbe-remous.ts index e86f9e8cf95f2213bad4a824bfe6f60d29c5c5f0..230beaf55e9de9e1024c393e9a1adbcaf3d65bf1 100644 --- a/src/app/formulaire/definition/form-compute-courbe-remous.ts +++ b/src/app/formulaire/definition/form-compute-courbe-remous.ts @@ -46,9 +46,9 @@ export class FormComputeCourbeRemous extends FormCompute { this.remousResults.hauteurNormale = this.resultYn.resultElement; this.remousResults.hauteurCritique = this.resultYc.resultElement; if (this.remousResults.extraParamSymbol) { - this.remousResults.extraGraph = ["Hs", "Hsc", "Yf", "Yt", "Yco"].indexOf(this.remousResults.extraParamSymbol) === -1; + this.remousResults.extraChart = ["Hs", "Hsc", "Yf", "Yt", "Yco"].indexOf(this.remousResults.extraParamSymbol) === -1; } else { - this.remousResults.extraGraph = false; + this.remousResults.extraChart = false; } } } diff --git a/src/app/formulaire/definition/form-result-fixedvar.ts b/src/app/formulaire/definition/form-result-fixedvar.ts index dbc56f6c29871bb28bad8325e82858b9f57f651e..93d6bc985c0037c057ac63dc0482d572a4671df9 100644 --- a/src/app/formulaire/definition/form-result-fixedvar.ts +++ b/src/app/formulaire/definition/form-result-fixedvar.ts @@ -4,7 +4,7 @@ import { ParamRadioConfig } from "../ngparam"; import { FormResult } from "./form-result"; import { FormulaireDefinition } from "./form-definition"; import { CalculatorResults } from "../../results/calculator-results"; -import { GraphType } from "../../results/graph-type"; +import { ChartType } from "../../results/chart-type"; export class FormResultFixedVar extends FormResult { /** @@ -47,7 +47,7 @@ export class FormResultFixedVar extends FormResult { } } - public set graphType(t: GraphType) { + public set graphType(t: ChartType) { this._varResults.graphType = t; } diff --git a/src/app/results/graph-type.ts b/src/app/results/chart-type.ts similarity index 88% rename from src/app/results/graph-type.ts rename to src/app/results/chart-type.ts index 67d5dcf572411072d7fee379f216bf48dab56d11..b36c9c180b57c1d54f40514ae7b70b15f9f55299 100644 --- a/src/app/results/graph-type.ts +++ b/src/app/results/chart-type.ts @@ -1,7 +1,7 @@ /** * type de graphe */ -export enum GraphType { +export enum ChartType { /** * histogramme */ diff --git a/src/app/results/plottable-data.ts b/src/app/results/plottable-data.ts index a9a65fa997667f325ec293f1e952c7aea5029dbf..35da1e4d9336e5fcac09c0586d39bef974a56b2e 100644 --- a/src/app/results/plottable-data.ts +++ b/src/app/results/plottable-data.ts @@ -1,11 +1,11 @@ -import { GraphType } from "./graph-type"; +import { ChartType } from "./chart-type"; /** - * Une interface pour nourrir un ResultsGraphComponent + * Une interface pour nourrir un ResultsChartComponent */ export interface PlottableData { - graphType: GraphType; + graphType: ChartType; chartX: string; chartY: string; diff --git a/src/app/results/plottable-macrorugo-compound-results.ts b/src/app/results/plottable-macrorugo-compound-results.ts index 07c0c18d7947aefe9c75a66134da95e0000710e7..1731fab6cc4aa7d9518c6e1c2076c1d0bba95a6b 100644 --- a/src/app/results/plottable-macrorugo-compound-results.ts +++ b/src/app/results/plottable-macrorugo-compound-results.ts @@ -1,10 +1,10 @@ import { PlottableData } from "./plottable-data"; -import { GraphType } from "./graph-type"; +import { ChartType } from "./chart-type"; import { MacrorugoCompoundResults } from "./macrorugo-compound-results"; export class PlottableMacrorugoCompoundResults implements PlottableData { - public graphType: GraphType = GraphType.Scatter; + public graphType: ChartType = ChartType.Scatter; public chartX: string; public chartY: string; diff --git a/src/app/results/plottable-pab-results.ts b/src/app/results/plottable-pab-results.ts index f697ecac0e648037d23239ef4e912bf3f084afcc..7f52a57173d190f21b414f9dc0d47aed40bb6ba3 100644 --- a/src/app/results/plottable-pab-results.ts +++ b/src/app/results/plottable-pab-results.ts @@ -1,11 +1,11 @@ import { PlottableData } from "./plottable-data"; import { PabResults } from "./pab-results"; -import { GraphType } from "./graph-type"; +import { ChartType } from "./chart-type"; import { ServiceFactory } from "../services/service-factory"; export class PlottablePabResults implements PlottableData { - public graphType: GraphType = GraphType.Scatter; + public graphType: ChartType = ChartType.Scatter; public chartX: string; public chartY: string; diff --git a/src/app/results/remous-results.ts b/src/app/results/remous-results.ts index e017479099ef8f53e14485a6988d0c7ba1305dd9..acb80ff6883789e4ee85e72f0b12202d4d912a80 100644 --- a/src/app/results/remous-results.ts +++ b/src/app/results/remous-results.ts @@ -52,7 +52,7 @@ export class RemousResults extends CalculatorResults { /** * le paramètre supplémentaire est affiché dans un graphe séparé */ - private _extraGraph: boolean; + private _extraChart: boolean; /** * titre de la colonne du paramètre supplémentaire @@ -80,7 +80,7 @@ export class RemousResults extends CalculatorResults { this._hasFlu = false; this._hasTor = false; this._hasExtra = false; - this._extraGraph = false; + this._extraChart = false; } public set parameters(p: CourbeRemousParams) { @@ -192,12 +192,12 @@ export class RemousResults extends CalculatorResults { return this._hasExtra; } - public get extraGraph() { - return this._extraGraph; + public get extraChart() { + return this._extraChart; } - public set extraGraph(b: boolean) { - this._extraGraph = b; + public set extraChart(b: boolean) { + this._extraChart = b; } public get hasResults(): boolean { diff --git a/src/app/results/var-results.ts b/src/app/results/var-results.ts index 132ae82341b247e6278bd8fdefa87f46dbe501b8..47a49e5f18f6d0a152fefb770a0caa5bb4dd0a66 100644 --- a/src/app/results/var-results.ts +++ b/src/app/results/var-results.ts @@ -4,7 +4,7 @@ import { NgParameter } from "../formulaire/ngparam"; import { ResultElement, ParamFamily, capitalize } from "jalhyd"; import { ServiceFactory } from "../services/service-factory"; import { PlottableData } from "./plottable-data"; -import { GraphType } from "./graph-type"; +import { ChartType } from "./chart-type"; import { sprintf } from "sprintf-js"; @@ -32,7 +32,7 @@ export class VarResults extends CalculatedParamResults implements PlottableData /** * type de graphe */ - protected _graphType: GraphType = GraphType.Scatter; + protected _graphType: ChartType = ChartType.Scatter; /** * variated parameter or result displayed as chart's X-axis @@ -92,11 +92,11 @@ export class VarResults extends CalculatedParamResults implements PlottableData return this._resultHeaders; } - public get graphType(): GraphType { + public get graphType(): ChartType { return this._graphType; } - public set graphType(gt: GraphType) { + public set graphType(gt: ChartType) { this._graphType = gt; this.resetDefaultAxisIfNeeded(); } @@ -229,12 +229,12 @@ export class VarResults extends CalculatedParamResults implements PlottableData } /** - * Same as X axis, plus results families if graph type is Scatter + * Same as X axis, plus results families if chart type is Scatter * (for multi-series comparison) */ public getAvailableYAxis(): string[] { const res: string[] = this.getAvailableXAxis(); - if (this._graphType === GraphType.Scatter) { + if (this._graphType === ChartType.Scatter) { // add families having more than 1 variable as plottable ordinates const families = this.extractFamilies(); for (const f in families) { @@ -387,7 +387,7 @@ export class VarResults extends CalculatedParamResults implements PlottableData } /** - * When variable parameter or graph type changes, ensure the X / Y current values are still available + * When variable parameter or chart type changes, ensure the X / Y current values are still available */ public resetDefaultAxisIfNeeded() { if (! this.getAvailableXAxis().includes(this.chartX)) { diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 51b4eb4c8ebcec3e542966e833c44c97f4de9a75..f274b57d0bae8e5c903936fd5cec78b6b67145e8 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -118,10 +118,10 @@ "INFO_ENUM_STRUCTUREJETTYPE_0": "Not applicable", "INFO_ENUM_STRUCTUREJETTYPE_1": "Diving", "INFO_ENUM_STRUCTUREJETTYPE_2": "Surface", - "INFO_GRAPH_BUTTON_TITLE_RESET_ZOOM": "Restore default zoom", - "INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE": "Save picture", - "INFO_GRAPH_BUTTON_TITLE_ENTER_FS": "Display fullscreen", - "INFO_GRAPH_BUTTON_TITLE_EXIT_FS": "Exit fullscreen mode", + "INFO_CHART_BUTTON_TITLE_RESET_ZOOM": "Restore default zoom", + "INFO_CHART_BUTTON_TITLE_EXPORT_IMAGE": "Save picture", + "INFO_CHART_BUTTON_TITLE_ENTER_FS": "Display fullscreen", + "INFO_CHART_BUTTON_TITLE_EXIT_FS": "Exit fullscreen mode", "INFO_DEVICE_ADDED": "1 device added", "INFO_DEVICE_ADDED_N_TIMES": "%s devices added", "INFO_DEVICE_COPIED": "Device #%s copied", @@ -337,11 +337,11 @@ "INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Boundary conditions", "INFO_PARAMFIELD_CALCULATED": "Calculated", "INFO_PARAMFIELD_CALCULATION_FAILED": "Calculation failed", - "INFO_PARAMFIELD_GRAPH_SELECT_X_AXIS": "Variable for X axis", - "INFO_PARAMFIELD_GRAPH_SELECT_Y_AXIS": "Variable for Y axis", - "INFO_PARAMFIELD_GRAPH_TYPE_HISTOGRAM": "Histogram", - "INFO_PARAMFIELD_GRAPH_TYPE_DOTS": "Plot", - "INFO_PARAMFIELD_GRAPH_TYPE": "Graph type", + "INFO_PARAMFIELD_CHART_SELECT_X_AXIS": "Variable for X axis", + "INFO_PARAMFIELD_CHART_SELECT_Y_AXIS": "Variable for Y axis", + "INFO_PARAMFIELD_CHART_TYPE_HISTOGRAM": "Histogram", + "INFO_PARAMFIELD_CHART_TYPE_DOTS": "Plot", + "INFO_PARAMFIELD_CHART_TYPE": "Chart type", "INFO_PARAMFIELD_IN_CALCULATION_INITIAL_VALUE": "initial value", "INFO_PARAMFIELD_IN_CALCULATION": "In calculation", "INFO_PARAMFIELD_PARAMCALCULER": "Calculate", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 8b7cddc9a88cfa18bf72a0876a16a87618a063a7..4b72d9007e4655cea1aeba3a16ce8c30aac8cb72 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -118,10 +118,10 @@ "INFO_ENUM_STRUCTUREJETTYPE_0": "Sans objet", "INFO_ENUM_STRUCTUREJETTYPE_1": "Plongeant", "INFO_ENUM_STRUCTUREJETTYPE_2": "De surface", - "INFO_GRAPH_BUTTON_TITLE_RESET_ZOOM": "Réinitialiser le zoom", - "INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE": "Enregistrer l'image", - "INFO_GRAPH_BUTTON_TITLE_ENTER_FS": "Afficher en plein écran", - "INFO_GRAPH_BUTTON_TITLE_EXIT_FS": "Sortir du mode plein écran", + "INFO_CHART_BUTTON_TITLE_RESET_ZOOM": "Réinitialiser le zoom", + "INFO_CHART_BUTTON_TITLE_EXPORT_IMAGE": "Enregistrer l'image", + "INFO_CHART_BUTTON_TITLE_ENTER_FS": "Afficher en plein écran", + "INFO_CHART_BUTTON_TITLE_EXIT_FS": "Sortir du mode plein écran", "INFO_DEVICE_ADDED": "1 ouvrage ajouté", "INFO_DEVICE_ADDED_N_TIMES": "%s ouvrages ajoutés", "INFO_DEVICE_COPIED": "Ouvrage n°%s copié", @@ -336,11 +336,11 @@ "INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Conditions aux limites", "INFO_PARAMFIELD_CALCULATED": "Calculé", "INFO_PARAMFIELD_CALCULATION_FAILED": "Échec du calcul", - "INFO_PARAMFIELD_GRAPH_SELECT_X_AXIS": "Variable en abscisse", - "INFO_PARAMFIELD_GRAPH_SELECT_Y_AXIS": "Variable en ordonnée", - "INFO_PARAMFIELD_GRAPH_TYPE_HISTOGRAM": "Histogramme", - "INFO_PARAMFIELD_GRAPH_TYPE_DOTS": "Points", - "INFO_PARAMFIELD_GRAPH_TYPE": "Type de graphe", + "INFO_PARAMFIELD_CHART_SELECT_X_AXIS": "Variable en abscisse", + "INFO_PARAMFIELD_CHART_SELECT_Y_AXIS": "Variable en ordonnée", + "INFO_PARAMFIELD_CHART_TYPE_HISTOGRAM": "Histogramme", + "INFO_PARAMFIELD_CHART_TYPE_DOTS": "Points", + "INFO_PARAMFIELD_CHART_TYPE": "Type de graphe", "INFO_PARAMFIELD_IN_CALCULATION_INITIAL_VALUE": "valeur initiale", "INFO_PARAMFIELD_IN_CALCULATION": "En calcul", "INFO_PARAMFIELD_PARAMCALCULER": "calculer",