SetScale

Syntax graph.SetScale(type, auto|manual, max|startdate [,min|enddate [,majorTicks]])

Description Specifies scale settings, including automatic or manual scaling, scale range, and scale marker increments.

For information about scales, scale ranges, and scale markers, refer to refer to "Changing Scale Formatting Dynamically" in Chapter 7 of the PopChart Server User Guide.

Parameters Graph.SetScale() accepts the following parameters.

type

{ value | svalue | x | y | y2 | time }

Specifies which scale this method is changing the settings for.

For most graphs, you will only make changes to the value scale. Line Bar Combo graphs also have the svalue (secondary value) scale, which is on the right side of the graph. Time graphs have a time scale along the bottom of the graph, in addition to the value scale. X-Y graphs have both an x (x-axis) and y (y-axis) scale, but do not have a value scale. If a graph is a dual y scale graph, it will also have a y2 (right y-axis) scale.

scaling

{ auto | manual }

Specifies whether to use automatic or manual scaling. When set to automatic, PopChart Server will try to adjust the scale range and the number of ticks and labels so that scale remains useful while the graph remains visibly appealing.

max | startdate

int

Specifies the maximum value for the scale. For time scales, this value should be the starting date.

min | enddate

int

Specifies the minimum value for the scale. This parameter is optional. For time scales, this value should be the ending date.

majorTicks

int

Specifies the number of major increments in the scale. Major ticks are places where large tick marks and scale labels appear on the graph.

Example 5.28 Graph.SetScale Example Method Calls

Graph.SetScale(value,manual,100,0,5) 

Graph.SetScale(x, auto, 78.5) 

Graph.SetScale(y, manual, 500) 

Graph.SetScale(time, auto, 5/1/2000, 5/31/2000)