我想让我的系列点标签显示在图表之外,在该系列的按钮手中(见下图)
现在标签显示在中间:
该系列是一个RangeBar
Pointwidth = 5
,我设置了以下的SmartlabelStyle:
var series2 = new Series
{
Name = "S2",
Color = Color.LightGray,
ChartType = SeriesChartType.RangeBar,
ChartArea = "boo",
YValueType = ChartValueType.Auto,
XValueType = ChartValueType.Auto,
SmartLabelStyle = new SmartLabelStyle
{
AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.Yes,
IsMarkerOverlappingAllowed = false,
MovingDirection = LabelAlignmentStyles.Bottom
}
};
我只是添加一个数据点:
minDate = new DateTime(2016, 01, 01, 00, 00, 00, 000);
// Dummy data
var values2 = new DateTime[6];
values2[0] = minDate.AddMonths(1);
values2[1] = minDate.AddMonths(2);
// Add point.
pointIndex = series2.Points.AddXY(values2[1], values2[2]);
series2.Points[pointIndex].AxisLabel = "Laa";
series2.Points[pointIndex].Label = "Laa";
如何在底部中设置点标签?