(クラス)
public LayeredChart
{inherits
Chart}
1 つ以上の ChartAxis オブジェクトによってプロット エリアが定義され、ChartLayer オブジェクトと重ねることによってプロットが処理される Chart。
説明
LayeredChart は、最も一般的なタイプのグラフの一部を実装します。一般的に言えば、Cartesian 座標 (つまり X と Y) を使用してグラフを 2 次元でプロットする場合、
LayeredChart 内でプロットする必要があります。(非 Cartesian プロットには円グラフ、極グラフ、レーダー グラフなどのグラフが含まれます。例については、
PieChart を参照してください。)
LayeredChart は、その名前をプロット エリア内でいくつでもプロットが共存できるという事実から導き出します。これらのプロットは、
ChartLayer オブジェクトで表されます。次の
ChartLayer が実装されています。
ただし、
LayeredChart システムは、これらに限定されていません。これは、独自のオブジェクトの実装、または既存オブジェクトの拡張のプロセスを容易にするように設計されています。多くの場合、既存動作の増分変更が可能です。たとえば、前述の
ChartLayer 実装のすべてに
shape-factory プロパティがあります。このプロシージャは、プロットを表す実際の
Shape オブジェクトを生成するために呼び出されます。独自のプロシージャを提供して、
Shape 生成プロセスを変更またはその全体をオーバーライドできます。
自動生成によってグラフ内にあるデータの処理が試みられます。ただし、多くの場合、独自の軸を指定してこのロジックをオーバーライドすることは便利であり、場合によっては必要になることがあります。これは、作成時に直接実行することも、
LayeredChart.set-left-axis を使用するなどして実行することもできます。たとえば、データと関連していない Y 軸を作成するために、これを行うことができます (
NumericAxis-of を参照)。指定方向の一方の軸または両方の軸を提供すると、その軸が有効である間は、いずれの軸も自動的には生成されません。たとえば、非 null 引数を
LayeredChart.set-top-axis に渡すと、下軸は自動的には作成されません。必要な場合、
ChartLayer.set-top-axis に null を渡すことにより、提供した独自の軸を後で削除することが可能です。
グラフ オブジェクトに対する多くのカスタマイズでは、非ローカル形式のオプションが使用されます。たとえば、
tick-label-factory は、
ChartAxis のインスタンスに影響します。多くの場合、
ChartAxis などのオブジェクトの一時的性質のために、変更したいオブジェクトの親にこれらのオプションを設定すると役立ちます。たとえば、軸オブジェクトそのものに
tick-label-factory を設定すると、その設定が有効なのは、軸オブジェクトが次に再作成されるまでです。
LayeredPlotArea オブジェクトは、
LayeredChart.plot-area として使用可能であり、
LayeredChart のプロット エリアを表します。これは、背景を指定したり、グリッド線の作成を変更したり、また、プロット エリアの位置と寸法を記述したりするために使用できます。すべての
ChartLayer の
Shape コンテナとしても機能し、プロット エリアへのそのレンダリングを制約します。
注意事項
このオブジェクトは、"LayeredChart"のスタイル ルールを記述することでスタイル化することが出来ます。
例
例 |
|
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
location = "../docstring-support/gui/charts-doc.scurl"
}
{RecordGrid height = 6cm, record-source = sample-records}
{let chart:LayeredChart =
{LayeredChart
width = 15cm,
height = 6cm,
{BarLayer
{ChartDataSeries sample-records, "Age"},
x-axis-data = {ChartDataSeries sample-records, "Name"},
{DataSeriesColorPair
{ChartDataSeries sample-records, "Age"},
FillPattern.silver
}
},
{LineLayer
{ChartDataSeries sample-records, "Age"},
legend-enabled? = false
},
{ScatterLayer
{ChartDataSeries sample-records, "Age"},
{DataSeriesColorPair
{ChartDataSeries sample-records, "Age"},
FillPattern.silver
}
}
}
}
{Canvas
width = chart.width,
height = chart.height,
chart
}
| |
default: | 新しい LayeredChart オブジェクトを作成します。 |
コンストラクタ public | {LayeredChart.default left-axis:#ChartAxis = null,right-axis:#ChartAxis = null,top-axis:#ChartAxis = null,bottom-axis:#ChartAxis = null,plot-area:LayeredPlotArea = {LayeredPlotArea},axis-group:Shape = {ShapeGroup},h-axis-group:Shape = {ShapeGroup},v-axis-group:Shape = {ShapeGroup},left-axis-parent:Shape = {ShapeGroup},right-axis-parent:Shape = {ShapeGroup},top-axis-parent:Shape = {ShapeGroup},bottom-axis-parent:Shape = {ShapeGroup},flipped?:bool = false,group-y-axis-data?:bool = true,group-y-axis-data-across-layers?:bool = false,width:Distance = -1m,height:Distance = -1m,legend-location:LegendLocation = LegendLocation.right,legend-alignment:double = 0.2,color-palette:{Array-of FillPattern} = default-chart-color-palette,... } |
フィールド public constant LayeredChart.axis-associations:{
Array-of ChartAxisAssociation} ={new {Array-of ChartAxisAssociation}}
フィールド public constant LayeredChart.axis-group:
Shape
フィールド public-get private-set LayeredChart.bottom-axis:#
ChartAxis
フィールド public constant LayeredChart.bottom-axis-parent:
Shape
flipped?: | グラフを反転させて、X 方向と Y 方向が逆になるようにします。 |
アクセサ public final LayeredChart.flipped?:
bool セッター public final LayeredChart.flipped?:
bool
アクセサ public final LayeredChart.group-y-axis-data-across-layers?:
bool セッター public final LayeredChart.group-y-axis-data-across-layers?:
bool
アクセサ public final LayeredChart.group-y-axis-data?:
bool セッター public final LayeredChart.group-y-axis-data?:
bool
フィールド public constant LayeredChart.h-axis-group:
Shape
フィールド public constant LayeredChart.layers:{
Array-of ChartLayer} ={new {Array-of ChartLayer}}
フィールド public-get private-set LayeredChart.left-axis:#
ChartAxis
フィールド public constant LayeredChart.left-axis-parent:
Shape
非ローカル オプション public LayeredChart.legend-enabled?:
bool
フィールド public-get private-set LayeredChart.right-axis:#
ChartAxis
フィールド public constant LayeredChart.right-axis-parent:
Shape
アクセサ public LayeredChart.style-element:
String
フィールド public-get private-set LayeredChart.top-axis:#
ChartAxis
フィールド public constant LayeredChart.top-axis-parent:
Shape
フィールド public constant LayeredChart.v-axis-group:
Shape
プロパティ 継承 Chart:
bottom-margin, color-palette, default-height, default-width, display-context, font-family, font-size, font-style, font-weight, height, layout-scheduled?, left-margin, legend-alignment, legend-entry-factory, legend-factory, legend-location, legend-shape, plot-area-bounds, right-margin, text-line-through?, text-underline?, top-margin, width プロパティ 継承 Shape:
as-Shape, border-color, color, draw-operation, graphical-parent, option-parent, possibly-displayed?, selection-context, shape-parent, shape-selectable, stroke-thickness, transformation, visible? プロパティ 継承 Visual:
_style-element, clonable-class?, completely-clonable-children?, cursor, data-source, dragee, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data, visual-parent
public constant LayeredChart.AxisFactory:
ProcType ={proc-type
{chart:LayeredChart}:(primary:#ChartAxis, secondary:#ChartAxis)
}
public | {LayeredChart.append-axis-association}:void |
public | {LayeredChart.compute-data-min-max}:(min:any, max:any) |
public | {LayeredChart.ensure-axes-valid}:void |
public | {LayeredChart.get-best-match-y-axis}:#ChartAxis |
public | {LayeredChart.get-layer-at-point}:#ChartLayer |
public | {LayeredChart.get-legend-entries}:{Array-of Graphic} |
get-x-axis: | この LayeredChart の X 軸の 1 つを取得するための便利なメソッド。 |
public final | {LayeredChart.get-x-axis-length}:Distance |
get-y-axis: | この LayeredChart の Y 軸の 1 つを取得するための便利なメソッド。 |
public final | {LayeredChart.get-y-axis-length}:Distance |
protected | {LayeredChart.group-series-on-y-axis?}:bool |
public | {LayeredChart.invalidate-axes-and-layout}:void |
public | {LayeredChart.layout-chart}:void |
public | {LayeredChart.non-keyword-init-arg arg:any}:void |
public | {LayeredChart.note-axis-associations-changed}:void |
public | {LayeredChart.note-color-palette-changed}:void |
public | {LayeredChart.note-layers-order-changed}:void |
public | {LayeredChart.note-legend-changed}:void |
public | {LayeredChart.note-min-max-computation-changed}:void |
public | {LayeredChart.remove-axis-association}:void |
public | {LayeredChart.update-layout}:void |
メソッド 継承 Chart:
constrain-own-layout-bounds, create-legend, draw, ensure-layout-valid, get-actual-bottom-margin, get-actual-left-margin, get-actual-right-margin, get-actual-top-margin, get-own-bounds, get-shape-layout-bounds, invalidate-layout, position-legend, request-draw, self-contains-point?, self-intersects-polygon?, set-chart-size, to-Graphic, transformation-changed メソッド 継承 Shape:
apply-rotation, apply-scale, apply-transformation, apply-translation, apply-translation-in-parent, constrain-shape-layout-bounds, contains-point?, detach, find-graphical-ancestor, fire-crossing-event, fire-in-child, get-display-context, get-down-orientation-in-shape-parent, get-graphical-root, get-gui-path, get-gui-path-to-child, get-local-device-pixel-size, get-origin-in-graphical-ancestor, get-origin-in-root, get-origin-in-shape-parent, get-origin-in-shape-root, get-own-bounds-in-shape-root, get-own-layout-bounds, get-right-orientation-in-shape-parent, get-shape-bounds, get-shape-bounds-in-shape-root, get-top-left-in-ancestor, get-transformation-to-shape-root, keyword-init-arg, option-change-notify, overdraw-for-selection, quantize-line-thickness, request-draw-self, reset-transformation, set-rotation, set-scale, set-transformation, set-translation-in-parent, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-point-from-shape-root, transform-point-to-shape-root, transform-to-display-coordinates, transform-to-graphical-root-coordinates, transform-vector-from-shape-root, transform-vector-to-shape-root, transformation-changing メソッド 継承 ShapeContainerBase:
add, clear, clone-children, draw-shape-child, draw-shape-children, get-all-children-at-point, get-child-at-point, get-leaf-at-point, get-shape-root, note-attached, note-detaching, notify-option-children, on-drag-enter, on-pointer-enter, on-pointer-envelope-event, register-options, remove, set-shape-index, set-shape-index-after, set-shape-index-before, shape-container-fire-inferior-crossing-event, shape-container-handle-crossing, shape-container-pick-child, shape-container-pointer-enter-occurred, shape-container-pointer-leave-occurred メソッド 継承 Visual:
add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, clone-appearance-helper, find-test-children, get-focus-manager, get-layout-context, get-test-parent, get-test-property, get-text, get-view, maybe-fire-attach-event, maybe-fire-detach-event, note-caret-position, on-drag-leave, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, request-key-focus, scroll-to-include, test-record, test-run, xy-offset-to メソッド 継承 GuiEventTarget:
handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-inspection, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class メソッド 継承 OptionListInterface:
add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, option-changed, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
(コンストラクタ)
public | {LayeredChart.default left-axis:#ChartAxis = null,right-axis:#ChartAxis = null,top-axis:#ChartAxis = null,bottom-axis:#ChartAxis = null,plot-area:LayeredPlotArea = {LayeredPlotArea},axis-group:Shape = {ShapeGroup},h-axis-group:Shape = {ShapeGroup},v-axis-group:Shape = {ShapeGroup},left-axis-parent:Shape = {ShapeGroup},right-axis-parent:Shape = {ShapeGroup},top-axis-parent:Shape = {ShapeGroup},bottom-axis-parent:Shape = {ShapeGroup},flipped?:bool = false,group-y-axis-data?:bool = true,group-y-axis-data-across-layers?:bool = false,width:Distance = -1m,height:Distance = -1m,legend-location:LegendLocation = LegendLocation.right,legend-alignment:double = 0.2,color-palette:{Array-of FillPattern} = default-chart-color-palette,... } |
新しい LayeredChart オブジェクトを作成します。
...:
残余引数は次のものにすることができます。
注意事項
例
この例では、非常に簡単な棒グラフが作成されます。
例 |
|
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
location = "../docstring-support/gui/charts-doc.scurl"
}
{let chart:LayeredChart =
{LayeredChart
width = 15cm,
height = 6cm,
{BarLayer
sample-records,
"Wins",
x-axis-data = {ChartDataSeries sample-records, "Name"}
}
}
}
{Canvas
width = chart.width,
height = chart.height,
chart
}
| |
(フィールド)
public constant LayeredChart.axis-associations:{
Array-of ChartAxisAssociation} ={new {Array-of ChartAxisAssociation}}
個々の ChartDataSeries とこのグラフの軸の関連付けを制御するために使用される ChartAxisAssociation オブジェクトの配列。
説明
注意事項
例
この例には、スケールの大きく異なる 2 つのデータ系列が含まれています。この例では、直接のデータ関連のない左軸と右軸が使用されているので、両方のデータ系列は通常、正しい型の最初のデータに関連付けられます。この場合、組み込まれた値のスケールために、望ましくない結果が生じます。例の ChartAxisAssociation オブジェクトを削除して、動作を確認してください。
例 |
|
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
location = "../docstring-support/gui/charts-doc.scurl"
}
{RecordGrid height = 6cm, record-source = sample-records}
{let chart:LayeredChart =
{LayeredChart
width = 15cm,
height = 6cm,
left-axis =
{new {NumericAxis-of double}, 0, 300000},
right-axis =
{new {NumericAxis-of double}, 0, 10},
{LineLayer
sample-records,
"ID",
"Wins",
x-axis-data = {ChartDataSeries sample-records, "Name"}
},
{ChartAxisAssociation
{ChartDataSeries sample-records, "ID"},
ChartAxisSpecification.automatic, || X axis as normal
ChartAxisSpecification.primary || Y axis -> left
},
{ChartAxisAssociation
{ChartDataSeries sample-records, "Wins"},
ChartAxisSpecification.automatic, || X axis as normal
ChartAxisSpecification.secondary || Y axis -> right
}
}
}
{Canvas
width = chart.width,
height = chart.height,
chart
}
| |
(フィールド)
public constant LayeredChart.axis-group:
Shape すべての ChartAxis オブジェクトのトップレベルの親 Shape。
説明
LayeredChart の資料で述べられているように、
Shape 階層の主な目的は、非ローカル オプションをさまざまな方法で設定することにあります。軸の親オブジェクトもそれぞれの軸の原点を共有することに注意してください。次の図は、それぞれの関係を、各資料へのリンクと共に示しています。
(フィールド)
public-get private-set LayeredChart.bottom-axis:#
ChartAxis
(フィールド)
public constant LayeredChart.bottom-axis-parent:
Shape
(アクセサ)
アクセサ public final LayeredChart.flipped?:
bool セッター public final LayeredChart.flipped?:
bool グラフを反転させて、X 方向と Y 方向が逆になるようにします。
説明
この値が true である場合は、
LayeredChart の軸と座標は逆になります。つまり、X 軸は垂直方向となり、Y 軸は水平方向となります。たとえば、
LayeredChart の左軸はまだ左にあります。これは、Y 軸ではなく X 軸を参照するだけです。
この表では、flipped? の値に応じた、各軸が果たす役割を説明します。
注意事項
軸のいずれかを手動で設定すると、このプロパティを変更するときに、多くの場合、手動で軸を変更することが必要になります。
例
例 |
|
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
location = "../docstring-support/gui/charts-doc.scurl"
}
{let chart:LayeredChart =
{LayeredChart
width = 15cm,
height = 6cm,
{BarLayer
sample-records,
"Wins",
x-axis-data = {ChartDataSeries sample-records, "Name"}
}
}
}
{Canvas
width = chart.width,
height = chart.height,
chart
}
{CheckButton
label = "flipped?",
value = chart.flipped?,
{on ValueChanged at cb:CheckButton do
set chart.flipped? = cb.value
}
}
| |
(アクセサ)
アクセサ public final LayeredChart.group-y-axis-data-across-layers?:
bool セッター public final LayeredChart.group-y-axis-data-across-layers?:
bool Y 軸の作成時に異なる ChartLayer の ChartDataSeries を一緒にグループ化するかどうかを決定します。
説明
LayeredChart が自動的にその軸を生成し、同じ Y 軸を使用して表示できるように類似するデータ系列を一緒にグループ化しようとする場合は、異なる ChartLayer のデータ系列がグループ化の対象となるかどうかがこのプロパティで決定されます。
例
(アクセサ)
アクセサ public final LayeredChart.group-y-axis-data?:
bool セッター public final LayeredChart.group-y-axis-data?:
bool Y 軸の作成時に異なる ChartDataSeries を一緒にグループ化するかどうかを決定します。
説明
LayeredChart が自動的にその軸を生成しようとする場合、この値は、1 つの軸を使用して表示できるように複数の類似するデータ系列を一緒にグループ化するかどうかを決定します。
この値が false の場合、プロットされる Y データ系列ごとに 1 つの Y 軸が作成されます。もちろん、2 つの Y 軸用スロットしかないので、これは最初の 2 つのデータ系列しかカバーしません。
例
この例では、両方のプロパティを変更できます。ここには 2 つの分離したレイヤがあり、それぞれに 1 つの同じ型の Y データ系列があります。既定ではどのように Points で右軸が取られるかに注意してください。group-y-axis-data-across-layers? をクリックして、動作を確認してください。
例 |
|
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
location = "../docstring-support/gui/charts-doc.scurl"
}
{let chart:LayeredChart =
{LayeredChart
width = 15cm,
height = 6cm,
{BarLayer
sample-records,
"Age",
x-axis-data = {ChartDataSeries sample-records, "Name"}
},
{LineLayer
sample-records,
"Points"
}
}
}
{Canvas
width = chart.width,
height = chart.height,
chart
}
{CheckButton
label = "group-y-axis-data?",
value = chart.group-y-axis-data?,
{on ValueChanged at cb:CheckButton do
set chart.group-y-axis-data? = cb.value
}
}
{CheckButton
label = "group-y-axis-data-across-layers?",
value = chart.group-y-axis-data-across-layers?,
{on ValueChanged at cb:CheckButton do
set chart.group-y-axis-data-across-layers? = cb.value
}
}
| |
(フィールド)
public constant LayeredChart.h-axis-group:
Shape
(フィールド)
public constant LayeredChart.layers:{
Array-of ChartLayer} ={new {Array-of ChartLayer}}
(フィールド)
public-get private-set LayeredChart.left-axis:#
ChartAxis
(フィールド)
public constant LayeredChart.left-axis-parent:
Shape
(非ローカル オプション)
public LayeredChart.legend-enabled?:
bool
(フィールド)
(フィールド)
public-get private-set LayeredChart.right-axis:#
ChartAxis
(フィールド)
public constant LayeredChart.right-axis-parent:
Shape
(アクセサ)
アクセサ public LayeredChart.style-element:
String スタイリングの目的のための、この Visual の "要素" や "型" です。
説明
オーバーライド
Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入:
バージョン 6.0
(フィールド)
public-get private-set LayeredChart.top-axis:#
ChartAxis
(フィールド)
public constant LayeredChart.top-axis-parent:
Shape
(フィールド)
public constant LayeredChart.v-axis-group:
Shape
(ローカル オプション)
X 軸の ChartAxis オブジェクトを必要に応じて作成するために使用されるファクトリ プロシージャ。
説明
注意事項
このファクトリから返される軸は、自動的に生成されるとみなされ、通常の自動軸生成プロセスで生成される
ChartAxis オブジェクトと同様に扱われます。すなわち、これらはレイアウトで必要な場合は、破棄されてから、再作成されます。
(ローカル オプション)
Y 軸の ChartAxis オブジェクトを必要に応じて作成するために使用されるファクトリ プロシージャ。
説明
注意事項
このファクトリから返される軸は、自動的に生成されるとみなされ、通常の自動軸生成プロセスで生成される
ChartAxis オブジェクトと同様に扱われます。すなわち、これらはレイアウトで必要な場合は、破棄されてから、再作成されます。
(クラス定数)
public constant LayeredChart.AxisFactory:
ProcType ={proc-type
{chart:LayeredChart}:(primary:#ChartAxis, secondary:#ChartAxis)
}
(メソッド)
public | {LayeredChart.append-axis-association}:void |
この LayeredChart に ChartAxisAssociation を追加します。
association: 追加する関連付け。
説明
注意事項
同じデータ系列の関連付けが既に存在する場合は、エラーが発生します。
(メソッド)
この LayeredChart に ChartLayer を追加します。
layer: 追加する ChartLayer。
説明
(メソッド)
public | {LayeredChart.compute-data-min-max}:(min:any, max:any) |
data に関連した最小値と最大値を決定します。
戻り値
最小値と最大値。data がこのグラフのレイヤで見つからなかった場合、または非 null の値がデータに存在していなかった場合は、これらの値の両方が null になります。それ以外の場合は、両方とも非 null です。
説明
(メソッド)
public | {LayeredChart.ensure-axes-valid}:void |
必要なすべての軸生成が実行されていることを確認してください。
説明
(メソッド)
この Chart の必要余白を概算します。
need-left?: 左の余白の見積もりが必要であるかどうかを示します。必要ない場合は、左の余白に left が返されます。
need-right?: 右の余白の見積もりが必要であるかどうかを示します。必要ない場合は、右の余白に right が返されます。
need-top?: 上の余白の見積もりが必要であるかどうかを示します。必要ない場合は、上の余白に top が返されます。
need-bottom?: 下の余白の見積もりが必要であるかどうかを示します。必要ない場合は、下の余白に bottom が返されます。
left: 左の余白の既定値を示します。need-left? が true の場合、この値を返します。true でない場合、無視されます。
right: 右の余白の既定値を示します。need-right? が true の場合、この値を返します。true でない場合、無視されます。
top: 上の余白の既定値を示します。need-top? が true の場合、この値を返します。true でない場合、無視されます。
bottom: 下の余白の既定値を示します。need-bottom? が true の場合、この値を返します。true でない場合、無視されます。
説明
注意事項
estimate-margins を呼び出す前に、
Chart レイアウト システムは、最初の近似値としてグラフの
plot-area-bounds をグラフ領域全体に設定します。
estimate-margins の実装は、必要に応じて、見積もり処理の過程でこれらを自由に上書きできます。
(メソッド)
y-data との組み合わせに最も適した X 軸を決定します。
戻り値
最適な X 軸 (ある場合)。X 軸が存在しない場合、あるいはどれも適切でない場合は、null が返されます。
X 軸との関連で使用される
RecordField も返されます (適切な場合)。この値が
null となるのは、軸が
null の場合、あるいは軸がレコード インデックスのみに基づいている場合だけです。(レコード インデックス ベースの軸実装の例については、
DefaultChartAxis を参照してください。)
説明
このメソッドはプロット中に使いますが、外部で使用することもできます。通常は
ChartDataMapping オブジェクトの作成で使用します。
X 軸のマッピングは、最高のものから最低のものへ、次の優先度順に実行されます。
- ChartAxisAssociation: ChartAxisAssociation を指定すると、要求した関連付けは常に有効とみなされます。
- データ系列: 候補 ChartAxis オブジェクトの 1 つが、問題となっている実際のデータ系列を表していると宣言すると、そのオブジェクトが使用されます。(ChartAxis.get-data-type は ChartAxis がこうした宣言を行う場合のメカニズムです。)
- レコード フィールド:候補軸の 1 つが ChartDataSeries.fieldと同じ RecordField を表していると宣言すると、その軸が使用されます。
- データ型: 候補軸の1つがデータ型を表している場合 (ChartAxis.get-data-type は AxisDataType.type を返します。)、互換性のある y-data が使用されます。 (互換性のある y-data は、軸のデータ型のサブタイプでなければなりません。)
- フィールド名:候補軸の 1 つが、y-data.field と同じ名前のフィールドを表している場合、その軸が使用されます。
- レコード インデックス:軸がレコード インデックス単独でデータを表す場合 (例については、DefaultChartAxis を参照)、その軸が最後の手段として使用されます。
(メソッド)
public | {LayeredChart.get-best-match-y-axis}:#ChartAxis |
y-data との組み合わせに最も適した Y 軸を決定します。
戻り値
最適な Y 軸 (ある場合)。Y 軸が存在しない場合、あるいはどれも適切でない場合は、null が返されます。
説明
Y 軸のマッピングは、最高のものから最低のものへ、次の優先度順に実行されます。
- ChartAxisAssociation: ChartAxisAssociation を指定すると、要求した関連付けは常に有効とみなされます。
- データ系列:候補 ChartAxis オブジェクトの 1 つが、問題となっている実際のデータ系列を表していると宣言すると、そのオブジェクトが使用されます。(ChartAxis.get-data-type は、ChartAxis がこうした宣言を行う場合のメカニズムです。)
- レコード フィールド:候補軸の 1 つが ChartDataSeries.field と同じ RecordField を表していると宣言すると、その軸が使用されます。
- データ型: 候補軸の1つがデータ型を表している場合 (ChartAxis.get-data-type は AxisDataType.type を返します。)、互換性のある y-data が使用されます。(互換性のある y-data は、軸のデータ型のサブタイプでなければなりません。)
- フィールド名:候補軸の 1 つが y-data.field と同じ名前のフィールドを表していると宣言すると、その軸が使用されます。
(メソッド)
public | {LayeredChart.get-layer-at-point}:#ChartLayer |
この LayeredChart 内の特定の位置に ChartLayer があれば、それを確認してください。
x: X 座標。
y: Y 座標。
戻り値
ポイントの ChartLayer、あるいはこのポイントをカバーするレイヤがない場合は null。
説明
座標は、LayeredChart の原点に対して相対的なものとして解釈されます。(つまり、グラフの左上隅に対して相対的です。)
注意事項
これに関するその他の手法については、以下を参照してください。
(メソッド)
Shape を行う ChartLayer があれば、それを確認してください。
shape:
ChartLayer の検索で使用する
Shape。
戻り値
説明
(メソッド)
public | {LayeredChart.get-legend-entries}:{Array-of Graphic} |
この Chart の凡例に必要なすべての項目を作成します。
説明
(メソッド)
この LayeredChart の X 軸の 1 つを取得するための便利なメソッド。
first?: true の場合、基本 X 軸が返され、そうでなければ、2 次 X 軸が返されます。
戻り値
説明
(メソッド)
public final | {LayeredChart.get-x-axis-length}:Distance |
X 軸の長さを取得します 。
戻り値
説明
注意事項
垂直軸の場合、空間の方向はデータの方向と逆になります。つまり、軸の終わりは、始点より上にありますが、始点より小さい Y 座標をもちます。これは、画面上の Y 座標は下向きに増加するためです。ただし、このメソッドでは、違いがありません。返される値は常に正数です。位置決めにこの値を使用すると、このことを考慮して、軸が垂直方向である場合は、負の値を使用する必要のある場合があります。
(メソッド)
この LayeredChart の Y 軸の 1 つを取得するための便利なメソッド。
first?: true の場合、基本 Y 軸が返され、そうでなければ、2 次 Y 軸が返されます。
戻り値
説明
(メソッド)
public final | {LayeredChart.get-y-axis-length}:Distance |
Y 軸の長さを取得します 。
戻り値
説明
注意事項
垂直軸の場合、空間の方向はデータの方向と逆になります。つまり、軸の終わりは、始点より上にありますが、始点より小さい Y 座標をもちます。これは、画面上の Y 座標は下向きに増加するためです。ただし、このメソッドでは、違いがありません。返される値は常に正数です。位置決めにこの値を使用すると、このことを考慮して、軸が垂直方向である場合は、負の値を使用する必要のある場合があります。
(メソッド)
protected | {LayeredChart.group-series-on-y-axis?}:bool |
軸の自動生成時に series を array 内のものと一緒にグループ化するかどうかを決定します。
series: array のグループ化で考慮される ChartDataSeries。
戻り値
series が array でグループ化される場合は true。
説明
このメソッドは、Y 軸の自動軸生成プロセスによって内部的に呼び出されます。このメソッドは、series が array の場合と同じ軸に配置するのに適切であるかどうかを判断する必要があります。
このメソッドを呼び出す必要はありませんが、LayeredChart の独自のサブクラスでオーバーライドすることは役立ちます。
既定のロジックは次のとおりです。
(メソッド)
public | {LayeredChart.invalidate-axes-and-layout}:void |
Chart がすぐにレイアウト操作を実行するように要求し、軸を作成する必要があることも示します。
説明
注意事項
(メソッド)
public | {LayeredChart.layout-chart}:void |
このチャートにおけるレイアウトの現在のプロセスを実行します。
説明
このメソッドを直接呼び出してはいけません。; グラフのレイアウトをトリガしたい場合は、
Chart.ensure-layout-valid を呼び出してください。
Chart.layout-chart が呼び出されます。
このメソッドは、子のクラスでオーバーライドされるのが理想的です。その中で、グラフの現在のレイアウトの前(又は後)の動作を実行します。
導入:
バージョン 6.0
(メソッド)
public | {LayeredChart.non-keyword-init-arg arg:any}:void |
InitRestArgParser.process-rest-args で非キーワード引数が検出されると、呼び出されます。
説明
Visual によるこのメソッドの実装では、最初にこのメソッドへの入力値をオブジェクトに関連するメタデータとして解釈を試みます。たとえば、オブジェクトに関連する
EventHandler と
DataBinding を認識してから、これらをアタッチするための適切な手順を実行することになります。
オーバーライド
オブジェクトに関連付けられた追加のメタデータも受け入れるようにするには、このメソッドをオーバーライドします。実装では通常、解釈に失敗した入力値でスーパー実装が呼び出されるようにします。
(メソッド)
public | {LayeredChart.note-axis-associations-changed}:void |
この LayeredChart に LayeredChart.axis-associations の内容が変更されたことを通知します。
説明
LayeredChart.axis-associations を直接変更する場合は、必ずこのメソッドを呼び出す必要があります。これにより、グラフの適切なコンポーネントが確実に再生成されるようになります。
(メソッド)
public | {LayeredChart.note-color-palette-changed}:void |
(メソッド)
public | {LayeredChart.note-layers-order-changed}:void |
(メソッド)
public | {LayeredChart.note-legend-changed}:void |
凡例が変更されたことを、この LayeredChart に通知します。
説明
導入:
バージョン 6.0
(メソッド)
public | {LayeredChart.note-min-max-computation-changed}:void |
LayeredChart.compute-data-min-max によって返される値に影響を与える要素において、変更があったことを全ての現在の ChartAxis に通知します。
説明
これは、最小値や最大値が計算される方法への変更を
ChartAxis オブジェクトに通知するために使用されます。そのオブジェクトはこれらの変更を意識していない可能性があります。変更には、この
LayeredChart 内の
ChartLayer セットに対するものや、このグラフ内のレイヤーに関するスタッキング モードに対するものが含まれます。
アプリケーションでこのメソッドを呼び出す必要は滅多にありませんが、LayeredChart.compute-data-min-max で最小値や最大値が計算される方法をオーバーライドする場合や、そのメソッドによって返される値が変更された場合に通知するのにこのメソッドをオーバーライドしたい場合に有用かもしれません。
導入:
バージョン 6.0
(メソッド)
public | {LayeredChart.remove-axis-association}:void |
この LayeredChart に ChartAxisAssociation を追加します。
association: 追加する関連付け。
説明
association は LayeredChart.axis-associations のメンバでなければなりません。そうでない場合、エラーが発生します。
(メソッド)
ChartLayer をこの LayeredChart から削除します。
layer: 削除する ChartLayer。
説明
(メソッド)
この LayeredChart に関連した下の ChartAxis を設定 (または設定解除) します。
axis: 使用する軸 (ある場合)。この値が null であると、前に下の軸が提供されている場合、その軸が削除されます。
説明
注意事項
どのデータ系列がどの軸を使用するかを手動で制御するため、あるいは表示される値の範囲を直接制御するため、独自の軸を提供することができます。
BarLayer が正しく表示されるには特殊な X 軸を必要であることに注意してください。通常、自動軸生成プロセスではこのことが考慮されますが、
BarLayer に X 軸を作成する場合には、正しいタイプを作成する必要があります。詳細については、
BarLayer、
EnumeratedBarChartAxis、および
DefaultBarChartAxis を参照してください。
手動で作成した軸を提供すると、自動軸生成の通常のプロセスが禁止されます。左軸または右軸の一方がユーザー指定の場合は、どちらの軸も自動的には生成されません。ユーザー指定軸を削除するには (これに加えて自動生成を再度有効にするには)、これを null に設定します。
(メソッド)
この LayeredChart に関連した左の ChartAxis を設定 (または設定解除) します。
axis: 使用する軸 (ある場合)。この値が null であると、前に左の軸が提供されている場合、その軸が削除されます。
説明
注意事項
どのデータ系列がどの軸を使用するかを手動で制御するため、あるいは表示される値の範囲を直接制御するため、独自の軸を提供することができます。
BarLayer が正しく表示されるには特殊な X 軸を必要であることに注意してください。通常、自動軸生成プロセスではこのことが考慮されますが、
BarLayer に X 軸を作成する場合には、正しいタイプを作成する必要があります。詳細については、
BarLayer、
EnumeratedBarChartAxis、および
DefaultBarChartAxis を参照してください。
手動で作成した軸を提供すると、自動軸生成の通常のプロセスが禁止されます。左軸または右軸の一方がユーザー指定の場合は、どちらの軸も自動的には生成されません。ユーザー指定軸を削除するには (これに加えて自動生成を再度有効にするには)、これを null に設定します。
(メソッド)
この LayeredChart に関連した右の ChartAxis を設定 (または設定解除) します。
axis: 使用する軸 (ある場合)。この値が null であると、前に右の軸が提供されている場合、その軸が削除されます。
説明
注意事項
どのデータ系列がどの軸を使用するかを手動で制御するため、あるいは表示される値の範囲を直接制御するため、独自の軸を提供することができます。
BarLayer が正しく表示されるには特殊な X 軸を必要であることに注意してください。通常、自動軸生成プロセスではこのことが考慮されますが、
BarLayer に X 軸を作成する場合には、正しいタイプを作成する必要があります。詳細については、
BarLayer、
EnumeratedBarChartAxis、および
DefaultBarChartAxis を参照してください。
手動で作成した軸を提供すると、自動軸生成の通常のプロセスが禁止されます。左軸または右軸の一方がユーザー指定の場合は、どちらの軸も自動的には生成されません。ユーザー指定軸を削除するには (これに加えて自動生成を再度有効にするには)、これを null に設定します。
(メソッド)
この LayeredChart に関連した上の ChartAxis を設定 (または設定解除) します。
axis: 使用する軸 (ある場合)。この値が null であると、前に上の軸が提供されている場合、その軸が削除されます。
説明
注意事項
どのデータ系列がどの軸を使用するかを手動で制御するため、あるいは表示される値の範囲を直接制御するため、独自の軸を提供することができます。
BarLayer が正しく表示されるには特殊な X 軸を必要であることに注意してください。通常、自動軸生成プロセスではこのことが考慮されますが、
BarLayer に X 軸を作成する場合には、正しいタイプを作成する必要があります。詳細については、
BarLayer、
EnumeratedBarChartAxis、および
DefaultBarChartAxis を参照してください。
手動で作成した軸を提供すると、自動軸生成の通常のプロセスが禁止されます。左軸または右軸の一方がユーザー指定の場合は、どちらの軸も自動的には生成されません。ユーザー指定軸を削除するには (これに加えて自動生成を再度有効にするには)、これを null に設定します。
(メソッド)
public | {LayeredChart.update-layout}:void |