Vvidget Code Reference Manual
The Templates section defined how to use templates and the Dictionary section described which templates are available. Furthermore, the Vvidget Builder User Manual gives voluminous information regarding making Vvidget Builder documents and it has been noted that a template is just a Vvidget Builder document with specialized components (some with specified names) and you can open those template documents with Vvidget Builder and observe those specialized components. But, what is not written is what you can do with those documents that is described in the manuals but which may not have occurred to you that it may have relevance to a template document. The list below, which is redundant, may serve to provide some ideas for template specialization in your own applications.
- Graphical Appeal: The first thing to note is that you can change colors and states of the graphics. For example, turn grids on and off and give them different colors. In addition, things like gradients can spice up a picture and make it look appealing but at the same time such effects can also encumber the presentation of the actual data. So for that reason, the default templates look somewhat spartan and not so fancy. After copying the default templates into your own application's directory and then adding that directory (folder) to your project and get your app running with those templates then you might want to spice your application's templates up a bit to make your app look more appealing.
- Graphical Attributes: Some graphical attributes are actually not just for appeal but are rather important to data interpretation. Certainly grid and dash attributes fall into that category. Altering such attributes are important and you may need to do so simply as a matter of necessity.
- Graph Limits: The graphs in Vvidget Code are setup to autoscale to the data you supply. In addition there are some Graph Oriented keys that help to control axis limits. In addition, you can open a template, focus on the graph and choose the graph's Autoscaler Inspector Editor and fine tune the autoscaler performance. You may wish to have autoscale only in one dimension in which case simply turn off the autoscaler in the remaining direction(s).
- Polymorphic Use: The code that Vvidget Code is based on has been refactored many times over the course of two decades. As a result it is highly structured, object-oriented, modular and lots of other good things. Beyond the normal code architecture buzzwords the basis of Vvidget Code is also highly polymorphic. In a practical terms that means that you might be able to solve problems not documented in this manual or conceived as important within the context of Vvidget Code. For example, the Column Chart dictionary only specifies a linear coordinate representation. You may want to delete the linear graph in that template and place a semilog graph there instead and then name the graph as before and add the data graphics as in the original template. Thus you could obtain a semilog column chart if that is what you want. But, some care must be taken since columns are assumed to rise from y equals 0. To get around this you should clip to the graph frame (see the Graph's Graphics Inspector Editor) and also turn off the minimum y-axis autoscaler and assign the graph's y-minimum value to the value that you wish to appear on the graph. Similarly you might be able to make a trajectory graph where only a scatter graph is specified.
- Efficiency: A "Skin" is a Vvidget Builder document (bundle) that is translated to a compressed flat representation (a file). A skin can not be opened by Vvidget Builder, but it can be opened up by a Vvidget Code based application and is treated as a template. Once you have your application running the way you want you may want to move your templates directory to another location and then export the templates, using Vvidget Builder or the vvizard CLI tool, to a templates folder within your project. If you do that then give the Skin file the same name as the template (with book extension). Using skins makes your application smaller and more efficient when the template is loaded.
- Easy: Templates and dictionaries are easy to understand, there are few indirections and this manual is of moderate size. To contrast, the full object-oriented frameworks that Vvidget Code uses to make a graph is extensive, has many indirections, is overwhelming to digest within the usual constraints of development, and has a manual which is a few thousand pages long. The use of templates seem to be a good compromise which gives access to a lot of features without much effort.
- One Graph Per View: Notice how you can only have one graph per view. That is certainly a limitation, however there is nothing preventing you from having many VvidgetCodeView instances as subviews of a view within the window of your own application. Thus the one graph per view limitation is somewhat muted.
Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information. |