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

データを形状としてプロットする ChartLayer の実装。ScatterLayer とは対照的に、BubbleLayer は、別々のデータ系列を使用して各 Shape のサイズを決定します。これらは均一のサイズではありません。

説明

このクラスは、BaseScatterLayer の実装です。ほとんどの機能は、BaseScatterLayer に存在します。BubbleLayer は、Shape のサイズが 1 つまたは 2 つの追加の ChartDataSeries によって決定されるという動作を定義するだけです。特に、各データ ポイントでは、BubbleLayer.primary-size-data および BubbleLayer.secondary-size-data のそれぞれの値と各系列での最小値および最大値の比率でそのサイズが決定されます。bubble-shape-min-sizebubble-shape-max-size 内に収まるようにスケールが変えられます。
X と Y では、最小サイズと最大サイズが同じであることに注意してください。これを変更したい場合、ファクトリー プロシージャを BubbleLayer.scatter-shape に提供し、必要に応じて x-size および y-size パラメータを変更してから、BaseScatterLayer.default-shape-factory を呼び出すのが一番簡単な方法です。

注意事項

ChartLayer のこの実装では、Shape ファクトリー プロシージャを使用するためにほとんどの ChartLayer とは少々異なる原理に基づきます。ほとんどの ChartLayer は、default-shape-factory プロシージャを示す shape-factory オプションを提供します。
BaseScatterLayer は、代わりに BaseScatterLayer.scatter-shape を使用して、Shape 生成方法を定義します。このオプションは、生成される形状の自動判定、生成される ScatterShape の仕様、または呼び出されるファクトリー プロシージャを示す場合があります。詳細と例については、BaseScatterLayer.scatter-shape を参照してください。

注意事項

チャートに更にオブジェクトを追加することの説明は、ChartLayerを参照してください。
このオブジェクトは、"BubbleLayer"のスタイル ルールを記述することによってスタイル化することが出来ます。


例: バブル グラフ
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

The X size of each shape is determined by "Wins", and the
Y size is determined y "Height."

{LayeredChart
    width = 15cm,
    height = 7.25cm,
    {BubbleLayer
        sample-records,
        "Age",
        x-axis-data =
            {ChartDataSeries sample-records, "Name"},
        primary-size-data =
            {ChartDataSeries sample-records, "Wins"},
        secondary-size-data =
            {ChartDataSeries sample-records, "Height"}
    }
}

コンストラクタ
default:新規の BubbleLayer を作成します。
コンストラクタ public {BubbleLayer.default
primary-size-data:ChartDataSeries = {value {mandatory-keyword-arg-missing} {uninitialized-value-for-type ChartDataSeries} },
secondary-size-data:#ChartDataSeries = null,
x-axis-data:#ChartDataSeries = null,
stacking-mode:ChartStackingMode = ChartStackingMode.none,
scatter-shape:any = null,
border-color:FillPattern = FillPattern.black,
...
}

プロパティ
bubble-shape-max-size:BubbleLayer 内で生成されたプロット Shape の最大サイズ。
非ローカル オプション public BubbleLayer.bubble-shape-max-size:any
bubble-shape-min-size:BubbleLayer 内で生成されたプロット Shape の最小サイズ。
非ローカル オプション public BubbleLayer.bubble-shape-min-size:any
display-context:このオブジェクトに関連付けられている DisplayContext
非ローカル オプション public BubbleLayer.display-context:#DisplayContext
primary-size-data:生成された Shape の水平方向のサイズを (場合によっては垂直方向のサイズも) 決定するデータ系列。
アクセサ public BubbleLayer.primary-size-data:ChartDataSeries
セッター public BubbleLayer.primary-size-data:ChartDataSeries
secondary-size-data:生成された Shape の垂直方向のサイズを決定するデータ系列。
アクセサ public BubbleLayer.secondary-size-data:#ChartDataSeries
セッター public BubbleLayer.secondary-size-data:#ChartDataSeries
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public BubbleLayer.style-element:String
プロパティ 継承 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, 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 {BubbleLayer.get-size-for-datum
series:ChartDataSeries,
series-index:int,
record:Record,
record-index:int
}:(x-size:Distance, y-size:Distance)
handle-observer-message:監視対象のオブジェクトがメッセージを送信するときにこのメソッドを呼び出します。Observer はこのメソッドを実装して、変更が発生したときに処理を実行する必要があります。
protected {BubbleLayer.handle-observer-message
sender:Observable,
message:any
}:void
メソッド 継承 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, 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 {BubbleLayer.default
primary-size-data:ChartDataSeries = {value {mandatory-keyword-arg-missing} {uninitialized-value-for-type ChartDataSeries} },
secondary-size-data:#ChartDataSeries = null,
x-axis-data:#ChartDataSeries = null,
stacking-mode:ChartStackingMode = ChartStackingMode.none,
scatter-shape:any = null,
border-color:FillPattern = FillPattern.black,
...
}

