Skip to content

Orientation

g$ edited this page Mar 1, 2022 · 1 revision

With the coming of package 2.x.x you can create charts in the "horizontal" orientation, meaning the chart geometry is going horizontally.

The first thing this means is that ValueAxis and CategoryAxis can now bind to either horizontal or vertical sides of the chart. Let's formally define what "orientation" means in YACC.

  • vertical: the x-component is category and the y-component is value. Chart elements (like bars) orient up-and-down.
  • horizontal: the x-component is value and the y-component is category. Chart elements orient side-to-side.
  • discrete 2d: the x-component is category and the y-component is category, for example a Heatmap (part of 2.x.x).
  • 2d: the x-component is value and the y-component is value, for example a Scatter (not yet available).

Internally, the ISeriesData values do not change with the orientation. The category value is always mapped to X and the value is always mapped to Y.

The only time coordinates are "flipped" is when actually generating geometry, for example a Rectangle created by the column series.

Clone this wiki locally