Nevron Chart for .NET控件条形图居左的方法
运用Nevron Chart for .NET生成图表时,我想使条形图向左对齐,使图像右边有空隙,左边没有空隙,但是我找不到改变条形图对齐的属性或者方法,我该怎么办?
您需要设置栏宽度为100%,然后使X轴的视图范围膨胀,代码如下:
NChart chart = nChartControl1.Charts[0];
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.InflateMargins = false;
bar.WidthPercent = 100;
chart.Series.Add(bar);
NOrdinalScaleConfigurator scale = new NOrdinalScaleConfigurator();
scale.InflateViewRangeBegin = false;
scale.InflateViewRangeEnd = true;
scale.ViewRangeInflateMode = ScaleViewRangeInflateMode.Absolute;
scale.AbsoluteInflate = new NRange1DL(0, 15);
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = scale;
控件中国网提供Nevron Chart for .NET的试用版下载及Nevron Chart for .NET产品销售
试用版请点击:
购买该产品请联系:控件中国网 023- 6787 0900