新規の BubbleLayer を作成します。

primary-size-data: 生成されたデータ ポイントのサイズに適用される ChartDataSeriessecondary-size-data を指定しない場合、primary-size-data が全体のサイズを決定します。指定すれば、primary-size-data が水平方向のサイズを決定し、secondary-size-data が垂直方向のサイズを決定します。
secondary-size-data: 生成されたデータ ポイントの垂直方向のサイズを決定する ChartDataSeries (垂直方向、水平方向のサイズを、別々に制御する必要がある場合)。そうでない場合は、このパラメータを null にすることができます。
x-axis-data: ChartLayer.x-axis-data の初期値。この値は、指定されると、LayeredChart での自動 X 軸生成を変更するために使用されます。
stacking-mode: このグラフの初期 ChartStackingModeChartStackingMode.none 以外のスタッキング モードでは許可されるデータの型に制約が生じることに注意してください。詳細については、BubbleLayer.stacking-mode を参照してください。
scatter-shape: BubbleLayer.scatter-shape の初期値。このプロシージャは、プロットする Shape の作成を制御します。
border-color: この ChartLayer での Shape.border-color オプションの初期値。
...: データ系列、オプション、および他の項目の初期化の値。詳細については、ChartLayer.default を参照してください。

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



プロパティ詳細
bubble-shape-max-size (非ローカル オプション)
public BubbleLayer.bubble-shape-max-size:any

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

説明

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


bubble-shape-min-size (非ローカル オプション)
public BubbleLayer.bubble-shape-min-size:any

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

説明

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


display-context (非ローカル オプション)
public BubbleLayer.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 オプションでの変更をモニタリングするコードは、この可能性を考慮に入れ、この状況における望ましくない動作の実行を回避しなくてはなりません。


primary-size-data (アクセサ)
アクセサ public BubbleLayer.primary-size-data:ChartDataSeries
セッター public BubbleLayer.primary-size-data:ChartDataSeries

生成された Shape の水平方向のサイズを (場合によっては垂直方向のサイズも) 決定するデータ系列。

説明

プロット中に、primary-size-data によって参照される RecordField が使用され、BubbleLayer.y-axis-data からプロットされたそれぞれの Record で値が検索されます。この値は距離に変換されるので、最小値が bubble-shape-min-size に対応し、最大値が bubble-shape-max-size に対応します。
結果のサイズが Shape の水平方向サイズとして使用されます。BubbleLayer.secondary-size-datanull である場合、垂直方向サイズにも同じ値が使用されます。

BubbleLayer を参照してください。


secondary-size-data (アクセサ)
アクセサ public BubbleLayer.secondary-size-data:#ChartDataSeries
セッター public BubbleLayer.secondary-size-data:#ChartDataSeries

生成された Shape の垂直方向のサイズを決定するデータ系列。

説明

これは BubbleLayer.primary-size-data の垂直方向アナログ量です。詳細については、該当ドキュメントを参照してください。
このプロパティは null である場合があります。その場合は、生成される形状は、同じ水平と垂直の両方向のサイズをもちます。両サイズとも BubbleLayer.primary-size-data によって決定されます。

BubbleLayer を参照してください。


style-element (アクセサ)
アクセサ public BubbleLayer.style-element:String

スタイリングの目的のための、この Visual の "要素" や "型" です。

説明

この実装によって Visual._style-elementの値が返されますが、通常は定数を返すためにオーバーライドされます。

オーバーライド

Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入: バージョン 6.0





メソッド詳細
get-size-for-datum (メソッド)
protected {BubbleLayer.get-size-for-datum
series:ChartDataSeries,
series-index:int,
record:Record,
record-index:int
}:(x-size:Distance, y-size: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 の両方によってオーバーライドされます。このメソッドは内部的に呼び出されるだけですが、独自のロジックを提供するようにオーバーライドできます。


handle-observer-message (メソッド)
protected {BubbleLayer.handle-observer-message
sender:Observable,
message:any
}:void

監視対象のオブジェクトがメッセージを送信するときにこのメソッドを呼び出します。Observer はこのメソッドを実装して、変更が発生したときに処理を実行する必要があります。

sender: 変更があった Observable オブジェクトです。
message: これは、Observer からの変更に関する詳細情報が含まれています。詳細情報がない場合は NULL になります。