teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

見直しキャンペーン中

2023/07/23 05:28

投稿

TN8001
TN8001

スコア10111

answer CHANGED
@@ -1,47 +1,47 @@
1
- 例えばこちらなどはどうでしょうか。
1
+ 例えばこちらなどはどうでしょうか。
2
- [Live Charts](https://lvcharts.net/App/examples/v1/wf/GeoHeatMap)
2
+ [Live Charts](https://lvcharts.net/App/examples/v1/wf/GeoHeatMap)
3
-
3
+
4
- ```C#
4
+ ```cs
5
- using System.Collections.Generic;
5
+ using System.Collections.Generic;
6
- //using System.Drawing;
6
+ //using System.Drawing;
7
- using System.Windows.Forms;
7
+ using System.Windows.Forms;
8
- using System.Windows.Media;
8
+ using System.Windows.Media;
9
- using LiveCharts.WinForms;
9
+ using LiveCharts.WinForms;
10
-
10
+
11
- namespace questions290449
11
+ namespace questions290449
12
- {
12
+ {
13
- public partial class Form1 : Form
13
+ public partial class Form1 : Form
14
- {
14
+ {
15
- public Form1()
15
+ public Form1()
16
- {
16
+ {
17
- InitializeComponent();
17
+ InitializeComponent();
18
-
18
+
19
- var geoMap = new GeoMap
19
+ var geoMap = new GeoMap
20
- {
20
+ {
21
- Dock = DockStyle.Fill,
21
+ Dock = DockStyle.Fill,
22
-
22
+
23
- Source = @"Japan.xml",
23
+ Source = @"Japan.xml",
24
-
24
+
25
- HeatMap = new Dictionary<string, double>
25
+ HeatMap = new Dictionary<string, double>
26
- {
26
+ {
27
- ["1602"] = 100, //Tokyo
27
+ ["1602"] = 100, //Tokyo
28
- ["866"] = 50, //Hokkaido
28
+ ["866"] = 50, //Hokkaido
29
- ["3302"] = 0 //Okinawa
29
+ ["3302"] = 0 //Okinawa
30
- },
30
+ },
31
-
31
+
32
- GradientStopCollection = new GradientStopCollection
32
+ GradientStopCollection = new GradientStopCollection
33
- {
33
+ {
34
- new GradientStop(Colors.Red, 0),
34
+ new GradientStop(Colors.Red, 0),
35
- new GradientStop(Colors.Green, 0.5),
35
+ new GradientStop(Colors.Green, 0.5),
36
- new GradientStop(Colors.Blue, 1),
36
+ new GradientStop(Colors.Blue, 1),
37
- },
37
+ },
38
- };
38
+ };
39
-
39
+
40
- Controls.Add(geoMap);
40
+ Controls.Add(geoMap);
41
- }
41
+ }
42
- }
42
+ }
43
- }
43
+ }
44
- ```
44
+ ```
45
- ![イメージ説明](c17d28b0edf152477fb7c8f7d7b706ab.png)
45
+ ![イメージ説明](c17d28b0edf152477fb7c8f7d7b706ab.png)
46
-
46
+
47
47
  沖縄の位置が気に入らない等あるでしょうが、`Japan.xml`をいじればずらすことは可能だと思います(未確認)