ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Vertical Linear Meter customization
Posted by Steve on Apr-01-2013 03:19
I'm trying to use the Vertical Linear Meter but I want the labels on the left to be the
months of the year. There is a revenue goal of $100,000 per month. The meter will
display the total revenue so far this year. As the year progresses the meter will either
be red or green depending on whether the average revenue per month has been met.
Is this possible?
I think if I can understand how to have the labels on the left display the month name
yet have the bar correspond to the total revenue so far this year then I can figure out
the rest.
Any input would extremely highly appreciated!
-Steve

  Re: Vertical Linear Meter customization
Posted by Steve on Apr-01-2013 03:36
I just realized the flaw in my own logic from the original post. I guess my only real
question whether the labels on the left can be text (such as months of the year) as
opposed to numbers. Is there a way display MonthName(x) (I'm using ASP) on the
labels instead of the numeric 1-12?

  Re: Vertical Linear Meter customization
Posted by Peter Kwan on Apr-01-2013 23:28
Hi Steve,

You may use BaseMeter.setScale2. For example:

ReDim myNames(12)
For i = 1 to 12
   myNames(i) = MonthName(i)
Next

Call m.setScale2(0, 12, myNames)

(Note: The scale 1 - 12 only has the duration of 11 months. So I modify it to 0 to 12 instead.)

Hope this can help.

Regards
Peter Kwan

  Re: Vertical Linear Meter customization
Posted by Steve on Apr-02-2013 00:28
Thank you for this reply! Very helpful!
I have one more nagging problem:
Is there a way to have labels on both the left and right hand side of the Vertical Linear
Meter? The labels on the right would be static and not tied to the data of the linear
meter (they would just be months of the year to correspond with target numbers).
The labels on the left would correspond to the data displayed by the linear meter.
So, the main question is: can there be labels on both sides of the Vertical Linear
Meter?

  Re: Vertical Linear Meter customization
Posted by Steve on Apr-02-2013 10:25
Ok. I figured out a way around my last question. Forgive me as I'm new to this. But I do have one more question. I've been trying to format the numbers on the Vertical Linear Meter so that 1200000 look like $1,200,000 for example. I would like all the ticks to be formatted this way.
I've tried various combination of SetNumberFormat and other things. What would be the exact syntax in combination with Call m.setScale(0, 1200000, 100000) ?
I'm learning slowly and will try to make this my last question.
Thank you!!!!

  Re: Vertical Linear Meter customization
Posted by Peter Kwan on Apr-03-2013 01:09
Hi Steve,

If you are using BaseMeter.setScale to configure the meter scale, and you want the scale label 1200000 to be displayed as $1,200,000, the code is:

Call m.setLabelFormat("${value|,}")

Hope this can help.

Regards
Peter Kwan

  Re: Vertical Linear Meter customization
Posted by Steve on Apr-03-2013 01:16
Thank you! It worked perfectly!