⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 presales_questions.html

📁 java图形报表制作
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p><br>
<a name="javascript"></a>
<p><font color=darkred>
<b>34. Can I control the charts using JavaScript?</b>
</font>
<p>
Yes. Look at <a href="examples/bar_javascript.html">this example</a>

   
<p><br>
<a name="plotter"></a>
<p><font color=darkred>
<b>35. Can I do plotter charts?</b>
</font>
<p>
Yes and no. In the current version you can not plot x/y values directly. 
You can however turn on sample highlight points on the lines, and turn off 
the lines to display points only.
<p>
&lt;param name="sampleHighlightOn" value="true"&gt;<BR>
&lt;param name="sampleHighlightStyle" value="circle"&gt;<BR>
&lt;param name="seriesLineOff" value=true&gt;
<p>
A true plotter chart will be added in later versions.
<p>
<a href="examples/line_highlights.html">line chart plots</a>


<p><br>
<a name="floating_point"></a>
<p><font color=darkred>
<b>36. How do I display floating point data?</b>
</font>
<p>
For a bar and line chart applet, use the following two parameters
<p>
&lt;param name=sampleDecimalCount value=3&gt;<BR>
&lt;param name=rangeDecimalCount value=2&gt;
<p>
For a pie chart applet, use the following two parameters
<p>
&lt;param name=sampleDecimalCount value=1&gt;<br>
&lt;param name=percentDecimalCount value=1&gt;
<p>
Add floating point data using the sampleValues parameter
<p>
&lt;param name=sampleValues value="1.242, 4.1224, 5.1212, 6.231"&gt;
<p>
In a java application, do the following:
<p>
chart.setSampleDecimalCount(2);<BR>
chart.setRangeDecimalCount(2);
<p>
<a href="examples/bar_value.html#decimals">decimal value labels</a>


<p><br>
<a name="copy_paste"></a>
<p><font color=darkred>
<b>37. Does EasyCharts support copy & paste?</b>
</font>
<p>
No. Due to EasyCharts being based on JDK 1.02 and JDK 1.1, copy & paste 
is not supported.


<p><br>
<a name="floating_labels"></a>
<p><font color=darkred>
<b>38. How do I display tool-tip like labels?</b>
</font>
<p>
For the bar chart applet, do the following:
<p>
&lt;param name="valueLabelStyle" value="floating"&gt;<BR>
&lt;param name="barLabelStyle" value="floating"&gt;
<p>
In an java application call the following methods:
<p>
setValueLabelStyle(BarChart.VALUE_LABELS_FLOATING);<BR>
setBarLabelStyle(BarChart.BAR_LABELS_FLOATING);
<p>
The labels in the pie chart is floating by default. The line chart does not 
support floating labels in the current version.
<p>
<a href="examples/bar_chartlabels.html#floating">floating bar sample labels</a><br>
<a href="examples/bar_value.html#floating">floating bar value labels</a>


<p><br>
<a name="flickering"></a>
<p><font color=darkred>
<b>39. How do I avoid flickering of the charts when they repaint?</b>
</font>
<p>
In a java application, use the NonFlickerPanel class supplied by 
EasyCharts.
<p>
BarChart chart = new BarChart();<BR>
// set the chart data<BR>
// ...<BR>
// add the chart in the NonFlickerPanel<BR>
NonFlickerPanel p = new NonFlickerPanel(new BorderLayout());<BR>
p.add("Center", chart);<BR>
// display the chart<BR>
Frame f = new Frame();<BR>
f.add("Center", p);<BR>
f.setSize(300,200);<BR>
f.show();


<p><br>
<a name="line_types"></a>
<p><font color=darkred>
<b>40. Does the line chart support different line types?</b>
</font>   
<p>
No. Due to the charts being based on JDK 1.02 and JDK 1.1 they do 
not support different line styles.


<p><br>
<a name="url"></a>
<p><font color=darkred>
<b>41. How do I associate a URL with a chart sample?</b>
</font>
<p>
Use the url parameter:
<p>
&lt;param name="url_0" value="orange_sales_1999.html"&gt;<BR>
&lt;param name="url_1" value="apple_sales_1999.html"&gt;<BR>
&lt;param name="url_2" value="banana_sales_1999.html"&gt;<BR>
&lt;param name="url_3" value="http://www.objectplanet.com"&gt;
<p>
Since Java can only call valid URL links, JavaScript functions can
not be called using the url parameters. Netscape comes with something called
JSObject which can be used. See 
<a href="http://www.apl.jhu.edu/~hall/java/JavaScript-from-Java.html">here</a>
for instructions.
      

<p><br>
<a name="download_time"></a>
<p><font color=darkred>
<b>42. What is the download time of the chart applets?</b>
</font>
<p>
The size of the chart.jar file is approx. 80KB and will take about 12-15 
seconds on a 56K modem. On a LAN it takes less than 1 second to 
load the chart classes.



<p><br>
<a name="japanese"></a>
<p><font color=darkred>
<b>43. Can EasyCharts display Japanese characters?</b>
</font>
<p>
Yes, see <a href="examples/java/JapaneseChart.html">example</a>.


<p><br>  
<a name="browser_scrolling"></a>
<p><font color=darkred>
<b>44. Why do the chart applets have problems repainting when I scroll the web page?</b>
</font>
<p>
Some browsers has problems repainting complex java applets. Use the 
automaticRefreshTime parameter to work around this problem. This parameter 
makes the applet repaint itself every n milliseconds:
<p>
&lt;param name="automaticRefreshTime" value=1000&gt;


