PieSet (クラス)
public abstract PieSet {inherits Shape, Observer}
パッケージ: CURL.GUI.CHARTS
直接継承しているサブクラス: StandardPieSet

PieChart の環または円を表すクラス。

説明

PieSet オブジェクトは、プロットされるデータおよびそのプロット方法を定義するために使用します。サブクラス化が可能であるように設計されているので、独自のグラフ スタイルを作成できます。ただし、標準実装 StandardPieSet によってほとんどの要件は満たされます。
PieSet.label-factory を使用するか、各種のオプションを設定することにより、このグラフのラベルの外観をカスタマイズできます。ラベルのみを変更するオプションの場合、PieSet.label-group でそのオプションを設定できます。そうでなければ、PieSet で設定するか、PieChart または PiePlotArea でも設定できます。
同様に、PieSet.shape-factory を使用するか、各種のオプションを設定して、くさび形の外観をカスタマイズできます。PieSet.wedge-group は、くさび形状の Shape 親であるため、くさび形のみを変更するオプション設定にこれを使用できます。

注意事項

Shape オブジェクトを PieSet 自体に追加することによって、グラフに注釈を付けることは一般的です。PieSet の原点は、プロット エリアの中央に位置する PiePlotArea のそれと同じです。PieSet は、PieSet.update-layout 時に形状の子をクリアします。これは、この実装に追加されたオブジェクトがすべてレイアウト処理中に削除されることを意味します。
ChartLayoutChanged イベントに応答するグラフの注釈を配置するようにお勧めします。これにより、削除されている可能性があるオブジェクトを追加できるようになります。
次の非ローカル オプションは、特に、PieSet に適用します。
(この一覧では、PieSet の子に適用するオプションは含まれていないことに注意してください。たとえば、color は、TextShape によって使用されますが、これは、ラベルに影響することを意味します。)

