Now, we check if the x-scaling of the current container (that is, the container holding the script) is greater than 1.5, and, depending on the result, we set the x-scaling of the container named cube to 2.0 or 1. If there is no such container, cube is set to Null, the consequence being that any further operations on cube will have no effect. In the next line, we call the built-in function FindContainer (which is a member of the scene class, accessible via the container's Scene property) to initialize cube to point to a container named cube. Variables of type Container can be initialized to point to a container in the scene tree. In the first line, a variable named cube, of type Container, is defined: The following example defines the event procedure OnExecPerField, which is called periodically for each field. To execute the script, click the Compile & Run button.
#Scriptcase chart 2d combination code#
Similarly, the code in the body of OnLeave sets the alpha value back to 50. Changes made to Alpha.Value are immediatly made visible in the output window. Alpha refers to the container's alpha object, Value is a member (in this case: the only member) of the alpha object, representing its value. If there is no Alpha object, no action occurs, so make sure that the container has an alpha object by adding the Alpha plugin.
![scriptcase chart 2d combination scriptcase chart 2d combination](https://s2.studylib.net/store/data/018838560_1-08e64701cb2867a0075656d289518e18.png)
At the top of the dialog you will see a couple pre-canned combo charts. Click the All Charts tab and select the Combo category. Go to the Insert tab and click Recommended Charts. Select the data you would like to use for your chart. To follow along, use this sample workbook. This code sets the alpha value of the container to 100 (the maximum value). Combining different chart types and adding a secondary axis. Take a closer look at what happens inside OnEnter: This script consists of two event procedures, OnEnter and OnLeave, which are recognized by the system and invoked whenever the mouse cursor enters or leaves the area occupied by the container in the output window. Then, after clicking on the container's new script object, copy and paste the following code into the the Script Editor. First, create a script object by dragging the built-in Script plugin from the Container Plugins’ Global folder onto one of your containers.
![scriptcase chart 2d combination scriptcase chart 2d combination](https://i.ytimg.com/vi/Hjf9KJFUcSs/maxresdefault.jpg)
![scriptcase chart 2d combination scriptcase chart 2d combination](https://s3.manualzz.com/store/data/027298461_1-f9fe013e8a4aa67a8567f6930c4b9dae.png)
#Scriptcase chart 2d combination how to#
This section contains two examples one showing how to write a simple script that controls the alpha value of an object (see Example I), the second how to write a simple script that scales a container’s x-scaling value based on another container’s x-scaling value (see Example II).Īs an example, start with a simple event-driven script.