{"id":201,"date":"2014-01-12T19:21:09","date_gmt":"2014-01-12T10:21:09","guid":{"rendered":"https:\/\/prg.waou.biz\/?p=201"},"modified":"2018-03-03T08:43:52","modified_gmt":"2018-03-02T23:43:52","slug":"%e3%82%b0%e3%83%a9%e3%83%95","status":"publish","type":"post","link":"https:\/\/prg.waou.biz\/?p=201","title":{"rendered":"\u30b0\u30e9\u30d5"},"content":{"rendered":"\n<pre class=\"lang:default decode:true \" >private void btnSet_Click(object sender, EventArgs e)\r\n        {\r\n\r\n            var series1 = new Series(\"y = x*x\");\r\n            var series2 = new Series(\"y = 5*x+20\");\r\n            for (int x = 1; x &lt; 10; x++)\r\n            {\r\n                series1.Points.AddXY(x, x * x);\r\n                series2.Points.AddXY(x, 5 * x + 20);\r\n            }\r\n        \r\n            \r\n                series1.Color = Color.Red;\r\n                series1.MarkerSize = 15;\r\n                series1.MarkerStyle = MarkerStyle.Diamond;\r\n                series1.IsValueShownAsLabel = true;\r\n                series1.LabelForeColor = Color.Blue;\r\n                series1.ChartType = SeriesChartType.Bar; \/\/ \u30b0\u30e9\u30d5\u5f62\u72b6 \r\n           \r\n         \r\n            \r\n                series2.Color = Color.Blue;\r\n                series2.MarkerColor = Color.Blue;\r\n                series2.MarkerSize = 10;\r\n                series2.MarkerStyle = MarkerStyle.Circle;\r\n                series2.ChartType = SeriesChartType.Bar; \/\/ \u30b0\u30e9\u30d5\u5f62\u72b6\r\n           \r\n           \r\n                SampleChart.Series.Clear();\r\n                SampleChart.Series.Add(series1);\r\n                SampleChart.Series.Add(series2);\r\n                SampleChart.ChartAreas[0].BackColor = Color.LightCyan;\r\n           \r\n           \r\n                Axis ax = SampleChart.ChartAreas[0].AxisX;\r\n                ax.MajorGrid.LineColor = Color.LightGray;\r\n                Axis ay = SampleChart.ChartAreas[0].AxisY;\r\n                ay.MajorGrid.LineColor = Color.LightGray;\r\n           \r\n\r\n        }\r\n\r\n        private void button1_Click(object sender, EventArgs e)\r\n        {\r\n            SampleChart.Series.Clear();\r\n            SampleChart.Titles.Clear();\r\n\r\n            var series = new Series(\"SampleGraph\")\r\n            {\r\n                \/\/ \u5186\u30b0\u30e9\u30d5\u3092\u6307\u5b9a\r\n                ChartType = SeriesChartType.Pie,\r\n\r\n                \/\/ \u8868\u984c\r\n                Label = \"\u5186\u30b0\u30e9\u30d5\",\r\n            };\r\n\r\n            var index = series.Points.AddXY(0, 10);\r\n            series.Points[index].Name = \"A001\";\r\n            series.Points[index].Label = \"A001\";\r\n\r\n            index = series.Points.AddXY(0, 50);\r\n            series.Points[index].Name = \"A002\";\r\n            series.Points[index].Label = \"A002\";\r\n\r\n            index = series.Points.AddXY(0, 40);\r\n            series.Points[index].Name = \"A003\";\r\n            series.Points[index].Label = \"A003\";\r\n\r\n            \/\/ \u5186\u30b0\u30e9\u30d5\u306e\u5206\u5272\r\n            series.Points[index][\"Exploded\"] = \"True\";\r\n\r\n            \/\/ \u5186\u30b0\u30e9\u30d5\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u5f15\u304d\u51fa\u3059\r\n            series.Points[index][\"PieLabelStyle\"] = \"Outside\";\r\n\r\n            \/\/ \u5f15\u304d\u51fa\u3057\u7dda\u306e\u5965\u884c\u304d\r\n            series.Points[index][\"3DLabelLineSize\"] = \"10\";\r\n\r\n            SampleChart.ChartAreas[0].Area3DStyle.Enable3D = true;\r\n\r\n            SampleChart.IsSoftShadows = true;\r\n            SampleChart.Series.Add(series);\r\n            SampleChart.Titles.Add(\"\u5186\u30b0\u30e9\u30d5\u306e\u30b5\u30f3\u30d7\u30eb\");\r\n            \r\n        }\r\n\r\n        private void button2_Click(object sender, EventArgs e)\r\n        {\r\n            \/\/ 1.Series\u306e\u8ffd\u52a0\r\n            SampleChart.Series.Clear();\r\n            SampleChart.Series.Add(\"sin\");\r\n            SampleChart.Series.Add(\"cos\");\r\n\r\n            \/\/ 2.\u30b0\u30e9\u30d5\u306e\u30bf\u30a4\u30d7\u306e\u8a2d\u5b9a\r\n            SampleChart.Series[\"sin\"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;\r\n            SampleChart.Series[\"cos\"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;\r\n\r\n            \/\/ 3.\u5ea7\u6a19\u306e\u5165\u529b\r\n            for (double theta = 0.0; theta &lt;= 2 * Math.PI; theta += Math.PI \/ 360)\r\n            {\r\n                SampleChart.Series[\"sin\"].Points.AddXY(theta, Math.Sin(theta));\r\n                SampleChart.Series[\"cos\"].Points.AddXY(theta, Math.Cos(theta));\r\n            }\r\n\r\n        }\r\n\r\n        private void button3_Click(object sender, EventArgs e)\r\n        {\r\n            string legend = \"\u30b0\u30e9\u30d5\uff11\";\r\n\r\n            SampleChart.Series.Clear();  \/\/\u30b0\u30e9\u30d5\u521d\u671f\u5316\r\n\r\n            SampleChart.Series.Add(legend);  \/\/\u30b0\u30e9\u30d5\u8ffd\u52a0\r\n            \/\/\u30b0\u30e9\u30d5\u306e\u7a2e\u985e\u3092\u6307\u5b9a\uff08Column\u306f\u68d2\u30b0\u30e9\u30d5\uff09\r\n            SampleChart.Series[legend].ChartType = SeriesChartType.Column;\r\n            SampleChart.Series[legend].LegendText = legend;  \/\/\u51e1\u4f8b\u306b\u8868\u793a\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u3092\u6307\u5b9a\r\n\r\n            string[] xValues = new string[] { \"A\", \"B\", \"C\", \"D\", \"E\" };\r\n            int[] yValues = new int[] { 10, 20, 30, 40, 50 };\r\n\r\n            for (int i = 0; i &lt; xValues.Length; i++)\r\n            {\r\n                \/\/\u30b0\u30e9\u30d5\u306b\u8ffd\u52a0\u3059\u308b\u30c7\u30fc\u30bf\u30af\u30e9\u30b9\u3092\u751f\u6210\r\n                DataPoint dp = new DataPoint();\r\n                dp.SetValueXY(xValues[i], yValues[i]);  \/\/X\u3068Y\u306e\u5024\u3092\u8a2d\u5b9a\r\n                dp.IsValueShownAsLabel = true;  \/\/\u30b0\u30e9\u30d5\u306b\u5024\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u6307\u5b9a\r\n                SampleChart.Series[legend].Points.Add(dp);   \/\/\u30b0\u30e9\u30d5\u306b\u30c7\u30fc\u30bf\u8ffd\u52a0\r\n            }\r\n\r\n        }\r\n\r\n        private void button4_Click(object sender, EventArgs e)\r\n        {\r\n            chart1.ChartAreas.Clear();\r\n\r\n            ChartArea a1 = new ChartArea(\"ChartArea1\");\r\n            a1.Area3DStyle.Enable3D = false;\r\n\r\n            a1.BackColor = System.Drawing.Color.FromArgb(255, 255, 192);\r\n\r\n            this.chart1.ChartAreas.Add(a1);\r\n\r\n\r\n            chart1.Series.Clear();\r\n\r\n            chart1.Series.Add(\"Series1\");;\r\n            chart1.Series[\"Series1\"].IsVisibleInLegend = false;\r\n            chart1.Series[\"Series1\"].LegendText = \"\u58f2\u4e0a\u70b9\u6570\";\r\n\r\n            chart1.Series[\"Series1\"].ChartType = SeriesChartType.Column;\r\n\r\n\r\n            chart1.Series[\"Series1\"].BorderWidth = 3;\r\n\r\n\r\n\r\n\r\n            chart1.Series[\"Series1\"].Color = Color.Blue;\r\n\r\n            chart1.Series[\"Series1\"].YAxisType = AxisType.Secondary;\r\n\r\n            \/\/if (radioSyouhinBetu.Checked)\r\n            \/\/{\r\n            chart1.Series.Add(\"Series2\");\r\n            chart1.Series[\"Series2\"].IsVisibleInLegend = true;\r\n            chart1.Series[\"Series2\"].LegendText = \"\u7a2e\u5225\u7dcf\u58f2\u4e0a\";\r\n\r\n            chart1.Series[\"Series2\"].ChartType = SeriesChartType.Line;\r\n            chart1.Series[\"Series2\"].BorderWidth = 2;\r\n            chart1.Series[\"Series2\"].Color = Color.Red;\r\n\r\n\r\n\r\n           \r\n           chart1.Series[\"Series2\"].MarkerSize = 3;\r\n          \r\n            chart1.Series[\"Series2\"].MarkerStyle = MarkerStyle.Diamond;\r\n           \r\n          chart1.Series[\"Series2\"].IsValueShownAsLabel = true;\r\n         \r\n            chart1.Series[\"Series2\"].LabelForeColor = Color.Blue;\r\n           \r\n         \r\n\r\n\r\n\r\n            \/\/}\r\n\r\n            for (int i = 1; i &lt; 35; i++)\r\n            {\r\n\r\n                chart1.Series[\"Series1\"].Points.AddXY(i, i + 5);\r\n\r\n                chart1.Series[\"Series2\"].Points.AddXY(i+10, i+35);\r\n\r\n            }\r\n        \r\n        \r\n        \r\n        \r\n        \r\n        }\r\n\r\n        private void button5_Click(object sender, EventArgs e)\r\n        {\r\n            for (int i = 1; i &lt; 135; i++)\r\n            {\r\n\r\n\r\n\r\n                chart1.Series[\"Series1\"].Points.AddXY(i, i + 5);\r\n\r\n            }\r\n        \r\n        }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>private void btnSet_Click(object sender, EventArgs e) { var series1 = new Series(&#8220;y = x*x&#8221;); var series2 = new [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_lightning_design_setting":[],"footnotes":""},"categories":[11],"tags":[],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=201"}],"version-history":[{"count":3,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":839,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=\/wp\/v2\/posts\/201\/revisions\/839"}],"wp:attachment":[{"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.waou.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}