BETA版本 75 总数: 15 总分: 15 中位: 15 方差: 15 成绩的整体分布情况 类型分布 课时分布 @code { public double[] data = { 25, 77, 28, 5 }; public string[] labels = { "Oil", "Coal", "Gas", "Biomass" }; private AxisChartOptions _axisChartOptions = new AxisChartOptions { }; private ChartOptions options = new ChartOptions { InterpolationOption = InterpolationOption.NaturalSpline, YAxisFormat = "c2", ShowLegend = false, YAxisLines = false, XAxisLines = false, XAxisLabelPosition = XAxisLabelPosition.None, YAxisLabelPosition = YAxisLabelPosition.None, YAxisTicks = 100, ShowLabels = false, ShowLegendLabels = false }; public List Series = new List() { new ChartSeries() { Name = "类型错误数量分布", Data = new double[] { 35, 41, 35, 51, 49, 62, 69, 91, 148 } }, new ChartSeries() { Name = "类型错误成绩分布", Data = new double[] { 55, 21, 45, 11, 45, 23, 11, 56, 13 } }, }; public string[] XAxisLabels = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep" }; Random random = new Random(); protected override void OnInitialized() { options.InterpolationOption = InterpolationOption.NaturalSpline; options.YAxisFormat = "c2"; options.ShowLegend = false; options.YAxisLines = false; options.XAxisLines = false; options.XAxisLabelPosition = XAxisLabelPosition.None; options.YAxisLabelPosition = YAxisLabelPosition.None; options.ShowLabels = false; options.ShowLegendLabels = false; options.LineStrokeWidth = 1; _axisChartOptions.MatchBoundsToSize = true; Series[0].LineDisplayType = LineDisplayType.Area; } private IReadOnlyCollection _selected; private void HandleSelectedValuesChanged(IReadOnlyCollection selected) { Series.ForEach(x => x.Visible = false); foreach(var item in selected) { var sv = Series.FirstOrDefault(predicate: x => x.Name == item); if(sv != null) { sv.Visible = true; } } } }