Questions? Email us:
sales@haneng.com

 

PreFix & PostFix


Description:
PreFix and PostFix allows you to add a symbol or text to the axis labels, mouse over labels etc. PreFix adds the symbol/text in front of the value and PostFix adds the symbol/text after the value.

Example:
<PARAM NAME="PreFix" VALUE="$">
<PARAM NAME="PostFix" VALUE="inches">

Code Samples:
Lets start with a simple chart:


View Source Code

If this chart shows how much e.g. a company office in each city made yesterday in dollars we might want to add the $ symbol to all the values. To do this we add this code between the <APPLET> tags:
<PARAM NAME="PreFix" VALUE="$">

The chart will now look like this:


View Source Code

As you can see the values on the Y-axis changes from 0, 210, 420, 630 and 840 to $0, $210, $420, $630 and $840. If you move your mouse over the bars you will see that the values shown also has the $ in front of it.

But what if the chart is not showing earnings, but how many sales each office had? To do this we remove the PostFix code and add this code between the <APPLET> tags:
<PARAM NAME="PostFix" VALUE="Sales">


View Source Code

If you would like a space between the value and the PreFix or PostFix symbol you can use the '_' symbol. For example:
<PARAM NAME="PostFix" VALUE="_Sales">


View Source Code

You can of course also use PreFix and PostFix in the same chart:


View Source Code




Sample Chart Source Code:

Code For Chart 1:
<APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts3.jar" WIDTH=350 HEIGHT=200>
<PARAM NAME="LicenseKey" VALUE="30DAYDEMO-L2PM64VDxAyWLD">
<PARAM NAME="ChartType" VALUE="bar2">
<PARAM NAME="Text_1" VALUE="Sydney">
<PARAM NAME="Value_1" VALUE="435">
<PARAM NAME="Text_2" VALUE="New York">
<PARAM NAME="Value_2" VALUE="794">
<PARAM NAME="Text_3" VALUE="London">
<PARAM NAME="Value_3" VALUE="326">
<PARAM NAME="Text_4" VALUE="Paris">
<PARAM NAME="Value_4" VALUE="712">
<PARAM NAME="Text_5" VALUE="Berlin">
<PARAM NAME="Value_5" VALUE="825">
</APPLET>

Code For Chart 2:
<APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts3.jar" WIDTH=350 HEIGHT=200>
<PARAM NAME="LicenseKey" VALUE="30DAYDEMO-L2PM64VDxAyWLD">
<PARAM NAME="PreFix" VALUE="$">
<PARAM NAME="ChartType" VALUE="bar2">
<PARAM NAME="Text_1" VALUE="Sydney">
<PARAM NAME="Value_1" VALUE="435">
<PARAM NAME="Text_2" VALUE="New York">
<PARAM NAME="Value_2" VALUE="794">
<PARAM NAME="Text_3" VALUE="London">
<PARAM NAME="Value_3" VALUE="326">
<PARAM NAME="Text_4" VALUE="Paris">
<PARAM NAME="Value_4" VALUE="712">
<PARAM NAME="Text_5" VALUE="Berlin">
<PARAM NAME="Value_5" VALUE="825">
</APPLET>

Code For Chart 3:
<APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts3.jar" WIDTH=350 HEIGHT=200>
<PARAM NAME="LicenseKey" VALUE="30DAYDEMO-L2PM64VDxAyWLD">
<PARAM NAME="PostFix" VALUE="Sales">
<PARAM NAME="ChartType" VALUE="bar2">
<PARAM NAME="Text_1" VALUE="Sydney">
<PARAM NAME="Value_1" VALUE="435">
<PARAM NAME="Text_2" VALUE="New York">
<PARAM NAME="Value_2" VALUE="794">
<PARAM NAME="Text_3" VALUE="London">
<PARAM NAME="Value_3" VALUE="326">
<PARAM NAME="Text_4" VALUE="Paris">
<PARAM NAME="Value_4" VALUE="712">
<PARAM NAME="Text_5" VALUE="Berlin">
<PARAM NAME="Value_5" VALUE="825">
</APPLET>

Code For Chart 4:
<APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts3.jar" WIDTH=350 HEIGHT=200>
<PARAM NAME="LicenseKey" VALUE="30DAYDEMO-L2PM64VDxAyWLD">
<PARAM NAME="PostFix" VALUE="_Sales">
<PARAM NAME="ChartType" VALUE="bar2">
<PARAM NAME="Text_1" VALUE="Sydney">
<PARAM NAME="Value_1" VALUE="435">
<PARAM NAME="Text_2" VALUE="New York">
<PARAM NAME="Value_2" VALUE="794">
<PARAM NAME="Text_3" VALUE="London">
<PARAM NAME="Value_3" VALUE="326">
<PARAM NAME="Text_4" VALUE="Paris">
<PARAM NAME="Value_4" VALUE="712">
<PARAM NAME="Text_5" VALUE="Berlin">
<PARAM NAME="Value_5" VALUE="825">
</APPLET>

Code For Chart 5:
<APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts3.jar" WIDTH=350 HEIGHT=200>
<PARAM NAME="LicenseKey" VALUE="30DAYDEMO-L2PM64VDxAyWLD">
<PARAM NAME="PreFix" VALUE="$">
<PARAM NAME="PostFix" VALUE="_Profit">
<PARAM NAME="ChartType" VALUE="bar2">
<PARAM NAME="Text_1" VALUE="Sydney">
<PARAM NAME="Value_1" VALUE="435">
<PARAM NAME="Text_2" VALUE="New York">
<PARAM NAME="Value_2" VALUE="794">
<PARAM NAME="Text_3" VALUE="London">
<PARAM NAME="Value_3" VALUE="326">
<PARAM NAME="Text_4" VALUE="Paris">
<PARAM NAME="Value_4" VALUE="712">
<PARAM NAME="Text_5" VALUE="Berlin">
<PARAM NAME="Value_5" VALUE="825">
</APPLET>