制作4双面图/ 4双面格在Visual Studio [英] Making a 4 sided Graph / 4 sided grid In Visual Studio

查看:211
本文介绍了制作4双面图/ 4双面格在Visual Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图做一个片面4图/ 4双面网格,可以显示和连接我设置点

I've been trying to make a 4 sided graph / 4 sided grid that can show and connect points that I set

不过使用工具箱中的图表做因为我无法找到该类型的图形的不行。我怎样才能做一个

However using the Chart in the toolbox did not work as I couldn't find that type of a graph. How can I make one?

示例图:

推荐答案

这是很简单的。所有你需要做的是告诉来代替隧道 code>在某些点上,而不是保持它未设置( NaN的)。

This is quite simple. All you need to do is tell the Chart to place the Crossing of the Axis at certain points, instead of keeping it unset (NaN).

您还应该设置
最小和最高的范围.imgur.com / TG​​pTK.png相对=nofollow>

You also should set the range by setting Minimum and Maximum:

ChartArea CA = chart1.ChartAreas[0];
Series S1 = chart1.Series[0];
S1.ChartType = SeriesChartType.Line;

CA.AxisX.Maximum = 100;
CA.AxisX.Minimum = -100;
CA.AxisY.Maximum = 100;
CA.AxisY.Minimum = -100;

CA.AxisX.Crossing = 0;
CA.AxisY.Crossing = 0;

CA.AxisX.Interval = 10;
CA.AxisY.Interval = 10;

CA.AxisX.LineWidth = 3;
CA.AxisY.LineWidth = 3;

CA.AxisX.MajorGrid.Enabled = false;
CA.AxisY.MajorGrid.Enabled = false;
CA.AxisX.MinorTickMark.Enabled = false;
CA.AxisY.MinorTickMark.Enabled = false;


// now we add a few points:
S1.Points.AddXY(-21,81);
S1.Points.AddXY(52,60);
S1.Points.AddXY(-53, -11);
S1.Points.AddXY(-53, 88);

您可以使用大多数图表类型,虽然不是全部,像馅饼。

You can use most chart types, though not all, like Pie.

您可以玩与许多其他属性,使你想要它的工作; !特别是间隔可能会感兴趣的。

You can play around with many other properties to make it work as you want; especially the Interval may be of interest!

地区其他properies包括这些:

Other properies of interest include these:

CA.AxisX.ArrowStyle = AxisArrowStyle.Triangle;
CA.AxisX.MinorTickMark.Enabled = false;    
CA.AxisX.LabelStyle.Enabled = false;

这篇关于制作4双面图/ 4双面格在Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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