I am using MSChart in Visual Studio 2013 and am getting some really weird results. On a line chart, when graphing the points, the labels show lower valued points as higher on the chart, which is visually confusing. See the following:
The chart labels are set as follows:
recentFailureChart.Series["FailureCount"].BorderWidth = 3;
recentFailureChart.Series["FailureCount"].Color = Color.Red;
recentFailureChart.Series["FailureCount"].LabelBackColor = Color.Red;
recentFailureChart.Series["FailureCount"].LabelBorderColor = Color.Black;
recentFailureChart.Series["FailureCount"].LabelBorderDashStyle = ChartDashStyle.Solid;
recentFailureChart.Series["FailureCount"].LabelBorderWidth = 1;
recentFailureChart.Series["FailureCount"].LabelForeColor = Color.White;
SmartLabelStyle smartLabel = new SmartLabelStyle();
smartLabel.AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.Partial;
smartLabel.IsMarkerOverlappingAllowed = true;
recentFailureChart.Series["FailureCount"].SmartLabelStyle = smartLabel;
in the constructor and in the function adding the points:
recentFailureChart.Series["FailureCount"].Points.InsertY(0, failCount);
recentFailureChart.Series["FailureCount"].Points[0].Font = labelFont;
Any ideas on how to get them in the correct order, or even over the points themselves?
Aucun commentaire:
Enregistrer un commentaire