This project is read-only.

FoxCharts -- Y-Axis Labels

Topics: Enhancement Request
Aug 12, 2008 at 1:40 AM
I understand that you are planning on allowing a Format property for all labels and legends.  I'm sure that this will be very beneficial in most cases, but I think you can provide a more complete solution.

I have some instances where some or all of the Y=Axis labels will actually be character.  For instance, I have a case where the value of Zero is labelled "Average".  I have another where 100% will be labelled "Average", 75% will be labelled "Poor", and 125% will be labelled "Excellent".

I think that you could provide for this in at least a couple of different ways:

      (1)  Call a custom method which returns as its result the formatted label value.  Your default method will simply use the supplied Format property (as noted above).  We users could then customize this method as desired to return our own values.

or  (2)  Allow for a two column cursor which contains the legend value (first column) and formatted legend text (second column).  If this cursor is supplied, you can then just look up the value from the second column.


Aug 12, 2008 at 4:50 AM
Hi Jim,

I like the second idea.
Can you provide a sample for that ?
Aug 12, 2008 at 5:41 AM
Cesar --

Have a new property, YAxisLabelsCursor (or whatever you want to call it).  Default empty

If not empty, it contains the name of the cursor that holds the labels for the Y Axis.
    Field 1 = "Value"  --- The value being plotted on the Y-axis.
    Field 2 = "Label" --- The label as it is to be displayed.

What you've been doing until now has been to have the label be created as a transform() of the Value.

In my case, I would have some like:

Value       Label

      0         Failure
     .25         - 75 %
     .50         - 50 %
     .75        Poor
    1.00       Average
    1.25      Excellent
    1.50      Unbelievable

Furthermore, if the value is not found, leave the label blank.

Hope this helps,

Jim


Aug 12, 2008 at 5:18 PM
Cesar --

Since the thought of using another cursor was my idea, I feel free to say now that it's a bad idea.

Using a cursor to handle the labels for the Y-Axis would mean that it would already have to know the minimum, maximum, and scale values.  I think that's a terrible idea.

You have seemed resistant to providing a method which would return the formatted label.  Not sure why; it would seem (not knowing your code) rather easy to provide:


LParameters lnValue, lcFormat
      Return Transform (lnValue, lcFormat)


I would strongly urge you to include this; I think it would provide the greatest flexibility for those cases where something other than the normal Transform would be needed.