回答編集履歴
1
見直しキャンペーン中
test
CHANGED
@@ -1,149 +1,75 @@
|
|
1
1
|
> スタート地点を変えて左0度や右0度にしたり
|
2
|
-
|
3
2
|
> 左周りにしたりすることは出来ないのでしょうか?
|
4
|
-
|
5
|
-
|
6
3
|
|
7
4
|
元データは変えてはいけないという前提なんですよね?(いじっていいのならラベルを変えればどうにでもなってしまうので)
|
8
5
|
|
9
|
-
|
10
|
-
|
11
6
|
回転は、`IntervalOffset`等をあれこれいじっていたらできました。
|
12
|
-
|
13
|
-
|
14
7
|
|
15
8
|
反対周りは、`Polar`は`AxisX.IsReversed = true`が効かないようなので難しそうです。
|
16
9
|
|
17
|
-
|
18
|
-
|
19
10
|
[Axis.IntervalOffset プロパティ (System.Windows.Forms.DataVisualization.Charting) | Microsoft Docs](https://docs.microsoft.com/ja-jp/dotnet/api/system.windows.forms.datavisualization.charting.axis.intervaloffset)
|
20
|
-
|
21
11
|
[Axis.Maximum プロパティ (System.Windows.Forms.DataVisualization.Charting) | Microsoft Docs](https://docs.microsoft.com/ja-jp/dotnet/api/system.windows.forms.datavisualization.charting.axis.maximum)
|
22
|
-
|
23
12
|
[Axis.Minimum プロパティ (System.Windows.Forms.DataVisualization.Charting) | Microsoft Docs](https://docs.microsoft.com/ja-jp/dotnet/api/system.windows.forms.datavisualization.charting.axis.minimum)
|
24
13
|
|
25
|
-
|
26
|
-
|
27
|
-
```
|
14
|
+
```cs
|
28
|
-
|
29
15
|
using System.Windows.Forms;
|
30
|
-
|
31
16
|
using System.Windows.Forms.DataVisualization.Charting;
|
32
17
|
|
33
|
-
|
34
|
-
|
35
18
|
namespace Questions356436
|
36
|
-
|
37
19
|
{
|
38
|
-
|
39
20
|
public partial class Form1 : Form
|
40
|
-
|
41
21
|
{
|
42
|
-
|
43
22
|
public Form1()
|
44
|
-
|
45
23
|
{
|
46
|
-
|
47
24
|
InitializeComponent();
|
48
25
|
|
49
|
-
|
50
|
-
|
51
26
|
var panel = new TableLayoutPanel
|
52
|
-
|
53
27
|
{
|
54
|
-
|
55
28
|
Dock = DockStyle.Fill,
|
56
|
-
|
57
29
|
ColumnCount = 3,
|
58
|
-
|
59
30
|
};
|
60
|
-
|
61
31
|
panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33333F));
|
62
|
-
|
63
32
|
panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33333F));
|
64
|
-
|
65
33
|
panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33333F));
|
66
|
-
|
67
34
|
Controls.Add(panel);
|
68
35
|
|
69
36
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
37
|
var chart1 = new Chart { Dock = DockStyle.Fill, };
|
74
|
-
|
75
38
|
chart1.Titles.Add(new Title("ノーマル"));
|
76
|
-
|
77
39
|
chart1.ChartAreas.Add(new ChartArea());
|
78
|
-
|
79
40
|
chart1.Series.Add(new Series { ChartType = SeriesChartType.Polar, BorderWidth = 3, });
|
80
|
-
|
81
41
|
panel.Controls.Add(chart1, 0, 0);
|
82
42
|
|
83
|
-
|
84
|
-
|
85
43
|
var chart2 = new Chart { Dock = DockStyle.Fill, };
|
86
|
-
|
87
44
|
chart2.Titles.Add(new Title("右90度回転"));
|
88
|
-
|
89
45
|
chart2.ChartAreas.Add(new ChartArea());
|
90
|
-
|
91
46
|
chart2.Series.Add(new Series { ChartType = SeriesChartType.Polar, BorderWidth = 3, });
|
92
|
-
|
93
47
|
panel.Controls.Add(chart2, 1, 0);
|
94
48
|
|
95
|
-
|
96
|
-
|
97
49
|
var chart3 = new Chart { Dock = DockStyle.Fill, };
|
98
|
-
|
99
50
|
chart3.Titles.Add(new Title("左90度回転"));
|
100
|
-
|
101
51
|
chart3.ChartAreas.Add(new ChartArea());
|
102
|
-
|
103
52
|
chart3.Series.Add(new Series { ChartType = SeriesChartType.Polar, BorderWidth = 3, });
|
104
|
-
|
105
53
|
panel.Controls.Add(chart3, 2, 0);
|
106
54
|
|
107
55
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
56
|
for (var i = 0; i <= 360; i += 30)
|
112
|
-
|
113
57
|
{
|
114
|
-
|
115
58
|
chart1.Series[0].Points.AddXY(i, 10 + i / 30);
|
116
|
-
|
117
59
|
chart2.Series[0].Points.AddXY(i, 10 + i / 30);
|
118
|
-
|
119
60
|
chart3.Series[0].Points.AddXY(i, 10 + i / 30);
|
120
|
-
|
121
61
|
}
|
122
62
|
|
123
|
-
|
124
|
-
|
125
63
|
chart2.ChartAreas[0].AxisX.IntervalOffset = -90; // 直感と符号が逆
|
126
|
-
|
127
64
|
chart2.ChartAreas[0].AxisX.Minimum = -chart2.ChartAreas[0].AxisX.IntervalOffset;
|
128
|
-
|
129
65
|
chart2.ChartAreas[0].AxisX.Maximum = chart2.ChartAreas[0].AxisX.Minimum + 360;
|
130
66
|
|
131
|
-
|
132
|
-
|
133
67
|
chart3.ChartAreas[0].AxisX.IntervalOffset = -270;
|
134
|
-
|
135
68
|
chart3.ChartAreas[0].AxisX.Minimum = -chart3.ChartAreas[0].AxisX.IntervalOffset;
|
136
|
-
|
137
69
|
chart3.ChartAreas[0].AxisX.Maximum = chart3.ChartAreas[0].AxisX.Minimum + 360;
|
138
|
-
|
139
70
|
}
|
140
|
-
|
141
71
|
}
|
142
|
-
|
143
72
|
}
|
144
|
-
|
145
73
|
```
|
146
74
|
|
147
|
-
|
148
|
-
|
149
75
|
![アプリ画像](8f149daf34f238156cbab232ddbff1bb.png)
|