Home > Excel VBA | GraphControl > Excel グラフの系列を設定する(Interior, LineStyle, border color)

Excel グラフの系列を設定する(Interior, LineStyle, border color)


エクセルグラフの系列のインテリア、ボーダー、線の色、マーカータイプと大きさなどを設定するソースコードを紹介します。

At this time, introducing some codes to set up seriesCollection. it will be the LineStyle, Maker style, color etc.

下記に4つサンプルコードを紹介します。1つめは、系列1のインテリアカラーを赤にします。折れ線グラフなどのインテリアカラーのないグラフでは領域の設定項目がありませんのでエラーになります(3Dの折れ線グラフでは中の色が変わります)。棒グラフなどの系列の中に領域がある場合に有効になります
2つ目のプロシージャを実行すると自動設定になります。まず、系列1のスタイルとマーカースタイルを無効にしてから各項目を、xlAutomatic で設定を行います。
3つ目は、折れ線グラフの線を消します。他のグラフ(系列に領域あるグラフ)では、ボーダーが消えます。
4つ目は、折れ線グラフのマーカーを設定します。

introducing some sample codes below. The code which is written on the 1st is to change interior color to red. It will not carry out in the case of line chart because there's no interior color in line chart. The code which is written on the 2nd is to set it in an xlAutomatic. 3rd code is to delete border color. If it is executed in line chart then line will be disapper. 4th code is for line chart. It set up the style of marker.

GraphControl で使用しているコードです。

the code below is used in GraphControl.

Comments:0

Comment Form

Home > Excel VBA | GraphControl > Excel グラフの系列を設定する(Interior, LineStyle, border color)

Return to page top