回复 1楼willian的帖子
1.可以写XMAL代码实现,比如想把X轴改成红线。C1Chart里写如下代码,代码参考:
- <c1:C1Chart.View>
- <c1:ChartView Margin="50 0 0 50">
- <c1:ChartView.Layers>
- <c1:ChartPanel>
- <c1:ChartPanelObject DataPoint="NaN,0" HorizontalAlignment="Stretch">
- <Border BorderBrush="Red" BorderThickness="0,2,0,0" Margin="0,-1,0,0" />
- </c1:ChartPanelObject>
- </c1:ChartPanel>
- </c1:ChartView.Layers>
- </c1:ChartView>
- </c1:C1Chart.View>
复制代码
文档参考:http://helpcentral.componentone. ... arkersandlabels.htm
2.请参考博客上的文章:
http://blog.gcpowertools.com.cn/ ... tElementLoaded.aspx
里面有介绍柱的宽度,对于柱的border的宽度和颜色,代码参考:
- void ds_PlotElementLoaded(object sender, EventArgs e)
- {
- var bar = (Bar)sender;
- bar.StrokeThickness = 0;//每个柱子的border宽度,此处为0
- //bar.Stroke = Brushes.Red;//每个柱子的颜色
- //bar.Width = 10; //每个柱子的宽度
- }
复制代码 |