この例は、グラフの中央に飾りの星形が追加されていることを示しています。(BaseScatterLayer.generate-stock-shape は、星形を作成するために使用されます。

例: PieSet の注釈付け
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{AntialiasedFrame
    {PieChart
        width = 8cm,
        height = 8cm,
        inner-radius = 2cm,
        {PieSet
            sample-records,
            "Age",
            {on ChartLayoutChanged at pie-set:PieSet do
                {pie-set.add
                    {BaseScatterLayer.generate-stock-shape
                        pie-set,
                        ScatterShape.star,
                        {Distance2d 0m, 0m},
                        2cm,
                        2cm,
                        1px,
                        LineStyle.solid,
                        "gold"
                    }
                }
            }
        }
    }
}
複数円セットの例などの詳細については、PieChart を参照してください。

コンストラクタ
default:新規の PieSet を初期化します。
コンストラクタ protected {PieSet.default
label-data:#ChartDataSeries = null,
label-value?:bool = false,
label-set?:bool = false,
wedge-labels?:bool = true,
wedge-group:Shape = {ShapeGroup},
label-group:Shape = {ShapeGroup},
shape-factory:PieSet.ShapeFactory = PieSet.default-shape-factory,
label-factory:PieSet.LabelFactory = PieSet.default-label-factory,
border-color:FillPattern = FillPattern.black,
...
}
default:新規の PieSet を作成します。
ファクトリ public {PieSet.default
label-data:#ChartDataSeries = null,
label-value?:bool = false,
label-set?:bool = false,
wedge-labels?:bool = true,
wedge-group:Shape = {ShapeGroup},
label-group:Shape = {ShapeGroup},
shape-factory:PieSet.ShapeFactory = PieSet.default-shape-factory,
label-factory:PieSet.LabelFactory = PieSet.default-label-factory,
border-color:FillPattern = FillPattern.black,
...
}:PieSet

プロパティ
chart:この PieSet を含む PieChart (ある場合)。
フィールド public-get private-set PieSet.chart:#PieChart
color-associations:特定の色を特定の Record に関連付けるマッピングを提供します。
フィールド public constant PieSet.color-associations:{Array-of PieColorAssociation} ={new {Array-of PieColorAssociation}}
label-data:くさび形ラベルと凡例項目に使用されるデータを定義する ChartDataSeries
アクセサ public PieSet.label-data:#ChartDataSeries
セッター public PieSet.label-data:#ChartDataSeries
label-factory:この PieSet 内の各くさび形ラベル Shape を生成するために使用されるファクトリ プロシージャ。
アクセサ public PieSet.label-factory:PieSet.LabelFactory
セッター public PieSet.label-factory:PieSet.LabelFactory
label-group:生成されたすべてのくさび形ラベル Shape のコンテナとして使用される Shape
フィールド public constant PieSet.label-group:Shape
label-set?:true の場合、くさび形ラベル (生成された場合) にはグラフ化されるデータの 1 つ以上の RecordField.caption 値が含まれます。
アクセサ public PieSet.label-set?:bool
セッター public PieSet.label-set?:bool
label-value?:true の場合、くさび形ラベル (生成された場合) にはそのくさび形でのデータの値が表示されます。
アクセサ public PieSet.label-value?:bool
セッター public PieSet.label-value?:bool
labels:この PieSet のくさび形ラベルを表す Shape を含む配列。
フィールド public constant PieSet.labels:{Array-of Shape} ={new {Array-of Shape}}
legend-enabled?:Chart の凡例作成を有効または無効にするために使用できる bool
非ローカル オプション public PieSet.legend-enabled?:bool
legend-entry-factory:Chart の凡例の個別の凡例項目を生成するために使用されるファクトリ プロシージャ。
非ローカル オプション public PieSet.legend-entry-factory:LegendEntryFactory
pie-label-radius:PieSet 内でラベルが配置される場合の半径。
非ローカル オプション public PieSet.pie-label-radius:any
pie-set-inner-margin:PieChart 内の連続した PieSet の間の余白。
非ローカル オプション public PieSet.pie-set-inner-margin:any
pie-set-shape-quality:PieSet のくさび形の形状を作成する際に必要な品質。
非ローカル オプション public PieSet.pie-set-shape-quality:Fraction
pie-set-starting-angle:PieSet でそのくさび形 Shape の生成が始まる Angle
非ローカル オプション public PieSet.pie-set-starting-angle:Angle
pie-wedge-border-line-style:PieSet 内で生成された Shape に適用される LineStyle
非ローカル オプション public PieSet.pie-wedge-border-line-style:LineStyle
pie-wedge-border-width:PieSet 内に生成される Shape に適用される境界幅。
非ローカル オプション public PieSet.pie-wedge-border-width:any
set-data:この PieSet でプロットされる ChartDataSeries
フィールド public constant PieSet.set-data:ChartDataSeriesArray ={ChartDataSeriesArray}
shape-factory:この PieSet 内の各くさび形 Shape を生成するために使用されるファクトリ プロシージャ。
アクセサ public PieSet.shape-factory:PieSet.ShapeFactory
セッター public PieSet.shape-factory:PieSet.ShapeFactory
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public PieSet.style-element:String
wedge-group:生成されたすべてのくさび形 Shape のコンテナとして使用される Shape
フィールド public constant PieSet.wedge-group:Shape
wedge-labels?:false の場合、他のプロパティ値に関係なく、くさび形ラベルは生成されません。
アクセサ public PieSet.wedge-labels?:bool
セッター public PieSet.wedge-labels?:bool
wedges:この PieSet のくさび形を表す Shape を含む配列。
フィールド public constant PieSet.wedges:{Array-of Shape} ={new {Array-of Shape}}
プロパティ 継承 Shape: as-Shape, border-color, color, draw-operation, option-parent, 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, display-context, dragee, font-size, input-method-enabled?, input-method-keyboard-mode, name, options, options-present-here, style-class, style-manager, style-options, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, registered-option-keys

クラス変数と定数
LabelFactory:各くさび形ラベルの PieSet Shape 要素の生成に使用されるファクトリー プロシージャの Type。これは、オプション PieSet.label-factory の型です。
public constant PieSet.LabelFactory:ProcType ={proc-type {pie-set:PieSet, set-label:#String, data-label:#String, value-label:#String, position:Distance2d, data:ChartDataSeries, record:Record, record-index:int, inner-radius:Distance, outer-radius:Distance, total-radius:Distance, start-angle:Angle, stop-angle:Angle }:Shape }
ShapeFactory:各くさび型の PieSet Shape 要素の生成に使用されるファクトリー プロシージャの Type。これは、オプション PieSet.shape-factory の型です。
public constant PieSet.ShapeFactory:ProcType ={proc-type {pie-set:PieSet, data:ChartDataSeries, record:Record, record-index:int, inner-radius:Distance, outer-radius:Distance, start-angle:Angle, stop-angle:Angle, max-error:Distance, fill-pattern:FillPattern, border-width:any, border-line-style:LineStyle }:Shape }

クラス プロシージャ
default-label-factory:PieSet.label-factory の既定値。
public {PieSet.default-label-factory
pie-set:PieSet,
set-label:#String,
data-label:#String,
value-label:#String,
position:Distance2d,
data:ChartDataSeries,
record:Record,
record-index:int,
inner-radius:Distance,
outer-radius:Distance,
total-radius:Distance,
start-angle:Angle,
stop-angle:Angle
}:Shape
default-shape-factory:PieSet.shape-factory の既定値。
public {PieSet.default-shape-factory
pie-set:PieSet,
data:ChartDataSeries,
record:Record,
record-index:int,
inner-radius:Distance,
outer-radius:Distance,
start-angle:Angle,
stop-angle:Angle,
max-error:Distance,
fill-pattern:FillPattern,
border-width:any,
border-line-style:LineStyle
}:Shape

メソッド
append-color-association:PieSet.color-associationsPieColorAssociation を追加します。
public {PieSet.append-color-association
association:PieColorAssociation
}:void
append-data-series:グラフ作成される PieSet.set-dataChartDataSeries を追加します。
public {PieSet.append-data-series data:ChartDataSeries}:void
compute-data-abs-sum:この PieSet 内のデータの絶対値の合計を計算します。
public {PieSet.compute-data-abs-sum}:any
create-legend-entries:この PieSet に必要な凡例項目を作成します。
public {PieSet.create-legend-entries
container:{Array-of Graphic},
entries-already-created:PieLegendKeySet
}:void
detach:この形状を親から切り離します。
public {PieSet.detach}:void
draw:このオブジェクトの可視表現を描画します。
public {PieSet.draw r2d:Renderer2d}:void
estimate-bounds:この PieSet に必要な境界を見積もります。
public {PieSet.estimate-bounds
pie-set-index:int,
inner-radius:Distance,
outer-radius:Distance,
total-radius:Distance,
dest:GRect = {GRect.empty}
}:GRect
get-data-series-from-shape:Shape に関連した ChartDataSeries を決定します (ある場合)。
public abstract {PieSet.get-data-series-from-shape
shape:Shape
}:#ChartDataSeries
get-fill-pattern-for-record:この PieSetRecord の 1 つのグラフ作成で使用する FillPattern を取得します。
public {PieSet.get-fill-pattern-for-record
record:Record,
record-index:int
}:FillPattern
get-label-position:くさび形ラベルの位置を計算します。
public {PieSet.get-label-position
data:ChartDataSeries,
record:Record,
record-index:int,
inner-radius:Distance,
outer-radius:Distance,
total-radius:Distance,
start-angle:Angle,
stop-angle:Angle
}:Distance2d
get-outside-margin:このグラフでその一番外側からグラフの境界または凡例までの必要スペースを決定します。
public {PieSet.get-outside-margin}:Distance
get-own-bounds:ローカル座標系におけるこの Shape の四角形のレンダリング境界を計算します。
public {PieSet.get-own-bounds dest:GRect = {GRect.empty}}:GRect
get-record-at-point:指定の位置に RecordChartDataSeries、および Shape があれば、それらを確認してください。
public abstract {PieSet.get-record-at-point}:(r:#Record, data:#ChartDataSeries, shape:#Shape)
get-wedge-size:この PieSet 内のすべての値の合計に対する 1 つの値の割合を決定します。
public {PieSet.get-wedge-size value:any}:Fraction
handle-observer-message:監視対象のオブジェクトがメッセージを送信するときにこのメソッドを呼び出します。Observer はこのメソッドを実装して、変更が発生したときに処理を実行する必要があります。
protected {PieSet.handle-observer-message
sender:Observable,
message:any
}:void
non-keyword-init-arg: InitRestArgParser.process-rest-args で非キーワード引数が検出されると、呼び出されます。
public {PieSet.non-keyword-init-arg a:any}:void
note-color-associations-changed:この PieSetPieSet.color-associations の内容が変更されたことを通知します。
public {PieSet.note-color-associations-changed}:void
note-set-data-array-changed:この PieSetPieSet.set-data の順序が変更されたことを通知します。
public {PieSet.note-set-data-array-changed}:void
remove-color-association:PieColorAssociationPieSet.color-associations から削除します。
public {PieSet.remove-color-association
association:PieColorAssociation
}:void
remove-data-series:ChartDataSeriesPieSet.set-data から削除します。
public {PieSet.remove-data-series data:ChartDataSeries}:void
self-contains-point?:ポイントがこの Shape 内にあるかどうかを判定します。
public {PieSet.self-contains-point? x:Distance, y:Distance}:bool
self-intersects-polygon?:ポリゴンがこの Shape と交差するかどうかを判定します。
public {PieSet.self-intersects-polygon?}:bool
update-layout:この PieSet の内部レイアウトを更新します。
public abstract {PieSet.update-layout
pie-set-index:int,
inner-radius:Distance,
outer-radius:Distance,
total-radius:Distance
}:void
メソッド 継承 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-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, 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, add-option, add-style-option, 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, release-key-focus, remove-option, remove-style-option, request-key-focus, scroll-to-include, test-record, test-run, xy-offset-to
メソッド 継承 GraphicOptions: any-to-Distance
メソッド 継承 GuiEventTarget: 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-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: 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-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 (コンストラクタ)
protected {PieSet.default
label-data:#ChartDataSeries = null,
label-value?:bool = false,
label-set?:bool = false,
wedge-labels?:bool = true,
wedge-group:Shape = {ShapeGroup},
label-group:Shape = {ShapeGroup},
shape-factory:PieSet.ShapeFactory = PieSet.default-shape-factory,
label-factory:PieSet.LabelFactory = PieSet.default-label-factory,
border-color:FillPattern = FillPattern.black,
...
}

新規の PieSet を初期化します。

説明

PieSet は抽象クラスであるので、このコンストラクタはサブクラスによってのみ使用されます。PieSet をインスタンス化する標準的な方法、およびこのコンストラクタが受け取るパラメータについては、PieSet.default#factory を参照してください。


default (ファクトリ)
public {PieSet.default
label-data:#ChartDataSeries = null,
label-value?:bool = false,
label-set?:bool = false,
wedge-labels?:bool = true,
wedge-group:Shape = {ShapeGroup},
label-group:Shape = {ShapeGroup},
shape-factory:PieSet.ShapeFactory = PieSet.default-shape-factory,
label-factory:PieSet.LabelFactory = PieSet.default-label-factory,
border-color:FillPattern = FillPattern.black,
...
}:PieSet

新規の PieSet を作成します。

label-data: ラベルを提供するために使用される ChartDataSeries (ある場合)。PieSet.label-data を参照してください。この値が null であると、ラベルも凡例項目も作成できません。
label-value?: true の場合で、wedge-labels?true である場合、くさび形ラベルにはそのくさび形用のデータの値が含まれます。
label-set?: true の場合で、wedge-labels?true である場合、くさび形ラベルには ChartDataSeries を定義するフィールドの名前が含まれます。これは、複数の円セットを含むグラフの場合に役立ちます。
wedge-labels?: false の場合、label-value?label-set?、および label-data の値に関係なく、くさび形にラベルは生成されません。
wedge-group: 生成されたすべてのくさび形 Shape のコンテナとして使用される Shape。これを使用して、くさび形にのみ適用されるオプションを設定できます。PieSet.wedge-group を参照してください。
label-group: 生成されたすべてのくさび形ラベル Shape のコンテナとして使用される Shape。これを使用して、ラベルにのみ適用されるオプションを設定できます。PieSet.label-group を参照してください。
shape-factory: PieSet.shape-factory の初期値。このプロシージャは、くさび形 Shape の作成を制御します。PieSet.ShapeFactory も参照してください。
label-factory: PieSet.label-factory の初期値。このプロシージャは、くさび形ラベル Shape の作成を制御します。PieSet.LabelFactory も参照してください。
border-color: くさび形の境界線として使用される色を記述する FillPattern。この値は、border-color 非ローカル オプションの初期化に使用されるだけです。
...:
残余引数は、PieSet.color-associations に追加するために PieColorAssociation とするか、Shape.default が受け取るいずれかの引数 (EventHandler やオプションの初期化など) とすることができます。
... を使用して、次の 2 つのいずれかの方法でプロットされるデータ系列を初期化することもできます。
  • 1 つの RecordSet とそれに続けて該当する RecordSet からの任意の数のフィールド指定を、フィールドを命名する StringInterface として、あるいは RecordField オブジェクトとして渡すことができます。これらは ChartDataSeries オブジェクトに変換されて、PieSet.set-data に追加されます。
  • PieSet.set-data への直接追加のために、任意の数の ChartDataSeries オブジェクトを渡すこともできます。指定の PieSet 内のすべてのデータ系列は同じ RecordSet を原点とし、同じ Domain (したがって同じ Type) を使用する必要があることに注意してください。
プロットされるすべてのデータは数値である必要があることに注意してください。

説明

これはコンストラクタではなく、ファクトリーです。PieSet が抽象クラスであるためです。このファクトリーは、標準実装 StandardPieSet のインスタンスを作成して、返します。この情報は、PieSet または StandardPieSet をサブクラス化したい場合にだけ必要です。

PieChart を参照してください。



プロパティ詳細
chart (フィールド)
public-get private-set PieSet.chart:#PieChart

この PieSet を含む PieChart (ある場合)。

説明

このプロパティは、PieSetPieChart に追加されるとすぐに設定されます。


color-associations (フィールド)
public constant PieSet.color-associations:{Array-of PieColorAssociation} ={new {Array-of PieColorAssociation}}

特定の色を特定の Record に関連付けるマッピングを提供します。

説明

PieColorAssociation を使用して、自動カラー選択プロセスをオーバーライドできます。ほとんどのアプリケーションは、すべてのセットに使用されるカラー パレットをオーバーライドするために、Chart.color-palette を使用します。ただし、何かの理由で、個別の円セットでこれを制御したい場合、あるいは PieSet 間で異なる方法でこれを制御したい場合は、使用するメカニズムは PieSet.color-associations です。
PieColorAssociationPieSet コンストラクタに提供できます。あるいは PieSet.append-color-associationPieSet.remove-color-association、または直接操作を使用して、関連付けを変更できます。
この配列のどんな直接操作でも許されます。ただし、プロットと関連要素が再生成されるように、配列が変更された場合には、必ず PieSet.note-color-associations-changed を呼び出す必要があります。

この例では、PieSet の両方ではなく一方だけ、「Nova」のレコードの色がどのように赤に変わるかに注意してください。

例: PieSet.color-associations を使用しての Record の色の変更。
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{PieChart
    width = 10cm,
    height = 10cm,
    pie-set-inner-margin = 6mm,
    {PieSet
        sample-records,
        "Age",
        {PieColorAssociation
            "Name",
            "Nova",
            FillPattern.red
        },
        wedge-labels? = false,
        label-data =
            {ChartDataSeries sample-records, "Name"}
    },
    {PieSet
        sample-records,
        "Age",
        wedge-labels? = false,
        label-data =
            {ChartDataSeries sample-records, "Name"}
    }
}


label-data (アクセサ)
アクセサ public PieSet.label-data:#ChartDataSeries
セッター public PieSet.label-data:#ChartDataSeries

くさび形ラベルと凡例項目に使用されるデータを定義する ChartDataSeries

説明

label-data を指定しないと、PieSet は、ラベルや凡例項目を作成できません。使用されるフィールドを判断する方法がないからです。
このデータ系列は、PieSet.set-data 内の要素と同じ RecordSet からのものである必要はありませんが、PieSet.set-data 内のすべての Record は、label-data で参照される RecordField を持っていなければなりません。

PieChart を参照してください。


label-factory (アクセサ)
アクセサ public PieSet.label-factory:PieSet.LabelFactory
セッター public PieSet.label-factory:PieSet.LabelFactory

この PieSet 内の各くさび形ラベル Shape を生成するために使用されるファクトリ プロシージャ。

説明

独自のプロシージャを提供して、この PieSet でのラベルの生成を変更することができます。このプロシージャは、円セットごとに複数回呼び出され、PieSet.set-data の各データ系列内のレコードごとに 1 回呼び出されます。プロシージャの引数については、PieSet.ShapeFactory を参照してください。
形状ファクトリを変更することは、オプション設定が十分でない場合に、グラフの外観を変更するためには、望ましいメソッドです。例えば、形状ファクトリを変更することは、PieSet.wedges の内容を変更するよりもより望ましい方法です。PieSet.wedges の内容は時を選ばず再生成され、その場合は、すべての変更を再適用する必要があります。(ChartLayoutChanged イベントにに応じて再適用します。)
PieSet.wedge-labels?false である場合は、このファクトリーは呼び出されないことに注意してください。PieSet.label-set?PieSet.label-dataPieSet.label-value?set-labeldata-label、および value-label の値によっては、それそれが null となることがあります。実際、すべて null となる場合もあります。ラベルを表示したくない場合は、空の ShapeGroup を返すだけです。
既定のラベル ファクトリーは PieSet.default-label-factory です。一般的な方法では、ファクトリー プロシージャを定義して、既定のファクトリーを呼び出してから、結果を変更します。たとえば、Visual.tooltip などのオプションを変更できます。

この例では、PieSet.label-factory を使用して、ラベル String を変更してから、既定のファクトリーを呼び出します。

例: 次の使用: PieSet.label-factory
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{PieChart
    width = 14cm,
    height = 14cm,
    legend-enabled? = false,
    pie-label-radius = -1.5cm,
    color-palette = pastel-chart-color-palette,
    {PieSet
        sample-records,
        "Age",
        label-set? = true,
        label-value? = true,
        label-data =
            {ChartDataSeries sample-records, "Name"},
        label-group = {ShapeGroup color = "black"},
        label-factory =
            {proc {pie-set:PieSet,
                   set-label:#String,
                   data-label:#String,
                   value-label:#String,
                   position:Distance2d,
                   data:ChartDataSeries,
                   record:Record,
                   record-index:int,
                   inner-radius:Distance,
                   outer-radius:Distance,
                   total-radius:Distance,
                   start-angle:Angle,
                   stop-angle:Angle
                  }:Shape
                
                {if-non-null l = set-label then
                    set set-label = "Set: " & l
                }
                {if-non-null l = value-label then
                    set value-label = data.field.caption & ": " & l
                }
                {return
                    {PieSet.default-label-factory
                        pie-set,
                        set-label,
                        data-label,
                        value-label,
                        position,
                        data,
                        record,
                        record-index,
                        inner-radius,
                        outer-radius,
                        total-radius,
                        start-angle,
                        stop-angle
                    }
                }
            }
    }
}


label-group (フィールド)
public constant PieSet.label-group:Shape

生成されたすべてのくさび形ラベル Shape のコンテナとして使用される Shape

説明

このオブジェクトを使用して、ラベルだけに影響するオプションを設定できます。この値の独自の ShapePieSet.default#factory ファクトリーに渡すことができます。


例: PieSet.label-group を使用してのオプションによるラベル外観の変更
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{Canvas
    width = 13cm,
    height = 13cm,
    {PieChart
        width = 10cm,
        height = 10cm,
        {PieSet
            sample-records,
            "Age",
            label-data =
                {ChartDataSeries sample-records, "Name"},
            label-group =
                {ShapeGroup
                    color = FillPattern.red,
                    font-family = "serif",
                    font-style = FontStyle.italic
                }
        }
    }
}


label-set? (アクセサ)
アクセサ public PieSet.label-set?:bool
セッター public PieSet.label-set?:bool

true の場合、くさび形ラベル (生成された場合) にはグラフ化されるデータの 1 つ以上の RecordField.caption 値が含まれます。

注意事項

PieSet.wedge-labels?false である場合、このプロパティの値に関係なく、くさび形ラベルは作成されません。


例: 次の使用: PieSet.label-set?
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{PieChart
    width = 8cm,
    height = 8cm,
    pie-label-radius = -1cm,
    {PieSet
        sample-records,
        "Age",
        label-value? = true,
        label-set? = true
    }
}


label-value? (アクセサ)
アクセサ public PieSet.label-value?:bool
セッター public PieSet.label-value?:bool

true の場合、くさび形ラベル (生成された場合) にはそのくさび形でのデータの値が表示されます。

注意事項

PieSet.wedge-labels?false である場合、このプロパティの値に関係なく、くさび形ラベルは作成されません。


例: 次の使用: PieSet.label-value?
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
    location = "../docstring-support/gui/charts-doc.scurl"
}

{PieChart
    width = 8cm,
    height = 8cm,
    pie-label-radius = -1cm,
    {PieSet
        sample-records,
        "Age",
        label-value? = true
    }
}


labels (フィールド)
public constant PieSet.labels:{Array-of Shape} ={new {Array-of Shape}}

この PieSet のくさび形ラベルを表す Shape を含む配列。

説明

この配列は空となるか (くさび形ラベルがない場合)、PieSet.set-data 内のデータに含まれる Record ごとに 1 つの要素を格納します。これらは、PieSet.label-factory によって返された Shape です。
この配列は、単なるインスペクション用で、変更はできません。要素の順序を変更したり、要素を追加または削除したりしないでください。また、その内容は、グラフのレイアウト処理が行われるたびに変更されます。そのため、レイアウト処理が行われて初めてその内容が有効になります。EventHandlerChartLayoutChanged に対して使用し、これらの値が変更された時点で通知を受け取ることができます。
この配列内の Shape オブジェクトの変更は許可されます。ただし、一般的に PieSet.shape-factory にファクトリー プロシージャを提供して同じことを行うほうがはるかに容易です。レイアウトが変更された時点や形状の更新が必要となる時点を考慮する必要がないので、この手法をお勧めします。


legend-enabled? (非ローカル オプション)
public PieSet.legend-enabled?:bool

Chart の凡例作成を有効または無効にするために使用できる bool

説明

このオプションは通常、グラフ自体に設定されます。ただし、その意味は、個別の ChartLayer または