掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
VB2010 Chartでの表示と収得の方法? (ID:147846)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Q1,Q3に関するサンプル Q2はChart.Hittestで出来るのではないでしょうか。 Q4出来ます。型をIntegerではなく小数点を扱える型にするだけ。 Dim tbl As New DataTable With tbl.Columns .Add("日付", GetType(Date)) .Add("高値", GetType(Integer)) .Add("安値", GetType(Integer)) .Add("始値", GetType(Integer)) .Add("終値", GetType(Integer)) .Add("指数1", GetType(Integer)) End With tbl.Rows.Add({#8/1/2012#, 700, 500, 600, 550, 500}) tbl.Rows.Add({#8/2/2012#, 1100, 800, 850, 800, DBNull.Value}) tbl.Rows.Add({#8/7/2012#, 800, 500, 700, 750, 600}) tbl.Rows.Add({#8/9/2012#, 800, 500, 300, 600, 400}) 'tbl.Rows.Add({#8/31/2012#, DBNull.Value, DBNull.Value, DBNull.Value, DBNull.Value, DBNull.Value}) Chart1.Series.Clear() Chart1.Titles.Add("株価 日足") With Chart1.ChartAreas(0).AxisX .MajorGrid.Enabled = False .MinorGrid.Enabled = False .Minimum = #8/1/2012#.Subtract(#1/1/1900#).TotalDays + 1 .Maximum = .Minimum + 31 .Interval = 7 .IntervalAutoMode = DataVisualization.Charting.IntervalAutoMode.VariableCount End With Dim rosoku = Chart1.Series.Add("ローソク足") With rosoku .ChartType = DataVisualization.Charting.SeriesChartType.Candlestick .XValueMember = "日付" .YValueMembers = "高値, 安値, 始値, 終値" '.IsVisibleInLegend = False End With Dim ore1 = Chart1.Series.Add("折れ線①") With ore1 .ChartType = DataVisualization.Charting.SeriesChartType.Line .XValueMember = "日付" .YValueMembers = "指数①" '.IsVisibleInLegend = False End With Chart1.DataSource = tbl Chart1.DataBind()
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.