<p><br>
<a name="netscape_printing"></a>
<p><font color=darkred>
<b>45. Why do I have problems printing the charts in Netscape?</b>
</font>
<p>
In earlier versions, netscape did not support printing of java applets. In 
later versions it supports printing, but the applets are always printed 
relatively larger than they appear on the screen. We have not found a 
workaround for this other than to use another browser or have the charts
generated as images on the server.


<p><br>  
<a name="evaluation"></a>
<p><font color=darkred>
<b>46. How do I remove the red evaluation button and copyright banner?</b>
</font>
<p>
Purchase a valid license from our
<a href="http://objectplanet.com/purchase.html">purchase page</a>, 
download the registered software, and replace the evaluation version. Then 
restart your web browser.
<p>
If you still have the red button displayed, you might have some old evaluation
classes loading from elsewhere on your systems. To check for this, remove
the archive=chart.jar tag from your applet tag, close and restart your
browser and test again. The applet should not start. If it does, you need
to remove any com/objectplanet/chart classes (or chart.jar) files from
your CLASSPATH environment variable.
<p>
If it still does not work, restart your web server and or client machine.
Also try and test with other client machines connecting to your
web server (if you are running as an applet).


<p><br>
<a name="netscape_mac"></a>
<p><font color=darkred>
<b>47. I am having problems with Mac/Netscape. How do I fix it?</b>
</font>
<p>
You need to download the MacOS Runtime for Java (MRJ) Plug-In for Netscape, 
and then enable it in your browser. You can find details and links to the 
downloads <a href="http://www.mozilla.org/oji/MRJPlugin.html">here</a>


<p><br>
<a name="linux_no_x"></a>
<p><font color=darkred>
<b>48. How do I use EasyCharts on Unix without X-Windows installed?</b>
</font>
<p>
Java's AWT (graphical system) needs an underlaying graphical architecture such
as X-Windows to work. A servlet executed on a unix server without X installed
or running will throw an exception. If you want to run ChartServlet on a linux
computer without X-Windows installed you have two options:
<p>
<ol>
<li>Install <b>Xvfb</b><br>
<li>Install <b>PJA</b>
</ol>

<p>
<b>1. Xvfb</b><br>
Xvfb is a virtual X server which can run on machines without a display
or physical graphical device.
You can get Xvfb for Linux from 
<a href="ftp://ftp.xfree86.org/pub/XFree86/3.3.6/binaries/Linux-ix86-glibc20/Xvfb.tgz">ftp.xfree86.org</a>.
Distributions for other Unix systems can also be found at <a href="ftp://ftp.xfree86.org">ftp.xfree86.org</a>.
You can also get Xvfb source at <a href="ftp://ftp.x.org">ftp.x.org</a> and compile it.
<p>
1. Install Xvfb in a directory on your linux computer<br>
2. Run Xvfb by typing in ./Xvfb :0 where 0 is the X-windows display number.<br>
3. Set the DISPLAY variable to point to localhost:0<br>

<p>
The Xvfb should now be installed properly. You can now run EasyChart's 
ChartServlet on a headless Linux server.

<p>
For more information about Xvfb check <a href="http://www.xfree86.org/4.0.1/Xvfb.1.html">http://www.xfree86.org/4.0.1/Xvfb.1.html</a>

<p>
<b>2. PJA</b><br>
<a href="http://www.eteks.com/pja/en/">Pure Java AWT replacement library</a>.
<p>
Assuming<br>
- Java is installed into: /usr/local/jdk1.2.2<br>
- Tomcat is installed into: /home/user/tomcat<br>
- PJA is installed into: /home/user/pja<br>
<p>
<ol>
<li>Run <i>http://server/examples/servlet/com.eteks.servlet.DefaultToolkitTest</i> and
   <i>PJAToolkitDemo.sh</i> to see if servlets and applications can run on the server.
   PJAToolkitDemo.sh shoudl look like this:<br>
<i>&nbsp;&nbsp;&nbsp;java -Xbootclasspath/a:../lib/pja.jar \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Dawt.toolkit=com.eteks.awt.PJAToolkit \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Djava2d.font.usePlatformFont=false<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Djava.awt.fonts=/usr/local/jdk1.2.2/jre/lib/fonts \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Duser.home=.. \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-classpath ../lib/pjatools.jar \<br>
&nbsp;&nbsp;&nbsp;ToolkitDemo<br></i>
   If you see 4 images generated, it means that you can use graphic servlets
   on this server with PJA.
<p>
<li>In /home/user/tomcat open file tomcat.sh and find string<br>
<i>JAVACMD="$JAVA_HOME/bin/java.</i><br>
Replace it with<br>
<i>JAVACMD="$JAVA_HOME/bin/java -Xbootclasspath/a:/home/user/pja/lib/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -Djava2d.font.usePlatformFont=false -Djava.awt.fonts=/usr/local/java/jre/lib/fonts -Duser.home=home/user/pja"</i><br>
and next to it add<br>
<i>CLASSPATH=${CLASSPATH}:/path_to_chartServer.jar/chartServer.jar</i><br>
<p>
<li>Start Tomcat and enter in your browser:
<i>http://server/examples/servlet/com.objectplanet.chart.ChartServlet</i><br>
A chart image should be returned to your browser now.
</ol>


<p>
<br>
<hr>
<font size=-2>
Copyright (C) 1998-2003
<br>ObjectPlanet, Inc.
<br>(+47) 2233 3360
</font></font>

</BODY>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -