Skip to content

Commit

Permalink
Correct missing values
Browse files Browse the repository at this point in the history
  • Loading branch information
justineatrhea committed Aug 10, 2022
1 parent f7fc2d9 commit abe5068
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Copyright (c) 2022 RHEA System S.A.

<div class="width-100">
<div class="row">
<div class="col-9">
<div class="col-8">
<h3 class="text-align-end">Missing Values</h3>
</div>
<div class="col text-align-start p-0">
Expand Down Expand Up @@ -132,7 +132,7 @@ Copyright (c) 2022 RHEA System S.A.
/// <returns>The number of <see cref="ParameterValueSetBase"> represented in the selected area</returns>
public int NumberData(string criteria, object domain)
{
if(this.Data != null && criteria.Equals("Published Values as Default"))
if(this.Data != null && criteria.Equals("Missing Values"))
{
return this.Data.FindAll(d => d.Owner.ShortName.Equals(domain) && d.Published.Count(el => !el.Equals("-")) == 0).Count;
} else if(this.Data != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Copyright (c) 2022 RHEA System S.A.

<div class="col col-xxl-8">
<DxChart Data="@GetChartData(Data)" CustomizeSeriesPoint="@CustomizeSeriesPoint">
<DxChartDonutSeries Filter="@((DataChart d) => d.Argument != null && (d.Argument.Equals("Published Values as Default") || d.Argument.Equals("Other Values")))"
<DxChartDonutSeries Filter="@((DataChart d) => d.Argument != null && (d.Argument.Equals("Missing Values") || d.Argument.Equals("Complete Values")))"
ValueField="@(d => d.Value)"
ArgumentField="@(d => d.Argument)"
AggregationMethod="Enumerable.Sum">
Expand Down Expand Up @@ -58,10 +58,10 @@ Copyright (c) 2022 RHEA System S.A.
}else if (argument != null && argument.Equals("Publishable Parameters"))
{
settings.PointAppearance.Color = System.Drawing.Color.LightCoral;
} else if (argument != null && argument.Equals("Published Values as Default"))
} else if (argument != null && argument.Equals("Missing Values"))
{
settings.PointAppearance.Color = System.Drawing.Color.DarkSeaGreen;
} else if (argument != null && argument.Equals("Other Values"))
} else if (argument != null && argument.Equals("Complete Values"))
{
settings.PointAppearance.Color = System.Drawing.Color.LightSlateGray;
}
Expand All @@ -87,13 +87,13 @@ Copyright (c) 2022 RHEA System S.A.
donutData.Add(new DataChart()
{
Value = nbDefaultValues,
Argument = "Published Values as Default",
Argument = "Missing Values",
Domain = d.ShortName
});
donutData.Add(new DataChart()
{
Value = domainParameterValueSets.Count - nbDefaultValues,
Argument = "Other Values",
Argument = "Complete Values",
Domain = d.ShortName
});

Expand Down
4 changes: 2 additions & 2 deletions COMETwebapp/Pages/ModelDashboard/ParametersDetails.razor
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ Copyright (c) 2022 RHEA System S.A.
{
parameterValueSets.RemoveAll(p => p.Published.SequenceEqual(p.ActualValue));

} else if (this.Criteria is not null && this.Criteria.Equals("Published Values as Default"))
} else if (this.Criteria is not null && this.Criteria.Equals("Missing Values"))
{
parameterValueSets.RemoveAll(p => p.Published.Count(el => !el.Equals("-")) != 0);

} else if (this.Criteria is not null && this.Criteria.Equals("Other Values"))
} else if (this.Criteria is not null && this.Criteria.Equals("Complete Values"))
{
parameterValueSets.RemoveAll(p => p.Published.Count(el => !el.Equals("-")) == 0);
}
Expand Down

0 comments on commit abe5068

Please sign in to comment.