G1: What is new in this version?

G1: What is new in this version? (1.2) V 1.2 does not come with any additional graphs, but is a significant update in terms of the code. Below is the list, and how it impacts you.

  • Optimized code - The data points within the graph were previously a static array. This had potential problems of causing stack overflows, and was inherently ineffecient. This is gone now - you will notice that allocation is now dynamic, and is more effecient and will not cause stack overflows. On a user level, this is invisible to you. Be warned that MAX_DATA_POINTS, the initial allocation for the number of data points you could have in your graph, has been reduced from 100 to 20.

  • added SIMPLE_FRAME rectangle type. This will allow you to draw the frames with a simple rectangle as opposed to the previous popup only type.

  • Some routine bug fixes and Memory handling.

  • Re-wrote the function that printed titles. This function would not work if you had multiple graphs on the same screen - this is no more the case. The caveat is the title for your graph must fit within the frame for the graph.

  • API support to get user defined values on stylus tap

    This is a new feature that should help applications where you would like to do certain operations (like popping up some information when the user taps on a bar in a bar graph). This function will return a value corresponding to a specific data point, if your stylus is tapped within the boundaries of that point. Currently works only for BAR and STACKED BAR.

    How it works, and what you need to do

    1. you will need to input into your graph any variable you want for a specific data point - use the function grLibSetUserValue() - this takes a void * which means you have full control over what you want it to be, a Char * or a structure etc. You will need to do all necessary memory allocations, and ensure that the value sent in has valid information. You must typically call this routine right after you call the grLibInputGraphData. See Dograph() in app.c for an example of how it can be done.

    2. capture the penDownEvent, see app.c for how the event is captured. Then call grLibUserValueFromPenPoint() - this will return the void * which you must typecast to the original data type you intended it to be.

    3. The responsibility of freeing any memory etc. associated with the user value rests with you.

    How is this useful?

    It provides a significant "extensible" utility to your application. There can be information that cannot be captured on a small handheld - so the user could tap on the screen points and read more about that data. For e.g. if you plotted different service providers annual incomes on a bar, then you could tap one of them and read analysis comments on it. How it can be used it pretty much left to the developer - there are many possibilities.

    New stuff in 1.1

  • Line-Fill graph supported! (the area below the line is shaded)

  • Code comments improved/cleaned up.

  • Corrections in user manual and deployment package
  • Alphabetic index



    This page was generated with the help of DOC++.