Диаграмма Winforms, как установить положение метки за пределами столбца при обращении - PullRequest
0 голосов
/ 13 января 2020

Я пытаюсь сгенерировать отчет и отобразить его с помощью System.Windows.Forms.DataVisualization.Charting.Chart в приложении windows.

Когда AxisY перевернуто, метка перекрывается со столбцом.

Может ли кто-нибудь помочь мне, как установить положение метки за пределами столбца при обращении?

Chart_out.ChartAreas[0].AxisX.LabelStyle.TruncatedLabels = false; //SetCustomProperty("BarLabelStyle", "Outside");
//Chart_out.Axisx().labels().position("inside");

Chart_out.ChartAreas[0].AxisX.Interval = 1;
Chart_out.ChartAreas[0].AxisX.MajorGrid.LineWidth = 0;
Chart_out.ChartAreas[0].AxisY.MajorGrid.LineWidth = 0;
Chart_out.Series[0].Color = Color.Red;
chart_in.ChartAreas[0].IsSameFontSizeForAllAxes = true;
Chart_out.Series[0].SmartLabelStyle.Enabled = false;
Chart_out.ChartAreas[0].AxisX.LabelStyle.Angle = 45;
//Chart_out.ChartAreas[0].AxisX.LabelStyle.Font = new System.Drawing.Font("Microsoft YaHei UI", 11F, System.Drawing.FontStyle.Bold);
Chart_out.ChartAreas[0].AxisX.LabelStyle.Font = new System.Drawing.Font("Microsoft YaHei UI", 10 F, System.Drawing.FontStyle.Bold);
Chart_out.Series[0].Label = "#VALY";

//Chart_out.Series["Series1"].SmartLabels.Enabled = true;
// Chart_out.Series[0].LabelAngle = 45;
Chart_out.ChartAreas[0].AxisX.PositionToValue(100);
Chart_out.ChartAreas[0].AxisY.IsReversed = true;
Chart_out.Series[0].Points.DataBindXY(X_out, Y_out);
Chart_out.ChartAreas[0].BackImage = "bbs.jpg";

enter image description here

...