Additional XML template codes not provided by the Java Designer.
ChartFX controls chart-creation via an XML template. But not all controls are accessible via the Java Designer nor is there a comprehensive list available. This entry is to document some additional controls that are available if you hand-edit the XML template file.
POINTLABELS turns on the labels for each data point. POINTLABELMASK controls how the labels will look. DATAFORMAT controls how many decimal points are allowed for values in the label.
<?xml version="1.0" encoding="UTF-8"?>
<CFX6>
<POINTLABELS>true</POINTLABELS><!-- "true" is on, "false" is off -->
<POINTLABELMASK>%v</POINTLABELMASK><!-- mask for the label, codes are listed in next section -->
<AXIS>
<ITEM index="0">
<DATAFORMAT><!-- format the point label -->
<DECIMALS>0</DECIMALS><!-- specifies 0 decimals places -->
</DATAFORMAT>
... etc ...
Using special escape codes for POINTLABELMASK, the label for each point can be customized, for example, "%l is %v" will become "Sales is 12","Marketing is 14", etc for each point on the graph.
The syntax for this property is the same as the one used in the setTipMask(java.lang.String)
property. Variables can be accessed using the % following the variable you want to include:
l Shows X-Axis Legend.
k Shows X-Axis Key Legend.
s Shows Series Legend.
x Shows getXValue(int, int) (XY Plots).
i Shows getIniValue(int, int) (Gantt).
v Shows Data getValue(int, int).
n <n> For types that require more than one series, these are replaced by the value of each one.
(n represents an index).
t Series Total (Sum of all points in this series).
p Percentage of total this point represents (Pie).
T Point Total (Sum of all series for this point).
P Percentage of total this series represents (Used in stacked charts).
X displays the marker X value for any chart type including those that do not support X values such as bar.
L Shows the PointAttributes.setTag(java.lang.Object) string of the PointAttributes object.
N Shows the index for the point.
S Shows the index for the series.
From: file:///C:/Program%20Files/OmniPilot%20Software/Lasso%20Professional%208/Chart%20FX/
Chart%20FX%20Documentation/api/SoftwareFX/ChartFX/Chart.html#setPointLabelMask(java.lang.String)
LABELSFORMAT controls how many decimals are shown in the labels that run along the specified axis.
<?xml version="1.0" encoding="UTF-8"?>
<CFX6>
<AXIS>
<ITEM index="0">
<LABELSFORMAT><!-- format the axis label -->
<DECIMALS>2</DECIMALS><!-- specifies 2 decimals places -->
</LABELSFORMAT>
... etc ...
You can control the color for each individual point, and an optional alternative color (the alternative color is used on 3D graphs where there are two sides per point).
<?xml version="1.0" encoding="UTF-8"?>
<CFX6>
<POINT>
<ITEM series="-1" point="0">
<COLOR>lightblue</COLOR>
<ALTERNATECOLOR>darkblue</ALTERNATECOLOR>
</ITEM>
<ITEM series="-1" point="1">
<COLOR>lightyellow</COLOR>
<ALTERNATECOLOR>yellow</ALTERNATECOLOR>
</ITEM>
<ITEM series="-1" point="2">
<COLOR>lightgreen</COLOR>
<ALTERNATECOLOR>darkgreen</ALTERNATECOLOR>
</ITEM>
<ITEM series="-1" point="3">
<COLOR>orange</COLOR>
<ALTERNATECOLOR>darkorange</ALTERNATECOLOR>
</ITEM>
</POINT>
... etc ...
Author: Bil Corry
Created: 13 May 2008
Last Modified: 2 Mar 2011
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft