Skip to content

Commit

Permalink
Merge pull request #592 from micronutrientsupport/stever-projectionTh…
Browse files Browse the repository at this point in the history
…resholds

Stever projection thresholds
  • Loading branch information
jon571 authored Oct 13, 2021
2 parents 873efc7 + 79410a6 commit 3e56285
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/apiAndObjects/objects/misc/chartjsObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface ChartJSObject {
annotation?: {
annotations: Array<{
type: string;
id: string;
id?: string;
mode: string;
scaleID: string;
value: number; // data-value at which the line is drawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export class HouseholdSupplyComponent implements AfterViewInit {
annotations: [
{
type: 'line',
id: 'vLine',
mode: 'vertical',
scaleID: 'x-axis-0',
value: Number(data.adequacyThreshold), // data-value at which the line is drawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ export class BiomarkerInfoComponent implements AfterViewInit {
annotations: [
{
type: 'line',
id: 'defLine',
mode: 'vertical',
scaleID: 'x-axis-0',
value: this.defThreshold,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export class StatusChartComponent implements AfterViewInit {
annotations: [
{
type: 'line',
id: 'defLine',
mode: 'horizontal',
scaleID: 'y-axis-0',
value: this.defThreshold,
Expand All @@ -106,7 +105,6 @@ export class StatusChartComponent implements AfterViewInit {
},
{
type: 'line',
id: 'abnLine',
mode: 'horizontal',
scaleID: 'y-axis-0',
value: this.abnThreshold,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ export class ProjectionAvailabilityComponent implements AfterViewInit {
);
this.errorSrc.next(false);
this.chartData = null;
// force change detection to:
// remove chart before re-setting it to stop js error
this.cdr.detectChanges();

this.initialiseGraph(filteredData);

// show table and init paginator and sorter
Expand Down Expand Up @@ -259,7 +257,6 @@ export class ProjectionAvailabilityComponent implements AfterViewInit {
annotations: [
{
type: 'line',
id: 'defLine',
mode: 'horizontal',
scaleID: 'y-axis-0',
value: this.projectionsSummary.recommended,
Expand All @@ -276,7 +273,6 @@ export class ProjectionAvailabilityComponent implements AfterViewInit {
},
},
};

this.chartData = generatedChart;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const chartForRender: ChartJSObject = JSON.parse(JSON.stringify(generatedChart));
Expand Down

0 comments on commit 3e56285

Please sign in to comment.