ScatterLayer (クラス)
public ScatterLayer {inherits BaseScatterLayer}
パッケージ: CURL.GUI.CHARTS

データを別々の均一サイズの形状としてプロットする ChartLayer の実装。

説明

このクラスは、BaseScatterLayer の実装です。ほとんどの機能は、BaseScatterLayer に存在します。ScatterLayer は、Shape が均一のサイズを持ち、そのサイズが scatter-shape-size オプションによって決定されるという動作を定義するだけです。
これに対し、BubbleLayerBaseScatterLayer のサブクラスですが、データを使用して各 Shape のサイズを決定します。

注意事項

ChartLayer のこの実装では、Shape ファクトリー プロシージャを使用するためにほとんどの ChartLayer とは少々異なる原理に基づきます。ほとんどの ChartLayer は、default-shape-factory プロシージャを示す shape-factory オプションを提供します。
BaseScatterLayer は、代わりに BaseScatterLayer.scatter-shape を使用して、Shape 生成方法を定義します。このオプションは、生成される形状の自動判定、生成される ScatterShape の仕様、または呼び出されるファクトリー プロシージャを示す場合があります。詳細および例については、BaseScatterLayer.scatter-shape を参照してください。
BaseScatterLayer は、均一なサイズの Shape に制限されません。サイズを変更したい場合で、BubbleLayer が適切でない場合は、ScatterLayer をカスタマイズできます。前に説明したように Shape ファクトリーを BaseScatterLayer.scatter-shape に提供するだけで、渡されるサイズ パラメータは無視してください。代わりに ScatterLayer または BaseScatterLayer をサブクラス化して、BaseScatterLayer.get-size-for-datum をオーバーライドできます。

注意事項

グラフへのその他のオブジェクトの追加については、ChartLayer を参照してください。


例: 単純散布グラフ
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{LayeredChart
    width = 15cm,
    height = 6cm,
    {ScatterLayer
        sample-records,
        "Points",
        "Height",
        x-axis-data = {ChartDataSeries sample-records, "Age"}
    }
}

コンストラクタ
default:新規の ScatterLayer を作成します。
コンストラクタ public {ScatterLayer.default
x-axis-data:#ChartDataSeries = null,
stacking-mode:ChartStackingMode = ChartStackingMode.none,
scatter-shape:any = null,
border-color:FillPattern = FillPattern.black,
...
}

プロパティ
display-context:このオブジェクトに関連付けられている DisplayContext
非ローカル オプション public ScatterLayer.display-context:#DisplayContext
scatter-shape-size:ScatterLayer 内で生成されたプロット Shape のサイズ。
非ローカル オプション public ScatterLayer.scatter-shape-size:any
プロパティ 継承 BaseScatterLayer: scatter-border-line-style, scatter-border-width, scatter-shape, series-shapes
プロパティ 継承 StackableChartLayer: generate-y-axes?, stacking-mode
プロパティ 継承 ChartLayer: chart, color-associations, legend-enabled?, legend-entry-factory, style-element, x-axis-data, y-axis-data
プロパティ 継承 Shape: as-Shape, border-color, color, draw-operation, graphical-parent, option-parent, possibly-displayed?, selection-context, shape-parent, shape-selectable, stroke-thickness, transformation, visible?
プロパティ 継承 ShapeContainerBase: as-ShapeRoot, shape-children
プロパティ 継承 Visual: _style-element, clonable-class?, completely-clonable-children?, cursor, data-source, dragee, font-size, 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
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
get-size-for-datum:指定の Record をプロットする場合のサイズを決定します。
protected {ScatterLayer.get-size-for-datum
series:ChartDataSeries,
series-index:int,
record:Record,
record-index:int
}:(x:Distance, y:Distance)
メソッド 継承 BaseScatterLayer: get-data-series-from-shape, set-data-series-visibility, update-layout
メソッド 継承 StackableChartLayer: append-data-series, compute-data-min-max, get-data-mapping, get-inverse-data-mapping
メソッド 継承 ChartLayer: append-color-association, create-legend-entries, detach, draw, get-data-series-visibility, get-fill-pattern-for-data-series, get-nearest-record-in-data, get-own-bounds, get-record-at-point, get-record-count, handle-observer-message, maybe-create-x-axis, maybe-create-y-axis-for-series, non-keyword-init-arg, note-color-associations-changed, note-y-axis-data-array-changed, remove-color-association, remove-data-series, self-contains-point?, self-intersects-polygon?
メソッド 継承 Shape: apply-rotation, apply-scale, apply-transformation, apply-translation, apply-translation-in-parent, constrain-own-layout-bounds, constrain-shape-layout-bounds, contains-point?, 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-shape-layout-bounds, get-top-left-in-ancestor, get-transformation-to-shape-root, keyword-init-arg, option-change-notify, overdraw-for-selection, quantize-line-thickness, request-draw, request-draw-self, reset-transformation, set-rotation, set-scale, set-transformation, set-translation-in-parent, to-Graphic, 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-changed, transformation-changing
メソッド 継承 Observer: observe, stop-observing
メソッド 継承 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
メソッド 継承 GraphicOptions: any-to-Distance
メソッド 継承 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
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 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
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {ScatterLayer.default
x-axis-data:#ChartDataSeries = null,
stacking-mode:ChartStackingMode = ChartStackingMode.none,
scatter-shape:any = null,
border-color:FillPattern = FillPattern.black,
...
}

