CollapsibleSpaceThreshold有什么影响 [英] What 's effect about CollapsibleSpaceThreshold

查看:100
本文介绍了CollapsibleSpaceThreshold有什么影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的所有

Dear all
about article
 is described in the following article
This property is measured as a percentage of the Y-axis scale.By default, its value is set to 25.This means that data points in a series that have a difference of at least 25% of the scale will be collapsed with a scale break.

我尝试在c#建筑物中工作,但不知道大约有25%,40%的效果

i try in c# building ,but don't know What effect  about 25% , 40%

代码:
chart1.ChartAreas ["Default"].AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold = 25;

code:
chart1.ChartAreas["Default"].AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold = 25;

推荐答案

AxisScaleBreakStyle.CollapsibleSpaceThreshold属性代表图表上绘制比例尺中断的空间阈值.

AxisScaleBreakStyle.CollapsibleSpaceThreshold Property represents the threshold of space on the chart at which scale breaks are drawn.

这里是MSDN的示例,我们可以进行测试.

Here is the sample from MSDN, we can have a test.

private void AddChartData()
{
   chart1.Series["Series1"].Points.Add(new DataPoint(1, 2));
   chart1.Series["Series1"].Points.Add(new DataPoint(2, 4));
   chart1.Series["Series1"].Points.Add(new DataPoint(3, 400000));
   chart1.Series["Series1"].Points.Add(new DataPoint(4, 3));
}

private void AddScaleBreaks()
{
   // Enable scale breaks.
   chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.Enabled = true;

   // Show scale break if more than 25% of the chart is empty space.
   chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold = 25;

   // Set the line width of the scale break.
   chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.LineWidth = 2;

   // Set the color of the scale break.
   chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.LineColor = Color.Red;

   // If all data points are significantly far from zero, the chart will calculate the scale minimum value.
   chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.StartFromZero = StartFromZero.Auto;

   // Set the spacing gap between the lines of the scale break (as a percentage of the Y-axis).
    chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.Spacing = 2;
}


这是我的测试屏幕截图,它显示比例尺突破图表的25%以上是空白

Here is my test screen capture, It shows scale break more than 25% of the chart is empty space

在单个系列中的数据点范围之间必须有足够的间距,才能绘制刻度线.默认情况下,仅当数据范围之间的间隔至少为图表的25%时,才可以添加刻度线.如果启用除垢功能 但即使数据范围之间有足够的距离,它也不会出现,您可以设置 将 CollapsibleSpaceThreshold 属性的值设置为小于25.

You must have sufficient separation between ranges of data points in a single series to draw a scale break. By default, a scale break can be added only if there is a separation between the data ranges of at least 25% of the chart. If you enable a scale break but it does not appear, even though there is sufficient distance between the data ranges, you can set the CollapsibleSpaceThreshold property to a value less than 25.

例如,我将代码更改如下

For example , I changed code as below

 
            chart1.Series[0].Points.Add(new DataPoint(1, 2));
            chart1.Series[0].Points.Add(new DataPoint(2, 4));
            chart1.Series[0].Points.Add(new DataPoint(3, 4));
            chart1.Series[0].Points.Add(new DataPoint(4, 3));

CollapsibleSpaceThreshold 属性设置为小于25的值.我将其设置为15.

And  set CollapsibleSpaceThreshold property to a value less than 25. I set it 15 instead.

这是我的测试屏幕截图.  

Here is my test screen capture.  


这篇关于CollapsibleSpaceThreshold有什么影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