Axes ParametersNetCharts supports the definition and display of one or more axes, depending on the specific chart type. NetCharts Axes parameters can be used to create Standard Axes, Multi-Scaled Single Axes, Variable Axis Labeling and Multiple Axes in a Single Dimension.
In addition to the keyboard interaction, the following mouse interactions are supported:
Java programmers can
specify the exact behavior of mouse event processing with
regard to zooming through the following instance variables
in the NFGraph class:
The mouseXXXDown variables define the zoom action taken whenever the mouse is clicked within the graph region and the user is holding down either the Shift, Control or Meta keys. (The meta-down mouse event is generated by the right-mouse button.) The zoomAction variable specifies whether the zoom actions should be performed on the DOWN or UP mouse events.
Axis ThicknessAxisThickness = thickness; example: AxisThickness = 15; If thickness is greater than 1, then all axes will be displayed in 3D with the given thickness. This 3D look will only be active when one or more 3D grids have been specified. The default value is 0.
Axis Title Active Label ParametersTopAxisTitleActiveLabel[N] = ("Label", "URL", "Target"); BottomAxisTitleActiveLabel[N] = ("Label", "URL", "Target"); LeftAxisTitleActiveLabel[N] = ("Label", "URL", "Target"); RightAxisTitleActiveLabel[N] = ("Label", "URL", "Target"); example: TopAxisTitleActiveLabel2 = ("","BarchartEx.html","InfoFrame"); The AxisTitleActiveLabel parameter specifies a custom active label to be associated with the axis title. That is, these labels will be displayed whenever the mouse "dwells" over the axis title. This can be used to provide the user with additional information about that particular value or to "drill-down" to another document. See Active Labels for a detailed explanation of active label capabilities. [N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, BottomAxisTitleActiveLabel2 is the axis title active label of the 2nd bottom axis. BottomAxisTitleActiveLabel and BottomAxisTitleActiveLabel1 are considered the same for backward compatibility.
Axis Title Box/Region ParametersTopAxisTitleBox[N] = (Color, BorderType, BorderWidth, "ImageURL", ImageFormat, BorderColor, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); BottomAxisTitleBox[N] = (Color, BorderType, BorderWidth, "ImageURL", ImageFormat, BorderColor, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); LeftAxisTitleBox[N] = (Color, BorderType, BorderWidth, "ImageURL", ImageFormat, BorderColor, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); RightAxisTitleBox[N] = (Color, BorderType, BorderWidth, "ImageURL", ImageFormat, BorderColor, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); example: TopAxisTitleBox2 = (black,RAISED,3,"BarchartEx.html",10); The AxisTitleBox parameter specifies the region attributes for the axis title centered along the axis. See Region Parameters for more details concerning region attributes.
[N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, BottomAxisTitleBox2 is the axis title box region of the 2nd bottom axis. BottomAxisTitleBox and BottomAxisTitleBox1 are considered the same for backward compatibility.
Axis Title Label ParametersTopAxisTitle[N] = ("Label", Color, "Font", FontSize, FontAngle, interiorAlignment, exteriorAlignment); BottomAxisTitle[N] = ("Label", Color, "Font", FontSize, FontAngle, interiorAlignment, exteriorAlignment); LeftAxisTitle[N] = ("Label", Color, "Font", FontSize, FontAngle, interiorAlignment, exteriorAlignment); RightAxisTitle[N] = ("Label", Color, "Font", FontSize, FontAngle, interiorAlignment, exteriorAlignment); example: TopAxisTitle2 = ("Finanical Status",black,"Helvetica",10,0); The AxisTitle parameter specifies the label attributes for the axis title centered along the axis. See Label Parameters for more details concerning label attributes.
[N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, BottomAxisTitle2 is the axis title of the 2nd bottom axis. BottomAxisTitle and BottomAxisTitle1 are considered the same for backward compatibility.
AxesGaps ParametersTopAxesGaps = value, value, ...; BottomAxesGaps = value, value, ...; LeftAxesGaps = value, value, ...; RightAxesGaps = value, value, ...; example: TopAxesGaps = 2; The AxesGaps parameter is used to specify the percentage of available space that should be allocated for gaps between axes. This parameter is used in conjunction with AxesLayout. The values specified in AxesLayout and AxesGaps are summed and each axis and gap is drawn in a space relative to its contribution to that sum. For Example LeftAxisLayout=20,40,20 and LeftAxisGaps=10,10 would assign 20% of the axis space to Axis1, 10% to the gap between Axis1 and Axis2, 40% to Axis2, 10% to the gap between Axis2 and Axis 3 and 20% to Axis3. Color ParametersTopColor[N] = AxisColor; BottomColor[N] = AxisColor; LeftColor[N] = AxisColor; RightColor[N] = AxisColor; example: TopColor2 = blue; The Color parameter is used to specify the color of the axis line and the tic marks, but not the tic mark labels. The default axis line and tic color is black. If the null color is specified, the axis color is not changed by this parameter. [N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, LeftColor2 is the color of the 2nd left axis. LeftColor and LeftColor1 are considered the same for backward compatibility.
Labels ParametersTopLabels[N] = "Label1", "Label2", ...; BottomLabels[N] = "Label1", "Label2", ... LeftLabels[N] = "Label1", "Label2", ... RightLabels[N] = "Label1", "Label2", ... example: BottomLabels2 = "M1", "M2", "M3"; BottomLabels3 = "N1", "N2", "N3"; The Labels parameter specifies a list of custom tic mark labels, that will be used instead of the numeric labels automatically generated by the axis. The Labels will be evenly placed along the axis, overriding any tic placement specified by the StepValue attribute. In a Bar/Combo/Stock Chart, the BarLabels parameter overrides the BottomLabels (for VERTICAL bars) or the LeftLabels (for HORIZONTAL bars) parameters. [N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, LeftColor2 is the color of the 2nd left axis. LeftColor and LeftColor1 are considered the same for backward compatibility. PlotAreaPlotArea = (xlocation, ylocation, width, height); example: PlotArea = (1, 1, 1, 1); If PlotArea is defined in relative terms (as a percentage of the chart size) the PlotArea will grow and shrink proportionally with changes to the chart size. Text in the top, bottom, left or right will be clipped if it does not fit in the space outside the plot area.
AxesSizesAxesSizes = (bottomsize, topsize, leftsize, rightsize); example: AxesSizes = (1, 1, 1, 1); AxesSizes specifies the amount of space that will be allocated to draw top, bottom, left and right axes. AxesSizes is typically used in conjunction with PlotArea to further control the layout of the PlotArea of a chart.
ChartElementSpacingChartElementSpacing = spacing; example: ChartElementSpacing = 2; ChartElementSpacing represents the size in pixels of the horizontal and vertical space between chart elements.
Scale ParametersTopScale[N] = (MinValue, MaxValue, StepValue); BottomScale[N] = (MinValue, MaxValue, StepValue); LeftScale[N] = (MinValue, MaxValue, StepValue); RightScale[N] = (MinValue, MaxValue, StepValue); example: TopScale = (0,100,10); The Scale parameter specifies the minimum and maximum data
values which will be displayed along the axis. If the Scale
parameter is not defined then the tic mark locations will be
automatically determined based on the actual data values being
displayed. That is, the axis will be "autoscaled"
using the current data values to determine "reasonable"
values for MinValue, MaxValue and StepValue. Any combination of MinValue, MaxValue and StepValue may be
defined. Those attributes that are not defined will have "reasonable"
values chosen for them. If the StepValue is defined but not as an even multiple of
the difference between the MinValue and MaxValue, then no tic
mark will be displayed at the Max Value. Note: Note:
ScaleMode ParametersTopScaleMode[N] = (mode,logBase), (mode,logBase),...; BottomScaleMode[N] = (mode,logBase), (mode,logBase),...; LeftScaleMode[N] = (mode,logBase), (mode,logBase),...; RightScaleMode[N] = (mode,logBase), (mode,logBase),...; The ScaleMode parameter is used to specify which scale mode should be used on a given axis.
[N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, TopScaleMode2 is the scale mode of the 2nd top axis. TopScaleMode and TopScaleMode1 are considered the same for backward compatibility. The default value for the scalemode parameter is LINEAR.
AxisZoomBottomZoom[N] = ON | OFF LeftZoom[N] = ON | OFF RightZoom[N] = ON | OFF TopZoom[N] = ON | OFF When AxisZoom = ON, clicking and dragging a rectangle over a chart will zoom with respect to that axis on the chart. This zoom operation does not require the axis to be scrollable. example: LeftZoom = ON;
RubberbandFillRubberbandFill = color; Defines the color of the rubberbanded box created by clicking and dragging a zoom rectangle. example: RubberbandFill = yellow_100;
RubberbandBorderStyleRubberbandBorderStyle = (linetype, linewidth, linecolor); Defines the borderstyle to apply to the rubberbanded box created by clicking and dragging to create zoom rectangle. The linewidth defaults to 1 pixel. The linecolor defaults to black. example: RubberbandBorderStyle = (DASHED,2,YELLOW);
ScaleSet ParametersTopScaleSet[N] = (min, max, step, percentage),...; BottomScaleSet[N] = (min, max, step, percentage),...; LeftScaleSet[N] = (min, max, step, percentage),...; RightScaleSet[N] = (min, max, step, percentage),...; example: TopScaleSet = (0,600,100,60); TopScaleSet2 = (600,1000,60); The ScaleSet parameter is used to specify a series of contiguous scales (minimum, maximum, and step size) to be used on an axis.
[N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, TopScaleSet2 is the scale set of the 2nd Top axis. TopScaleSet and TopScaleSet1 are considered the same for backward compatibility. Note that all scale minimums must be equal to the previous scale's maximum in the same axis. Also, the scaleset parameter can not be used with a Logarithmic scale mode.
AutoscalePadAutoscalePad=N; AutoscalePad specifies a hint to the Netcharts logic that is used to automatically determine an axis range. When no AxisScale parameters are specified for an axis, the axis automatically chooses a range based on the data values that are being plotted. Autoscalepad can be used to control these automatically choosen values. AutoscalePad is specified as a percentage of the data range. For example, if a data series has a minimum value of 100 and a maximum value of 200, NetCharts will auto scale the axis to range from 100 to 200. If in addition AutoscalePad=10 is specified, NetCharts will autoscale the axis to start at 10% below 100 and end at 10% above 200. If a minimum of maximum value is the data series is 0, that value will not be modified by AutoscalePad.
Tics ParametersTopTics[N] = ("Mode", Color, "Font", FontSize, FontAngle, interiorAlignment,backgroundColor,rotationPoint); TopTicLength[N] = ("Mode", Color, "Font", FontSize, FontAngle, interiorAlignment,backgroundColor,rotationPoint); BottomTics[N] = ("Mode", Color, "Font", FontSize, FontAngle, interiorAlignment,backgroundColor,rotationPoint); LeftTics[N] = ("Mode", Color, "Font", FontSize, FontAngle, interiorAlignment,backgroundColor,rotationPoint); RightTics[N] = ("Mode", Color, "Font", FontSize, FontAngle, interiorAlignment,backgroundColor,rotationPoint); example: TopTics3 = ("ON",black,"Helvetica",10); The Tics parameter specifies the label attributes for the tic marks displayed along the axis. If TicMode is "OFF", then the tic marks will not be displayed, otherwise the tic labels will be generated based on the other parameter settings and will be displayed using the given label attributes in the Tics parameter. If any attribute is not defined, the previous value of that attribute will be used. See Label Parameters for more details concerning label attributes. The rotationPoint specifies which end of a tic label (right or left) will be used to rotate the axis labels. The default is right. [N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, BottomTics2 specifies the label attributes for the tic marks of the 2nd bottom axis. BottomTics and BottomTics1 are considered the same for backward compatibility.
TicLength ParametersBottomTicLength = Length; LeftTicLength = Length; RightTicLength = Length; TopTicLength = Length; example: TopTicLength = 10; The TicLength parameter specifies the size of axis tic marks which are displayed. The value defines the number of pixels to use for the length of the tic mark. Setting the value to -1 will default the tic length to the number of pixels used for the width of the character zero (0) as found in the font applied to the label.
TicLayout ParametersTopTicLayout[N] = (Mode, SkipCount, StaggerLevels); BottomTicLayout[N] = (Mode, SkipCount, StaggerLevels); LeftTicLayout[N] = (Mode, SkipCount, StaggerLevels); RightTicLayout[N] = (Mode, SkipCount, StaggerLevels); example: TopTicLayout2 = (AUTOSTAGGER,5,3); The TicLayout parameter is normally used in cases where the tic axis labels may overlap if not adjusted. The Mode attribute indicates the type of layout mode that should be used, with the following modes currently supported:
The SkipCount parameter, if greater than zero, is used to determine the number of tics that should be skipped should the Mode be set to SKIP. The StaggerLevels parameter is used to determine the number of "levels" axis labels can or should be staggered to.
MajorTicColor ParametersTopMajorTicColor[N] = color; BottomMajorTicColor[N] = color; LeftMajorTicColor[N] = color; RightMajorTicColor[N] = color; example: TopMajorTicColor2 = red; The MajorTicLayour parameter controls the color of the major tics on the specified axis.
MinorTicColor ParametersTopMinorTicColor[N] = color; BottomMinorTicColor[N] = color; LeftMinorTicColor[N] = color; RightMinorTicColor[N] = color; example: LeftMinorTicColor = green; The MinorTicLayour parameter controls the color of the minor tics on the specified axis.
TicLocations ParametersTopTicLocations = value, value, value, ...; BottomTicLocations = value, value, value, ...; LeftTicLocations = value, value, value, ...; RightTicLocation = value, value, value, ...; example: LeftTicLocations = 0,100,200,300,400,500,600,900,1200,1500,1800; LeftLabels = null, null, 200, null, 400, null, 600, 900, 1200, 1500, 1800;
DrawMinorTicsTopDrawMinorTics = ON | OFF; BottomDrawMinorTics = ON | OFF; LeftDrawMinorTics = ON | OFF; RightDrawMinorTics = ON | OFF; example: TopDrawMinorTics = OFF; The DrawMinorTics parameter specifies whether or not to draw minor tics..
Axes Numeric FormatsFormat ParametersTopFormat[N] = (FormatType, "FormatExpr", "TimeBase", "TimeUnit"); BottomFormat[N] = (FormatType, "FormatExpr", "TimeBase", "TimeUnit");[N] represents the nth axis in the given, (top, bottom, left, right), axes series. For example, LeftFormat2 is the format of the 2nd left axis. LeftFormat and LeftFormat1 are considered the same for backward compatibility. The numeric labels that are automatically generated by the axis can be formatted using the Format parameter. The FormatType attribute specifies the type of number being displayed by that axis, with the following types currently supported:
The FLOAT type specifies that the numeric values should be displayed with decimal parts, while the INTEGER type specifies that the numeric values should be displayed as integers, rounded if necessary. The DATE type specifies that the axis tic values should be interpreted as date/time values. See Date/Time Values and SimpleDateFormats for more details concerning date and time values. For information on DECIMAL types see: Decimal Format Type. The FormatExpr attribute of the Format parameter specifies a display format to be used for each axis tic label and each active label displayed generated by default. The format allows a developer to specify numeric and date/time formats using expressions similar to those provided in the C/Unix printf function. The format expressions can consist of an arbitrary string, plus one or more occurrences of format components, which are preceded by '%'. The TimeBase and TimeUnit attributes are used only for the DATE format type. The TimeBase attribute specifies the base date to be used when determining the actual date/time value when a time unit or numeric value is used in the Scale, Scroll, or DataSet parameters. The TimeUnit attribute specifies the time unit multiplier to be used when determining the actual data/time value when a numeric value is used in the Scale, Scroll, or DataSet parameters. See Date/Time Values and SimpleDateFormats for more details concerning date and time values. The following format components are supported for the numeric
format types:
For the numeric types, the following modifier can be applied to the format component to yield different outputs: -,0WW.DDwhere all parts are optional and are interpreted as follows:
For example, for the
FLOAT value 1234.456, the following formats yield the result
shown:
More information on the DecimalFormat class can be found at http://java.sun.com/j2se/1.3/docs/api/java/text/DecimalFormat.html.
NumberFormatNumberFormat = ("decimalSymbol", "groupSymbol", groupSize); The NumberFormat parameter can be used to specify the symbols and group size used when formatting numeric values. The default decimalSymbol is ".", the default groupSymbol is "," and the default groupSize is 3. International numeric formatting is easily accomplished by reversing the symbols and specifying appropriate format expressions. For example, for the following NumberFormat definition: example: NumberFormat = (",", "."); would generate the following results for the given format for the decimal value 1234.456:
Date/Time Formats The following formats are supported
for the DATE format type:
For example, for the
DATE value '10 April 1996 12:37', the following formats yield
the result shown:
SimpleDate FormatsThe following formats are supported for the SimpleDate format type:
For example, the CDL Parameter BottomFormat
= (SIMPLEDATE,"F") will display:
ExamplesThis example shows an XY chart with the following left and bottom axes: LeftScale = (0,4); BottomScale = (0,70);
This example shows an XY chart, with the following axis parameters specified: BottomTics = ("", x000000_178, "Arial Plain", 10, 0, CENTER, , CENTER); This example shows an XY chart, with the following axis parameters specified: LeftFormat = (FLOAT,"%.1f",null,null); LeftScale = (-1,5,1.5); LineSet1 = (2,1.5),(18,1.9),(29,3.1),(35,3.7),(55,4.3); LineSets = ("LineSet1", ); LineSymbol = (DIAMOND, 12, FILLED, , 1, , green, 0);
This example shows an XY chart, with the BottomLabels parameter used to define three custom tic labels LeftScale = (-1, 5, 1.5); BottomScale = (0, 100, 20); BottomLabels = "Min\nValue", "Middle\nValue", "Max\nValue"; This next XY chart demonstrates a variety of tic label layouts. On the bottom axis, AUTO is used to automatically stagger and skip labels so that none overlap. The left axis uses a 2 level STAGGER. The top axis shows an implementation of minor tics using the SKIP parameter, and the right axis demonstrates the combined SKIPSTAGGER effect.
LeftScale = (-1,5,1.5); LeftTicLayout = (STAGGER,0,2); LeftFormat = (FLOAT,"%.1f",null,null); LeftTics = ("", x000000_178, "Arial Plain", 10, 0, CENTER, , CENTER); RightTics = ("", x000000_178, "Arial Plain", 10, 0, CENTER, , CENTER); RightScale = (0,300,10); RightTicLayout = (SKIPSTAGGER,4,2); TopTics = ("", x000000_178, "Arial Plain", 10, 0, CENTER, , CENTER); TopScale = (0,80,2); TopTicLayout = (SKIP,4,1); BottomTicLayout = (AUTO,0,1); BottomTics = ("", x000000_178, "Arial Plain", 10, 0, CENTER, , CENTER);
This example shows an XY chart which uses the axis title parameters to define separate axis titles:
LineSet1 = (2,1.5),(18,1.9),(29,3.1),(35,3.7),(55,4.3); LeftTics = ("", x000000_178, "Arial Plain", 10, 0, CENTER, , CENTER); LeftTitle = ("Left Axis Title", silver, "Arial", 14, 90, null, CENTER, "OFF"); RightTitle = ("Right Axis Title",black,"Arial",10,270); Footer = ("Bottom Axis Title",slategray,"Arial",10,0);
|
|