Area Chart | An area chart geometry automatically generated based on the Values input property. | |
Line Chart | A line chart geometry automatically generated based on the Values input property. |
Based on an array of numeric values, the chart nodes create a 3D geometry which dynamically changes as the values are changed. This makes Ventuz ideally suited for dynamic business presentations or election news reports. The author of the scene designs the look and feel in advance, but the actual values can come from an up-to-date, external source.
The ValuesAreXYPairs defines if the input array contains only Y values or XY value pairs in the format (X0, Y0, X1, Y1, X2, Y2,...). Note that in case of XY value pairs the X values have to be ascending. The value pairs are only taken into account until an X value is detected that is smaller or equal than its predecessor - in other words: the Chart nodes do not sort XY pairs by its X component! When a following X value is lower than one before, the graph will not render any subsequent points.
It is also important to understand that the SizeX property behaves differently in case of XY value pairs. If the input array contains only Y values, they are distributed evenly in an X range from 0 to 1. SizeX then just scales the resulting geometry but the underlying math just operates in 0 <= X <= 1; This becomes obvious by the LastValueX value which in this case always stays 1. If the input array provides XY values pairs then of course the X values come from the input array and are not limited to a certain range. In this case the SizeX property acts as a maximal geometry extend in positive and negative X direction. This means that e.g. in case of SizeX = 20 the chart geometry will never exceed the X position [-20, 20], even though the input X components can be larger. The resulting geometry is just scaled down in X to fit inside this limit. This distinction between Y only and XY value pairs is also important when it comes to the EvaluationX input property. The Chart nodes calculate the corresponding Y values (Evaluation output properties) for an input X. In case of Y only inputs the EvaluationX is only valid in the range [0, 1]; in case of XY value pairs the valid X range is not limited. The evaluated value is always the incoming X value of the value pair. So if the geometry is scaled down with the SizeX property, the evaluation is still done with the incoming X value and not the Position X value!
The Size values in X and Z define the dimensions of the chart geometry in their respective directions. ScaleY is a scaling factor for the Y input values which actually populate the chart.
What makes the chart geometries particularly interesting are the Visibility Properties. The X property can be used to restrict the horizontal region that is rendered. By animating this value, the chart can dynamically grow as time goes by. By default, a point is rendered for every value in the input array. The Y property specifies if All or only Positive or Negative chart segments should be displayed. By deactivating ShowZeros, no chart segment is rendered for consecutive zero values. This all can be used to achieve some nice effects by using two graphs, one for positive and one for negative values and placing the nodes underneath each other and providing them with the same input values. This way the graph can have a different material whether it is positive or negative.
The StopFlag is a custom value that when encountered in the input array will prevent the graph from rendering any subsequent values. For example, if the stop value is 1111, the input array contains 10 values and the third value is 1111, only the first two values are visualized. This is handy when using values coming from an external data source. For example, some stock exchange rate software might send its values to Ventuz and put it into a comma separated string. This string can be bound to the input values property and the chart will automatically extract the individual numeric values.
Mathematically the LineChart has the same foundation as the AreaChart - only the visual representation of the input values differ. Additionally the LineChart node has two more properties than the AreaChart. These properties define the characteristic of the line geometry. Strength specifies the strength of the line segments. CornerThreshold defines from which angle the corner of two adjacent line segments is beveled.
Both Chart nodes have a few output properties that provide some characteristics of the input array and the resulting geometry. The LastValue properties provide the last visible value pair based on the original input values. The LastPos provide the last visible value pair in the local 3D space of the chart geometry. These value are affected by the Size properties. The MinPos properties provide the position of the smallest Y value in the local 3D space of the chart geometry. MaxPos does the same for the largest Y value. The VisibilityXMarker output array provides values which indicate if a key value from the Values input array is visible. 1 means that the according key is visible. 0 indicates that the key is not visible. A value >0 & <1 means that the VisibilityX lies between two key values.
Output | Description |
VisibilityXMarker | array providing values which indicate if a key value from the Values input array is visible: 1 means that the according key is visible; 0 indicates that the key is not visible; a value >0 & <1 means that the VisibilityX lies between two key values. |
EvaluationValueX | the X value for evaluation of the corresponding Y value (y = f(x)) |
EvaluationValueY | the Y value for the corresponding X value |
EvaluationPosX | the corresponding X value for the evaluation in the local 3D space of the chart geometry |
EvaluationPosY | the corresponding Y value for the evaluation in the local 3D space of the chart geometry |
FirstValueX | the X value of the first key point |
FirstValueY | the Y value of the first key point |
FirstPosX | the corresponding X value of the first key point in the local 3D space of the chart geometry |
FirstPosY | the corresponding Y value of the first key point in the local 3D space of the chart geometry |
LastVisibleValueX | the X value of the last visible point depending on the VisibilityX property |
LastVisibleValueY | the Y value of the last visible point depending on the VisibilityX property |
LastVisiblePosX | the corresponding X value of the last visible point depending on the VisibilityX property in the local 3D space of the chart geometry |
LastVisiblePosY | the corresponding Y value of the last visible point depending on the VisibilityX property in the local 3D space of the chart geometry |
LastValueX | the X value of the last key point |
LastValueY | the Y value of the last key point |
LastPosX | the corresponding X value of the last key point in the local 3D space of the chart geometry |
LastPosY | the corresponding Y value of the last key point in the local 3D space of the chart geometry |
MinValueX | the X value of the key point with smallest Y value |
MinValueY | the Y value of the key point with smallest Y value |
MinPosX | the corresponding X value of the key point with smallest Y value in the local 3D space of the chart geometry |
MinPosY | the corresponding Y value of the key point with smallest Y value in the local 3D space of the chart geometry |
MaxValueX | the X value of the key point with largest Y value |
MaxValueY | the Y value of the key point with largest Y value |
MaxPosX | the corresponding X value of the key point with largest Y value in the local 3D space of the chart geometry |
MaxPosY | the corresponding Y value of the key point with largest Y value in the local 3D space of the chart geometry |