main | documentation | examples | common questions | changes | licensing |
PARAMETERS TO SET CHART VALUES | ||
sampleValues | ||
Sets the values of the pie. Only positive values can be used in the pie chart. If multiple data series are used, there will be one pie per sample set, and the number of slices per pie is the number of data series used. |
<param name="sampleValues" value="10.5, 30.5, 20, 5.1234"> setSampleValues(0, new double[] {10.5,30.5,20,5.1234}); sampleValues=10.5,30.5,20,5.1234 |
|
sampleCount | ||
Sets the number of pie slices if one data series is used or number of pies if multiple data series are used. |
<param name="sampleCount" value=5> setSampleCount(5); sampleCount=5 | |
seriesCount | ||
Sets the number of data series in the chart. If multiple data series are used, the slices in each pie will represent one data series. Set the values per data series with the sampleValues_N parameter. |
<param name="seriesCount" value=3> setSeriesCount(3); seriesCount=3 | |
sampleValues_N | ||
Sets the sample values for the specified data series. You must set the series count first. |
<param name="sampleValues_0" value="200,100,300,250,400"> <param name="sampleValues_1" value="300,150,200,150,300"> setSampleValues(0, new double[] {200,100,300,250,400}); setSampleValues(1, new double[] {300,150,200,150,300}); sampleValues_0=200,100,300,250,400 sampleValues_1=200,100,300,250,400 | |
PARAMETERS TO SET LABELS |
||
chartTitle | ||
Sets the title of the chart. The title will be displayed at the top of the chart. To set the title font use the titleFont parameter. Use \n for line breaks. |
<param name="chartTitle" value="This is my title"> <param name="chartTitle" value="Linebreak\nin title"> setTitle("This is my title"); setTitle("Linebreak\\nin title"); chartTitle=This is my title |
|
titleFont | ||
Sets the font used for the chart title. |
<param name="titleFont" value="Dialog, bold, 20" setFont("titleFont", new Font("Dialog", Font.BOLD, 20)); titleFont=Dialog, bold, 20 |
|
sampleLabels | ||
Sets the sample labels for this chart. The sample labels appears in the legend, as tooltip like labels when the mouse moves over the pie slices or as static labels within each slice. Use the legendOn, sampleLabelsOn, and sampleLabelStyle parameter to control how the labels are displayed. |
<param name="sampleLabels" value="one,two,three,four"> setSampleLabels(new String[] {"one","two","three","four"}); setSampleLabel(0, "first label"); setSampleLabel(1, "second label"); sampleLabels=one,two,three,four |
|
sampleLabelColors | ||
Sets the colors of the sample labels displayed in the legend. |
<param name="sampleLabelColors" value="red, #7f0000, blue"> setSampleLabelColor(0, Color.red); setSampleLabelColor(1, new Color(0x7f0000)); setSampleLabelColor(2, Color.blue); sampleLabelColors=red,%237f0000,blue |
|
seriesLabels | ||
Sets the series labels for this chart. The series labels are displayed in the legend when multiple data series are used. |
<param name="seriesLabels" value="2000,2001,2001"> setSeriesLabels(new String[] {"2000","2001","2002"}); setSeriesLabel(0, "first label"); seriesLabels=2000,2001,2002 |
|
seriesLabelColors | ||
Sets the colors of the series labels in the legend. |
<param name="seriesLabelColors" value="red, #7f0000, blue"> setSeriesLabelColor(0, Color.red); setSeriesLabelColor(1, new Color(0x7f0000)); setSeriesLabelColor(2, Color.blue); seriesLabelColors=red,%237f0000,blue |
|
legendOn | ||
Turns on the legend. The legend displays the sample labels or series labels depending on the value of the seriesCount parameter. |
<param name="legendOn" value=true> setLegendOn(true); legendOn=true |
|
legendPosition | ||
Sets the legend position. Possible positions are right, left, top, and bottom. Default position is right. |
<param name="legendPosition" value="right"> <param name="legendPosition" value="left"> <param name="legendPosition" value="top"> <param name="legendPosition" value="bottom"> setLegendPosition(PieChart.RIGHT); setLegendPosition(PieChart.LEFT); setLegendPosition(PieChart.TOP); setLegendPosition(PieChart.BOTTOM); legendPosition=left |
|
legendLabels | ||
Overrides the default labels in the legend. The default labels are either the sampleLabels if 1 data series is used or the seriesLabels if multiple data series is used. |
<param name="legendLabels" value="2000, 2001, 2002"> <param name="legendLabels" value="sampleLabels"> <param name="legendLabels" value="seriesLabels"> setLegendLabels(new String[] {"2000","2001","2002"}); legendLabels=2000,2001,2002 legendLabels=sampleLabels legendLabels=seriesLabels |
|
legendFont | ||
Sets the font for the labels used in the legend. |
<param name="legendFont" value="Dialog, plain, 12"> setFont("legendFont", new Font("Dialog", Font.Plain, 12)); legendFont=Dialog,plain,12 |
|
legendColors | ||
Sets the colors for the default legend boxes. If this is not set, the colors are taken from the sampleColors parameter. |
<param name="legendColors" value="red, #7f0000"> Color[] c = new Color[] {Color.red, new Color(0x7f0000)); setLegendColors(c); legendColors=red,%237f0000 |
|
legendColumns | ||
Sets the number of columns that should be used to display legend labels. |
<param name="legendColumns" value=4> setLegendColumns(3); legendColumns=5 |
|
legendReverseOn | ||
Set on or off the inverted legend. Default legend entry order is from top to bottom and from left to right. |
<param name="legendReverseOn" value=true> setLegendReverseOn(true); legendReverseOn=true |
|
legendImage | ||
Sets an image to be used in front of the legend label instead of the default legend box. For the applet the image is specified as a relative URL. This only works if the applet is allowed to connect back to the web server. |
<param name="legendImage_0" value="blue_ball.gif"> <param name="legendImage_1" value="images/red_ball.gif"> Image image = ... load image blue_ball.gif from disk addImage("legendImage_0", image); setLegendImage(0, "legendImage_0"); |
|
legendBoxSizeAsFont | ||
Sets the default legend box size the same as the legend font size. |
<param name="legendBoxSizeAsFont" value="true"> setLegendBoxSizeAsFont(true); legendBoxSizeAsFont=true |
|
labelDelimiter | ||
By default the sampleLabels, seriesLabel, and legendLabels parameters use comma (,) as a field delimiter. Use this parameter to control the label delimiter if you need a comma in the labels to be displayed in the applet or servlet. |
<param name="labelDelimiter" value=":"> labelDelimiter=: |
|
thousandsDelimiter | ||
Use this parameter to control the thousands delimiter in numerical labels. |
<param name="thousandsDelimiter" value=","> setThousandsDelimiter(","); thousandsDelimiter=, |
|
locale | ||
Sets the locale of the chart. The locale affects the display of
value and range labels, with the correct grouping and decimal signs.
Language codes Country codes |
<param name=locale value="en, gb"> <param name=locale value="en, us"> setLocale(new Locale("EN", "GB"); setLocale(new Locale("EN", "US"); locale=en,gb locale=en,us |
|
sampleLabelsOn | ||
By turning on the sample labels, the sample label for a pie segment will appear floating on top of the segment when the mouse pointer moves across the segment or the sample label in the legend. The sample labels can also be displayed statically by using the sampleLabelStyle parameter. |
<param name="sampleLabelsOn" value=true> setSampleLabelsOn(true); sampleLabelsOn=true |
|
sampleLabelStyle | ||
The sample labels can be displayed floating over the pie slices, statically inside the slices, outside the slices or pointing to the slices. |
<param name="sampleLabelStyle" value="floating"> <param name="sampleLabelStyle" value="inside"> <param name="sampleLabelStyle" value="outside"> <param name="sampleLabelStyle" value="pointing"> setSampleLabelStyle(Chart.FLOATING); setSampleLabelStyle(Chart.INSIDE); setSampleLabelStyle(Chart.OUTSIDE); setSampleLabelStyle(Chart.POINTING); sampleLabelStyle=inside sampleLabelStyle=outside sampleLabelStyle=pointing |
|
seriesLabelsOn | ||
By turning on the series labels, the series labels for a pie segment will appear floating on top of the segment when the mouse pointer moves across the segment or the label in the legend. The series labels can also be displayed statically inside each slice by using the seriesLabelStyle parameter. |
<param name="seriesLabelsOn" value=true> setSeriesLabelsOn(true); seriesLabelsOn=true |
|
seriesLabelStyle | ||
The series labels can be displayed floating over the pie slices,statically inside the slices, outside the slices or pointing to the slices. |
<param name="seriesLabelStyle" value="floating"> <param name="seriesLabelStyle" value="inside"> <param name="seriesLabelStyle" value="outside"> <param name="seriesLabelStyle" value="pointing"> setSeriesLabelStyle(PieChart.FLOATING); setSeriesLabelStyle(PieChart.INSIDE); setSeriesLabelStyle(PieChart.OUTSIDE); setSeriesLabelStyle(PieChart.POINTING); seriesLabelStyle=inside seriesLabelStyle=outside seriesLabelStyle=pointing |
|
valueLabelsOn | ||
By turning the value labels on, the value for a pie segment will appear floating on top of the segment when the mouse pointer moves across the segment or the sample label in the legend. The value labels can also be displayed statically by using the valueLabelStyle parameter. |
<param name="valueLabelsOn" value=true> setValueLabelsOn(true); valueLabelsOn=true&valueLabelStyle=inside |
|
valueLabelStyle | ||
The value labels can be displayed floating over the pie slices, statically inside the slices, outside the slices or pointing to the slices. |
<param name="valueLabelStyle" value="floating"> <param name="valueLabelStyle" value="inside"> <param name="valueLabelStyle" value="outside"> <param name="valueLabelStyle" value="pointing"> setValueLabelStyle(Chart.FLOATING); setValueLabelStyle(Chart.INSIDE); setValueLabelStyle(Chart.OUTSIDE); setValueLabelStyle(Chart.POINTING); valueLabelsOn=true&valueLabelStyle=inside valueLabelsOn=true&valueLabelStyle=outside valueLabelsOn=true&valueLabelStyle=pointing |
|
sampleDecimalCount | ||
Sets the number of fixed decimals to use for the value labels. |
<param name="sampleDecimalCount" value=3> setSampleDecimalCount(3); sampleDecimalCount=3 |
|
floatingOnLegendOff | ||
By default floating labels are displayed for all the samples in the selected series when the mouse moves over a series label in the legend. This parameter turns this behavior off. |
<param name="floatingOnLegendOff" value="true"> setFloatingOnLegendOn(false); |
|
valueLabelPrefix | ||
Adds a prefix before all value labels. You can also set the prefix for individual data series by adding the series index. |
<param name="valueLabelPrefix" value="$"> <param name="valueLabelPrefix_2" value="£"> setLabel("valueLabelPrefix", "$"); valueLabelPrefix=$ |
|
valueLabelPostfix | ||
Adds a postfix after all value labels. You can also set the postfix for individual data series by adding the series index. |
<param name="valueLabelPostfix" value="%"> <param name="valueLabelPostfix_0" value="ms"> setLabel("valueLabelPostfix", "%"); setLabel("valueLabelPostfix_1", "ms"); valueLabelPostfix=KB |
|
percentLabelsOn | ||
By turning the percent labels on, the percentage for a pie segment will appear floating on top of the segment when the mouse pointer moves across the segment or the sample label in the legend. The percent labels can also be displayed statically by using the percentLabelStyle parameter. |
<param name="percentLabelsOn" value=true> setPercentLabelsOn(true); percentLabelsOn=true&percentLabelStyle=inside |
|
percentLabelStyle | ||
The percent labels can be displayed floating over the pie slices, statically inside the slices, outside the slices or pointing to the slices. |
<param name="percentLabelStyle" value="floating"> <param name="percentLabelStyle" value="inside"> <param name="percentLabelStyle" value="outside"> <param name="percentLabelStyle" value="pointing"> setPercentLabelStyle(Chart.FLOATING); setPercentLabelStyle(Chart.INSIDE); setPercentLabelStyle(Chart.OUTSIDE); setPercentLabelStyle(Chart.POINTING); percentLabelsOn=true&percentLabelStyle=inside percentLabelsOn=true&percentLabelStyle=outside percentLabelsOn=true&percentLabelStyle=pointing |
|
percentDecimalCount | ||
Sets the number of fixed decimals to use for the percent labels. |
<param name="percentDecimalCount" value=3> setPercentDecimalCount(3); percentDecimalCount=3 |
|
floatingLabelFont | ||
Sets the font used with the floating sample/value/percent labels. |
<param name="floatingLabelFont" value="Dialog, plain, 12"> setFont("floatingLabelFont", new Font("Dialog",Font.PLAIN,12)); |
|
insideLabelFont | ||
Sets the font used with the sample/value/percent labels when inside each pie slice. |
<param name="insideLabelFont" value="Dialog, plain, 12"> setFont("insideLabelFont", new Font("Dialog",Font.PLAIN,12)); insideLabelFont=Dialog,plain,12 |
|
insideLabelColor | ||
Sets the color used for the inside labels for all pies. To set the inside label colors per pie use the insideLabelColor_N parameter |
<param name="insideLabelColor" value="blue"> <param name="insideLabelColor_4" value="red"> setInsideLabelColor(-1, black); setInsideLabelColor(2, blue); insideLabelColor=red insideLabelColor_4=green |
|
outsideLabelFont | ||
Sets the font used with the sample/value/percent labels when outside each pie slice. |
<param name="outsideLabelFont" value="Dialog, plain, 12"> setFont("outsideLabelFont", new Font("Dialog",Font.PLAIN,12)); outsideLabelFont=Dialog,plain,12 |
|
outsideLabelColor | ||
Sets the color used for the outside labels for all pies. To set the outside label colors per pie use the outsideLabelColor_N parameter |
<param name="outsideLabelColor" value="blue"> <param name="outsideLabelColor_4" value="red"> setOutsideLabelColor(-1, black); setOutsideLabelColor(2, blue); outsideLabelColor=red outsideLabelColor_4=green |
|
pointingLabelFont | ||
Sets the font used with the sample/value/percent labels when pointing tp each pie slice. |
<param name="pointingLabelFont" value="Dialog, plain, 12"> setFont("pointingLabelFont", new Font("Dialog",Font.PLAIN,12)); pointingLabelFont=Dialog,plain,12 |
|
pointingLabelColor | ||
Sets the color used for the pointing labels for all pies. To set the pointing label colors per pie use the pointingLabelColor_N parameter |
<param name="pointingLabelColor" value="blue"> <param name="pointingLabelColor_4" value="red"> setPointingLabelColor(-1, black); setPointingLabelColor(2, blue); pointingLabelColor=red pointingLabelColor_4=green |
|
pieLabelsOn | ||
The pie labels are displayed below each pie if multiple series/pies are used. The labels displayed are the sample labels. |
<param name="pieLabelsOn" value=true> setPieLabelsOn(true); pieLabelsOn=true |
|
pieLabelFont | ||
Sets the font to use for the pie labels. The pie labels are displayed below each pie if multiple pies are used and pieLabelsOn is true. |
<param name="pieLabelFont" value="Dialog, bold, 12"> setFont("pieLabelFont", new Font("Dialog", Font.BOLD, 12)); pieLabelFont=Dialog,bold,12 |
|
font | ||
Sets the default font for the chart. |
<param name="font" value="Dialog, plain, 12"> setFont(new Font("Dialog",Font.PLAIN,12)); font=Dialog,plain,12 |
|
PARAMETERS TO CONTROL COLORS |
||
sampleColors | ||
Sets the colors of the pie slices in the chart. |
<param name="sampleColors" value="red, green, orange"> setSampleColors(new Color[] {Color.red, Color.green, Color.orange}); sampleColors=red,green,orange |
|
gradientSamplesOn | ||
Turns on/off gradent color effect on the pies. This parameter is on by default. |
<param name="gradientSamplesOn" value="false"> setGradientSamplesOn(false); gradientSamplesOn=false |
|
background | ||
This is the background color of the area around the chart grid. The background can be solid or gradient. In order to use gradient background, specify two colors separated by |. |
<param name="background" value="red"> <param name="background" value="gray|lightGray"> setBackground(Color.red); setBackground2(Color.black); background=red background=gray|lightGray |
|
foreground | ||
This is the color of the title and legend labels. |
<param name="foreground" value="blue"> setForeground(Color.blue); foreground=blue |
|
PARAMETERS TO CONTROL CHART STYLE |
||
3DModeOn | ||
Displays the chart in 3D mode. |
<param name="3DModeOn" value=true> set3DModeOn(true); 3DModeOn=true |
|
angle | ||
Sets the angle of the 3D pie. Possible values are 10-90. The default angle is 30. |
<param name="angle" value=30> setAngle(30); angle=30 |
|
startAngle | ||
Sets the angle of the initial starting point of the slices. Value range is from -360 to 360. The default angle is 0. |
<param name="startAngle" value=45> setStartAngle(45); setStartAngle(-1, 20); angle=45 |
|
depth | ||
Sets the depth of the 3D pie. The depth is relative to the pie width and ossible values are 0.0-1.0. The default depth is 0.4. |
<param name="depth" value="0.2"> setDepth(0.2); depth=0.2 |
|
sliceSeperatorOn | ||
Displays a line between the slices in a pie. You can set the color of the lines using the sliceSeperatorColor parameter. |
<param name="sliceSeperatorOn" value="true"> setSliceSeperatorOn(true); sliceSeperatorOn=true; |
|
sliceSeperatorColor | ||
Controls the slice seperator color. If this is not set, the color used is the same as the slice color, only a little darker. |
<param name="sliceSeperatorColor" value="black"> setSliceSeperatorColor(Color.black); sliceSeperatorColor=yellow |
|
selectionStyle | ||
Sets the effect painted when the user selects a pie slice or a series in the legend. The effects available is a triangle or circle marker within the pie slice, or detaching the slice as it is selected. |
<param name="selectionStyle" value="detached"> <param name="selectionStyle" value="triangle"> <param name="selectionStyle" value="circle"> setSelectionStyle(PieChart.SELECTION_STYLE_CIRCLE); setSelectionStyle(PieChart.SELECTION_STYLE_TRIANGLE); setSelectionStyle(PieChart.SELECTION_STYLE_DETACHED); |
|
detachedSlices | ||
Detaches slices in the pie. The slices are specified as a comma seperated list of slice numbers. Detached slices in a specific pie by specifying the pie number in the parameter. |
<param name="detachedSlices" value="0,3"> <param name="detachedSlices_0" value="0,3"> <param name="detachedSlices_1" value="5"> int serie=0; int slice=3; double distance=0.2; setDetachedSlice(serie, slice, distance); detachedSlices=0,3 detachedSlices_0=0,3 detachedSlices_1=5 |
|
detachedDistance | ||
Controls the distance the slices are detached from the pie. The value is a factor of the pie radius, so if the parameter value is set to 0.5, the slice is detached halfway out of the pie. |
<param name="detachedDistance" value="0.2"> setDetachedDistance(0.2); detachedDistance=0.2 |
|
graphInsets | ||
Use this parameter to add space between the chart grid and the chart component edges. The parameter value consists of 4 parameters whith the following sequence; top, left, bottom, right. A value of -1 uses the default inset. |
<param name="graphInsets" value="-1, 50, -1, -1"> setGraphInsets(-1,50,-1-1); graphInsets=-1,50,-1,-1 |
|
pieRotationOn | ||
Controls if the pie can be rotated by user. If the parameter is on, user can rotate the pie by dragging mouse pointer over it. |
<param name="pieRotationOn" value="true"> setPieRotationOn(true); |
|
MISCELLANEOUS PARAMETERS |
||
data | ||
Instead of loading the data from the applet or servlet parameters, you can specify a url to load the data from. Any parameters specified in the applet or servlet tag will override parameters with the same name loaded from the url. |
<param name=data value=customers.asp> data=http://somehost/customers.asp
The data in the url has to be returned in the following format |
|
dataInterval | ||
You can make the applet load the data from the currently specified URL at a specific interval. The interval is specified in seconds. If reset is specified in the data interval, the chart is reset before the parameters are read again. |
<param name=dataInterval value=10> <param name=dataInterval value=10,reset> |
|
chart | ||
Use this parameter to set the type of the chart. The supported types are bar, line and pie. The default chart type is bar. |
<param name="chart" value="pie"> chart=pie |
|
url_default | ||
You can associate the chart to a URL, and the document pointed to by that URL will be opened when the user double-clicks any place inside the chart grid. Single-click can be used instead by setting the singleClickURLOn parameter. |
<param name="url_default" value="sales_2004.html"> Include MAYSCRIPT in the applet tag to call javascript functions. |
|
url_N_M (applet drilldown) | ||
This feature can be used to create drill-down functionallity for the
charts. You can associate any pie slice or series in the chart to a URL,
and the document pointed to by that URL will be opened when the
user double-clicks the pie slice or label in the legend.
Single-click can be used instead by setting the singleClickURLOn parameter.
The N is the index of the data series (first is numbered 0). The M is the index of the sample within the series (first is numbered 0). If there is only one series in the chart, N will be the index of the sample. However url_0_M will override url_N if M=N. If you want to associate and url with a group of samples with the same index across the different series use url_x_N where N is the index of data series. |
<param name="url_0" value="orange_sales_2001.html"> <param name="url_1" value="apple_sales_2001.html"> <param name="url_2" value="banana_sales_2001.html"> <param name="url_3" value="http://www.fruitorama.com"> <param name="url_4" value="javascript:winOpen('bar.html', 200,500);"> Include MAYSCRIPT in the applet tag to call javascript functions. |
|
urltarget_N_M (applet drilldown) | ||
This parameter controls where HTML pages will be opened. urltarget sets the default target frame or window. urltarget_N sets the target for the specified series. urltarget_N_M sets the target for the specified sample. |
_self: Open new page in same window or frame. _parent: Open in the parent window. _top: Open in the top-level window. _blank:Open in a new blank window. name:Open in the frame or window with the specified name. <param name="urltarget" value="bottom_frame"> <param name="urltarget_0" value="left_frame"> |
|
label_N | ||
This parameter can be used to set a label to any point of the chart. N - index of the label. First parameter is label text. Second and third parameters are X and Y coordinates of the label. If X and Y are higher then 0 and lower than 1, the label position is calculated relatively to the chart bounds. Otherwise, the absolute coordinates of the chart are used. There are optional 4th and 5th parameters which are index and serie of the sample, pointed by the label. |
<param name="label_0" value="orange sales,100,100"> <param name="label_1" value="apple sales,0.4,0.5"> <param name="label_2" value="banana sales,200,200,4,0"> setLabel("label_0", "orange sales", 100, 100); setLabel("label_1", "apple sales", 0.4, 0.5); setLabel("label_2", "banana sales", 200, 200, 4, 0); label_0=orange sales,100,100 label_1=apple sales,0.4,0.5 label_2=banana sales,200,200,4,0 |
|
labelPosition_N | ||
This parameter can be used to set a new position for an existion label. The initial position for a label can be set by using label_N parameter. N is the index of the label. |
<param name="labelPosition_0" value="0.8, 0.1"> <param name="labelPosition_1" value="120, 180"> setLabelPosition("label_0", 0.8, 0.2); setLabelPosition("label_1", 120, 180); |
|
labelAngle_N | ||
This parameter can be used to set angle of the given anywhere label. |
<param name="labelAngle_0" value="270"> <param name="labelAngle_1" value="45"> setLabelAngle("label_0", 270); setLabelAngle("label_1", 45); labelAngle_0=270 labelAngle_1 =45 |
|
labelColor_N | ||
This parameter can be used to set color of the given anywhere label. |
<param name="labelColor_0" value="red"> <param name="labelColor_1" value="#4f6c23"> setLabelColor("label_0", Color.red); setLabelColor("label_1", new Color(0x4f6c23)); labelColor_0=red labelColor_1 =%234f6c23 |
|
labelFont_N | ||
This parameter can be used to set font of the given anywhere label. |
<param name="labelFont_0" value="Dialog,plain,10"> <param name="labelFont_1" value="Times,italic,12"> setFont("label_0", new Font("Dialog", Font.PLAIN, 10)); setFont("label_1", new Font("Times", Font.ITALIC, 12)); labelFont_0=Dialog,plain,10 labelFont_1 =Times,italic,12 |
|
labelURL_N | ||
This parameter can be used to assign an URL to an anywhere label. The URL adress will be opened when user clicks the label. N is the index of the label. |
<param name="labelURL_0" value="orange_sales_2001.html"> <param name="labelURL_1" value="apple_sales_2001.html"> <param name="labelURL_2" value="banana_sales_2001.html"> |
|
labelURLTarget_N | ||
This parameter controls where a HTML page will be opened when clicked the appropriate label. labelURLTarget sets the default target frame or window. labelURLTarget_N sets the target for the specified label. |
_self: Open new page in same window or frame. _parent: Open in the parent window. _top: Open in the top-level window. _blank:Open in a new blank window. name:Open in the frame or window with the specified name. <param name="labelURLTarget" value="bottom_frame"> <param name="labelURLTarget_0" value="left_frame"> |
|
singleClickURLOn (applet drilldown) | ||
Turn on this parameter to use single click instead of double clicks when doing drilldown charts. | <param name="singleClickURLOn" value="true"> | |
automaticRefreshTime | ||
Some browsers has problems repainting the applets when scrolling the web page. Set this parameter to make the applet repaint itself on a regular basis. The value is specified in milliseconds so 1000 is one second. | <param name="automaticRefreshTime" value=1000> | |
doubleBufferingOff | ||
By default the charts use double buffering to avoid flickering. However, sometimes this causes problems repainting the charts when scrolling in a browser. If you have charts that the user will not interact with, you might want to turn the double buffering off. | <param name="doubleBufferingOff" value=true> | |
chartClass_pie | ||
The ChartApplet wraps a PieChart class which actually renders the chart. To add more behavior you can subclass the PieChart class and make the applet load your chart class instead of the standard PieChart class. | <param name="chartClass_pie" value="package.MyPieChart"> | |
printAsBitmap | ||
Some java VMs and printers have problems printing applets. Use the printAsBitmaps parameter to print the chart as a bitmap image to work around this. However, the resolution of the printed chart will degrade. |
<param name="printAsBitmap" value="true"> setPrintAsBitmap(true); |
|
SERVLET PARAMETERS |
||
antialias | ||
The servlet supports antialias rendering to smooth out edges. | antialias=true | |
jpegQuality | ||
The servlet supports controllig quality of the returned jpeg image. | jpegQuality=100 | |
output | ||
This paramtere can be used to force the servlet output type. Can be image or html. If the parameter value is html, the servlet output is html code that contains call to the servlet itself producing the chart image. If the value is image, the output is jpeg or png image. |
output=html output=image |
CHART USER GUIDE |
Data can be loaded using the applet parameters. Use the sampleValues parameter to load data into the applet. The applet code below creates a pie chart and loads the values 10,20,30,40, and 50. The sample count of the chart will equal the number of values in the sampleValues parameter.
<applet code=com.objectplanet.chart.ChartApplet
You can set the sample count explisitly by using the sampleCount parameter. The chart below sets the sample count to 10, but only sets the 5 first samples.
<applet code=com.objectplanet.chart.ChartApplet
You can have empty values by using an undefined number (any sign that's not a valid number).
<applet code=com.objectplanet.chart.ChartApplet
A chart can have multiple data series. When the chart has multiple data series the number of pies will equal the number of samples, and the number of segments per pie will equal the number of data series. Use the seriesCount parameter to control the number of data series, and the sampleValues_N parameter to set the values per data series.
<applet code=com.objectplanet.chart.ChartApplet
Since the applet can not connect directly to a data source, any data that has to be loaded dynamically has to be generated on the server side.
Use a scripting language on the web server (such as ASP) to read the data
from a data base (or any other data source) and construct the applet
code using the values read. Then the web page is sent to the client
with the dynamically data ready to load into the applet.
See here for full ASP example. If you want to load the applet or servlet data and parameters from a url, you need specify the url in the data parameter in your applet or servlet tag as below Applet:
<applet code=com.objectplanet.chart.PieChartApplet You can also configure the applet to load data from the currently specified data URL at a specific interval.
<applet code=com.objectplanet.chart.PieChartApplet The above applet will reload the parameters.data file at 10 second intervals. If you specify a new data parameter in the parameters.data file, this file will be loaded instead on the next interval.
<param name=dataInterval value="10,reset"> This will make the applet reset all it's data before the new data is loaded. Servlet:
<img src="http://localhost:8080/servlet/com.objectplanet.chart.ChartServlet?
Only an applet can load the data from a URL. The parameters.data file looks like this:
sampleValues_0=47,38,85,36,85 The data url can point to a script that produces the data as long as the format returned is as in the example above. If you need to pass parameters to the script when using servlets, & for parameter separation and = for parameter value assignment can not be used. Instead you need to use ¤ as the parameter separator and * for the equals sign.
<img src="http://localhost:8080/servlet/com.objectplanet.chart.ChartServlet? The chartTitle parameter adds a label at the top center of the chart.
<applet code=com.objectplanet.chart.ChartApplet
You can have multiline labels by using a \n (goes for all chart labels).
<applet code=com.objectplanet.chart.ChartApplet
The titleFont parameter sets the font used for the title.
<applet code=com.objectplanet.chart.ChartApplet
You can add a label to each pie segment in the chart by using the sampleLabels parameter. The sample labels can either be displayed floating above each pie segment when the mouse moves over (default), statically inside each pie slice, or in the legend. Turn on the sample labels using the sampleLabelsOn paramter.
<applet code=com.objectplanet.chart.ChartApplet
Use the sampleLabelStyle parameter to control how the labels are displayed. For labels inside the pie slices, use "inside", for floating labels, use "floating".
<applet code=com.objectplanet.chart.ChartApplet
Use the insideLabelFont parameter to control the font used for the static labels displayed inside each pie slice.
<applet code=com.objectplanet.chart.ChartApplet
Use the floatingLabelFont parameter to control the font used for the floating labels.
<applet code=com.objectplanet.chart.ChartApplet
Use sampleLabelStyle=outside to show sample labels outside the pie.
<applet code=com.objectplanet.chart.ChartApplet
Use sampleLabelStyle=pointing to show sample labels pointing to the slices.
<applet code=com.objectplanet.chart.ChartApplet
<applet code=com.objectplanet.chart.ChartApplet
<applet code=com.objectplanet.chart.ChartApplet
When using multiple data series you set a label for each data series using the seriesLabels parameter. The legend will display the series labels instead of the sample labels as in a chart with one data series.
<applet code=com.objectplanet.chart.ChartApplet
Use the seriesLabelsOn parameter to turn on floating series labels. When using multiple data series you set a label for each data series using the seriesLabels parameter. The legend will display the series labels instead of the sample labels as in a chart with one data series.
<applet code=com.objectplanet.chart.ChartApplet
Use seriesLabelStyle to display the series labels inside the pie slices.
<applet code=com.objectplanet.chart.ChartApplet Use the seriesLabelColors to set the colors of the series labels in the legend.
<applet code=com.objectplanet.chart.ChartApplet
The legend is turned on using the legendOn parameter.
<applet code=com.objectplanet.chart.ChartApplet
The legend position is controlled using the legendPosition parameter. The position can be right (default), left, top, or bottom.
<applet code=com.objectplanet.chart.ChartApplet
<applet code=com.objectplanet.chart.ChartApplet
By default the legend contains the sample labels when one data series is used or the series labels when multiple data series is used. You can override this by using the legendLabels parameter.
<applet code=com.objectplanet.chart.ChartApplet
Any legend box may be replaced by an image.
<applet code=com.objectplanet.chart.ChartApplet
Turn on the value labels using the valueLabelsOn parameter. The value labels is displayed floating above each pie segment when the mouse moves over it.
<applet code=com.objectplanet.chart.ChartApplet
Use the valueLabelStyle parameter to display the value labels statically inside each pie slice, outside each pie slice or pointing to the pie slices.
<applet code=com.objectplanet.chart.ChartApplet
Use the sampleDecimalCount parameter to control the number of decimals used for the value labels.
<applet code=com.objectplanet.chart.ChartApplet
You can add a prefix and postfix to the value labels using the valueLabelPrefix and valueLabelPostfix parameters.
<applet code=com.objectplanet.chart.ChartApplet
Use the percentLabelsOn parameter to turn on floating percent labels.
<applet code=com.objectplanet.chart.ChartApplet
Use the percentDecimalCount to control the number of decimals used for the percent labels.
<applet code=com.objectplanet.chart.ChartApplet
Use the percentLabelStyle parameter to display the percent labels statically inside each pie slice.
<applet code=com.objectplanet.chart.ChartApplet
If multiple data series are used in the chart the sample labels can be displayed below each pie by turning the pieLabelsOn parameter. Use the pieLabelFont parameter to set the font for these labels.
<applet code=com.objectplanet.chart.ChartApplet
You can set any label at any place by using label_N parameter. The parameter takes absolute or relative coordinates.
<applet code=com.objectplanet.chart.ChartApplet
The label can point to any sample if you specify the index and series of the sample. In this case the label can be dragged using the mouse.
<applet code=com.objectplanet.chart.ChartApplet
An URL adress can be assigned to a label using labelURL_N parameter. In this case a new web page is opened when user clicks the label.
<applet code=com.objectplanet.chart.ChartApplet
Use the sampleColors parameter to set the colors of the pie slices. If you have multiple data series, the sampleColors will set the color for each data serie. You can use the color names or html hex codes for the colors as in the example below.
<applet code=com.objectplanet.chart.ChartApplet
If you have multiple data series, the colors set is per data serie.
<applet code=com.objectplanet.chart.ChartApplet
Set the chart component background color using the background parameter.
<applet code=com.objectplanet.chart.ChartApplet
Set the chart component foreground color using the foreground parameter.
<applet code=com.objectplanet.chart.ChartApplet
Through the applet parameters you can control how the chart is displayed. Turn on 3D mode with the 3DModeOn parameter.
<applet code=com.objectplanet.chart.ChartApplet
Set the 3D display angle by using the angle parameter. Valid value range for the angle parameters is 10-90. Default is 30.
<applet code=com.objectplanet.chart.ChartApplet
Set the 3D display depth by using the depth parameter. The depth is relative to the width of the pie and ranges from 0.0-1.0. The default depth is 0.4.
<applet code=com.objectplanet.chart.ChartApplet
By default when a pie slice is selected, the slice is marked with a triangle inside the pie slice. You can control this selection marker by using the selectionStyle parameter. The different styles are triangle, circle, or detached.
<applet code=com.objectplanet.chart.ChartApplet
You can detach pie slices using the detachedSlices and detachedSlices_N parameter (where N is the pie index).
<applet code=com.objectplanet.chart.ChartApplet
You can control the distance a pie slice is detached using the detachedDistance parameter. The detach distance is relative to the pie size with a value of 1.0 being detached fully.
<applet code=com.objectplanet.chart.ChartApplet
By default a seperator line is displayed between each pie slice. You can turn this off by turning the sliceSeperatorOn parameter to off.
<applet code=com.objectplanet.chart.ChartApplet
By default, the color of the slice seperator is a hint darker than the pie slices it seperates. You can control the color of the seperators using the sliceSeperatorColor parameter.
<applet code=com.objectplanet.chart.ChartApplet
You can add a URL or javascript call to any pie slice or data series in the chart and have the applet open a new web page when the user double-clicks the slice or legend entry. You must include the MAYSCRIPT parameter in the applet tag if you want to call javascript functions. Have the url point to a web page containing another chart to create drilldown charts.
<applet code=com.objectplanet.chart.ChartApplet The parameter url_0 adds a URL to the first slice in the above example. Use the parameter url to add a default url to all the samples. In a chart having multiple data series, the url_N parameter adds a url to series N. The parameter url_N_M adds a url to sample M in data series N.
<applet code=com.objectplanet.chart.ChartApplet You can also set the URLs programatically by calling setParameter("url_0", "myurl"); You can put a URL label to any place in the chart and have applet open a new web page when user clicks the label.
<applet code=com.objectplanet.chart.ChartApplet The parameter urltarget, urltarget_N, urltarget_N_M adds a target window where the new web page should be opened. The parameter labelURLTarget and labelURLTarget_N specifies the target widow for the anywhere labels with URLs. The default behavior is to open the new page in the same window. The different parameter values are:
_self: Open new page in same window or frame. Use the singleClickURLOn parameter to use single click drilldowns. The sizing of the pie is calculated based on the size and position of other elements in the chart and the pie height relative to its width. For a pie to have the same width in 2D and 3D, you can set the graphInsets parameter.
<applet code=com.objectplanet.chart.ChartApplet
<applet code=com.objectplanet.chart.ChartApplet
<applet code=com.objectplanet.chart.ChartApplet
|