Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 11 NOV 1997 09:42:06AM Bob Platt wrote:

I have tired to set the decimal place in the X and

Y access to 0 decimal places using Chart3.ChartXAxisUnits=AXIS_UNITS_NON

and Chart3.ChartYAxisUnits=AXIS_UNITS_NONE with no

effect. Any help would be appreciated.

Thanks,

Bob Platt


At 11 NOV 1997 01:10PM Stephen Bellefontaine Revelation wrote:

Hello Bob,

In the test application I created I was able to successfully execute the ChartAxisUnits method by

connecting to the start20.nsf database located in the revsoft\vip2.x\work directory.

In my example, I added SalesRep and Total_Sales as the columns. Added a chart object, went to options tab and specified X-Axis=SalesRep and Y-Axis=Total_Sales. Then I added 2 command buttons to my AppWindow, with the following script …

CMD_NOdecimals Click event

Dim RetCode%

Chart1.ChartYAxisUnits=3

RetCode%=Chart1.DrawChart()

CMD_decimals Click event …

Dim RetCode%

Chart1.ChartYAxisUnits=6

RetCode%=Chart1.DrawChart()

After running the app I was able at runtime to programmatically alter the Axis Scale to display with decimals and without.

By the way, how is the data stored in Notes? Is there decimals places? You may want to remove that option in Notes or change the display in the column setup tab of the ViP data object to equal a general number. (to display a whole number)

Hope this helps,

ViP Tech Support


At 11 NOV 1997 01:57PM Bob Platt wrote:

Yes, I agree what you did works. Try setting ChartXAxisUnits or ChartYAxisUnits

to 0. This does not work! I want to display 0 decimal places.

Thanks!

Bob


At 11 NOV 1997 02:11PM Bob Platt wrote:

Also, would it matter that the field is calculated?

Bob


At 11 NOV 1997 03:28PM Stephen Bellefontaine Revelation wrote:

Hello Bob,

After more modifications I was able to reproduce the behavior you were experiencing.

It turns out that the ChartAxisUnits property does what it is supposed to do, but not what you were trying to have it do.

From the ViP Online help it states ChartAxisUnits property …

Gets or sets the decimal UNITS for the chart axis datapoint values. In other words it allows you to create a better fit for the data, by changing the scale UNITS of a numeric axis.

At design time this is done by …

1. Choose Chart - Chart Properties.

2. Under Properties for, select an axis.

3. Click the Scale tab.

4. Under Scale manually, change the axis options.

Units: Choose Auto, or other incremental values such as Thousands and Millions.

Unfortunately, there was no API exposed in ViP 2.2 to allow developers to programmatically modify the decimal places of a chart axis, and therefore, this can only be set at design time …

To change the format of labels on a numeric scaled axis.

1. Choose Chart - Chart Properties.

2. Under Properties for, select the axis you want to format.

3. Click the Number Format tab.(#)

4. Under Format type, select a format.

5. Under Current format, select from the list.

6. Under Decimal places, select a number.

Hope this helps,

ViP Tech Support

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/3c8742abb0dbbf2b8525654c0050c256.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1