新規の ScatterLayer を作成します。

x-axis-data: ChartLayer.x-axis-data の初期値。この値は、指定されると、LayeredChart での自動 X 軸生成を変更するために使用されます。
stacking-mode: このグラフの初期 ChartStackingModeChartStackingMode.none 以外のスタッキング モードでは許可されるデータの型に制約が生じることに注意してください。詳細については、ScatterLayer.stacking-mode を参照してください。
scatter-shape: ScatterLayer.scatter-shape の初期値。このプロシージャは、プロットする Shape の作成を制御します。
border-color: この ChartLayer での Shape.border-color オプションの初期値。
...: データ系列、オプション、および他の項目の初期化の値。詳細については、ChartLayer.default を参照してください。

例については、ScatterLayer を参照してください。



プロパティ詳細
display-context (非ローカル オプション)
public ScatterLayer.display-context:#DisplayContext

このオブジェクトに関連付けられている DisplayContext

プログラミング注意事項

このオプションは、Curl グラフィック システム内での通信のために使用されます。これは、ユーザー コードで不用意に設定や設定解除を行わないでください。また、通常は、ユーザー コードで直接読み取るべきではありません。現在の DisplayContext が必要な場合は、Visual.get-display-context を呼び出すことによりフェッチしてください。

画面上のウィンドウまたは印刷されたページで表示可能なすべてのグラフィック階層は、そのルートにおいて、display-context オプションを DisplayContext オブジェクトに設定するオブジェクトを持つ必要があります。このオブジェクトは、グラフィック階層の表示に使用される表示媒体に適しています。つまり、オブジェクトは、display-context オプションの値が null から非 null DisplayContext オブジェクトに変更されるのをモニタリングすることにより、表示不可能なグラフィック階層に連結されていることを認識します。したがって、特定の動作を実行する必要のある Visual のサブクラスは、表示不可能なグラフィック階層に接続された場合、次のようなオプション宣言を含むことにより display-context オプションをモニタリングします。

{nonlocal-option public display-context:#DisplayContext
change handler}


ここで、change handler 内のコードは display-context オプションの現在値 (変数 display-context の値として、変更ハンドラ内にある) を取得し、null および非 null の値の間で行われる変更をモニタリングし、必要とされる動作を実行します。

ただし、このプログラミング熟語を使用するプログラマーは、グラフィカル表示を再配列する際、グラフィック階層からグラフィカル オブジェクトを一時的に分離し、これらを同じ階層に再アタッチすることが、割に一般的であることを理解するべきです。この処理により、一時的に分離されたオブジェクトは、display-context オブジェクトが null になり、再び非 null になるのを観察します。display-context オプションでの変更をモニタリングするコードは、この可能性を考慮に入れ、この状況における望ましくない動作の実行を回避しなくてはなりません。


scatter-shape-size (非ローカル オプション)
public ScatterLayer.scatter-shape-size:any

ScatterLayer 内で生成されたプロット Shape のサイズ。

説明

scatter-shape-size を参照してください。





メソッド詳細
get-size-for-datum (メソッド)
protected {ScatterLayer.get-size-for-datum
series:ChartDataSeries,
series-index:int,
record:Record,
record-index:int
}:(x:Distance, y:Distance)

指定の Record をプロットする場合のサイズを決定します。

series: 考慮される ChartDataSeries
series-index: series が見つかる BaseScatterLayer.y-axis-data へのインデックス。
record: 考慮される Record
record-index: 組み込む側の RecordSet 内の record のインデックス。

戻り値

それぞれ X 次元と Y 次元のサイズを表す 2 つの Distance

説明

このメソッドは、BaseScatterLayer 内の内部プロット ロジックによって呼び出されてから、BaseScatterLayer.default-shape-factory を呼び出すことによって、あるいはファクトリー プロシージャが BaseScatterLayer.scatter-shape に設定されていれば、そのファクトリー プロシージャを呼び出すことによって、実際に形状を生成します。
このメソッドは、対応するロジックを実装するために、ScatterLayerBubbleLayer の両方によってオーバーライドされます。このメソッドは内部的に呼び出されるだけですが、独自のロジックを提供するようにオーバーライドできます。