*VB 関連情報 [#p832d592] **サンプルコード [#i04bd46b] ***MSChart(円グラフ)のサンプル [#efaeae7e] Private Sub Command1_Click() With MSChart1 ' 円グラフを指定 .chartType = VtChChartType2dPie ' テストデータ For i = 1 To 4 .Row = 1 .Column = i .Data = Rnd() * 100 ' ランダムな値(100点満点)をセット Next With .DataGrid .RowLabelCount = 1 .ColumnCount = 4 .RowCount = 1 For i = 1 To .ColumnCount .ColumnLabel(i, 1) = "Column " & i Next i .RowLabel(1, 1) = "成績グラフ" End With ' 項目の表示内容のカスタマイズ For i = 1 To .Plot.SeriesCollection.Count With .Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel ' ラベルはパイのスライスの内部に表示されます。 .LocationType = VtChLabelLocationTypeInside ' データ ポイントの値がラベルに表示されます。 .Component = VtChLabelComponentValue Select Case i Case 1 .ValueFormat = "国語 0" Case 2 .ValueFormat = "算数 0" Case 3 .ValueFormat = "理科 0" Case 4 .ValueFormat = "社会 0" End Select End With Next i End With End Sub -実行結果 #ref(MSChart_Pie_20040715.jpg); -参考情報 --[VB] MSChart:チャート コントロールにデータ ポイント ラベルを記述する方法 ---http://support.microsoft.com/?kbid=411956 --[VB] MSChart:チャート コントロールの設定を実行時に行う方法 ---http://support.microsoft.com/?kbid=411644 --How To Label Pie Slices as Percentages in MSChart Pie Chart ---http://support.microsoft.com/?kbid=230484 --MSChartの使い方 ---http://hpcgi1.nifty.com/MADIA/VBBBS2/wwwlng.cgi?print+200405/04050078.txt --VBレスキュ−(花ちゃん) ---http://www.bcap.co.jp/hanafusa/ ---http://www.bcap.co.jp/hanafusa/VBHLP/MSChartFLM.htm --The Code Project -Series Values inside Pie Chart. -Miscellaneous Controls ---http://thecodeproject.com/useritems/SeriesValueInsidePieChart.asp --MSサポート情報 [VB-4] ---http://www.vbasekai.com/mssp/vb-4.html -はてな --http://www.hatena.ne.jp/1089880654