頂点の位置エンコーディング

Vertex Position Encoding

Data Illustrator のユニークな機能として、データを頂点やセグメントのプロパティにバインドする機能があります。この機能は、図形のプロパティだけでは記述が難しい視覚化デザインに便利です。データバインディングの動作は、頂点が手書きで描かれたものか、または高密度化 (densify) アクションによって生成されたものかによって異なります。

手書きで描かれた頂点

ラインツールまたはパスツールを使用してパスを描画する場合、頂点は手書きで描画されます。データを基にパスを繰り返した場合でも、Data Illustrator は繰り返されたパス上の頂点を手書きで描画されたものとみなします。Data Illustrator は現在、長方形、円、円弧の頂点へのデータのバインドを許可していません。

以下の例は、手書きで描画された頂点にデータをバインドして、三角形の棒グラフを作成する方法を示しています。まず、ペンツールを使用して三角形を描き、「Country」で繰り返します。次に、ダイレクト選択ツールを使用して上部の頂点を選択します。データにバインドされるすべての頂点がハイライト表示されます。頂点のY位置を変数「Count」にバインドします。ここで、データバインディングは各三角形の上部の頂点にのみ影響し、三角形の他の頂点は影響を受けないことに注意してください。

高密度化されたパス内の頂点

データによって線を高密度化 (densify)すると、頂点が生成され、データに関連付けられます。バインディングアクションは、パス上のすべての頂点に適用されます。以下の例では、各線が企業の経時的な株価を表す折れ線グラフの「スモールマルチプル(小さなグラフを並べたもの)」を作成します。まず、線に対して繰り返しアクションを実行し、線をグリッドレイアウトに配置します。各線は「company」を表します。次に、「Date」で線を高密度化します。最後に、「date」を頂点のX位置に、「price」を頂点のY位置にバインドします。最終的な結果は、グリッドに配置された折れ線グラフのセットになります。レイアウトパラメータを変更して、折れ線グラフをさまざまな方法で配置できます。

スモールマルチプルを前提として、コレクションのレイアウトを「なし (None)」に変更して、折れ線グラフが同じ軸を共有するようにすることもできます。レイアウトが削除されると、Data Illustrator は自動的に折れ線グラフのスケールを統一し、多重折れ線グラフを作成します。

A unique feature in Data Illustrateur is the ability to bind data to the properties of vertices and segments. This feature is useful for visualization designs that may be hard to describe using only shape properties. The behavior of data binding varies, depending on whether the vertices are drawn by hand, or generated by the densify action.

Vertices Drawn by Hand

When you use the Line Tool or the Path Tool to draw a path, the vertices are drawn by hand. Even if you repeat the path by data, Data Illustrateur still considers the vertices on the repeated paths drawn by hand. Data Illustrateur currently does not allow binding data to vertices in rectangles, pies and arcs.

The following example illustrates binding data to hand-drawn vertices to create a triangle bar chart. We first use the Pen Tool to draw a triangle, repeat it by “Country”, then we use the Direct Select Tool to select the top vertex. All the vertices that will be bound to data are highlighted. We bind the y positions of the vertices to the variable “Count”. Note that here data binding only affects the top vertex in each triangle, the other vertices in the triangles are not affected.

Vertices in Densified Path

When you densify a line by data, the vertices are generated and associated with data. The binding action will apply to all the vertices on the path. In the example below, we create a small multiple of line graphs, where each line represents the stock price of a company over time. We first perform the repeat action on a line, which places the lines in a grid layout. Each line represents a “company”. We then densify the lines by “Date”. Finally, we bind “date” to the x positions of the vertices, and “price” to the y positions of the vertices. The final result is a set of line graphs, placed in a grid. You can change the layout parameters to arrange the line graphs in different ways.

Given the small multiple, we can also change the layout of the collection to “None” so that the line graphs share the same axis. Once the layout is removed, Data Illustrateur automatically unifies the scales of the line graphs, creating a multi-line graph.