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

📄 bar_style_more.html

📁 java图形报表制作Applet
💻 HTML
字号:
<html>
<body>
<table width=600>
<tr><td>
<font face="verdana, arial, helvetica" size=-1>

<b>Stacked and Horizontal Bars</b>
<hr>
<applet code=com.objectplanet.chart.ChartApplet
 archive=chart.jar width=450 height=300>
<param name=chart value="bar">
<param name=seriesCount value="3">
<param name=sampleValues_0 value="38,-76,25,-38,71,63,25">
<param name=sampleValues_1 value="79,-08,52,-68,43,-55,61">
<param name=sampleValues_2 value="51,76, 58,-32,75,-76,58">
<param name=multiColorOn value=true>
<param name=sampleColors value="yellow, orange, red">
<param name=rangeStep value=50>
<param name=barWidth value=0.6>
<param name=barType value=stacked>
<param name=barAlignment value=horizontal>
<param name=valueLinesOn value=true>
<param name=background value=white>
<param name=valueLabelsOn value=true>
<param name=valueLabelFont value="Arial,bold,11">
<param name=rangeLabelFont value="Arial,bold,13">
</applet>

<pre>
<font face="verdana, arial, helvetica" size=-1>
<hr>
<b>Applet code:</b>
&lt;applet code=com.objectplanet.chart.ChartApplet
 width=450 height=300 codebase=..\..\classes>
&lt;param name=chart value="bar">
&lt;param name=seriesCount value="3">
&lt;param name=sampleValues_0 value="38,-76,25,-38,71,63,25">
&lt;param name=sampleValues_1 value="79,-08,52,-68,43,-55,61">
&lt;param name=sampleValues_2 value="51,76, 58,-32,75,-76,58">
&lt;param name=multiColorOn value=true>
&lt;param name=sampleColors value="yellow, orange, red">
&lt;param name=rangeStep value=50>
&lt;param name=barWidth value=0.6>
&lt;param name=barType value=stacked>
&lt;param name=barAlignment value=horizontal>
&lt;param name=valueLinesOn value=true>
&lt;param name=background value=white>
&lt;param name=valueLabelsOn value=true>
&lt;param name=valueLabelFont value="Arial,bold,11">
&lt;param name=rangeLabelFont value="Arial,bold,13">
&lt;/applet>


<hr>
<b>Servlet code:</b>
&lt;img src="http://localhost:8080/servlet/com.objectplanet.chart.ChartServlet?
chart=pie&
width=450&
height=300&
seriesCount=3&
sampleValues_0=38,-76,25,-38,71,63,25&
sampleValues_1=79,-08,52,-68,43,-55,61&
sampleValues_2=51,76,58,-32,75,-76,58&
multiColorOn=true&
sampleColors=yellow,orange,red&
rangeStep=50&
barWidth=0.6&
barType=stacked&
barAlignment=horizontal&
valueLinesOn=true&
background=white&
valueLabelsOn=true&
valueLabelFont=Arial,bold,11&
rangeLabelFont=Arial,bold,13"&gt;

<hr>
<b>Application code:</b>
package com.objectplanet.chart.testing; 
 
import com.objectplanet.chart.*; 
import java.awt.*; 
 
public class Bar { 
 
    public static void main(String[] argv) { 
        double[] sampleValues_0 = new double[] {38,-76,25,-38,71,63,25};
        double[] sampleValues_1 = new double[] {79,-8,52,-68,43,-55,61};
        double[] sampleValues_2 = new double[] {51,76, 58,-32,75,-76,58};
        Color[] sampleColors = new Color[] {Color.yellow, Color.orange, Color.red};
        
        BarChart chart = new BarChart();
        chart.setSeriesCount(3);
        chart.setSampleCount(7);
        chart.setSampleValues(0, sampleValues_0);
        chart.setSampleValues(1, sampleValues_1);
        chart.setSampleValues(2, sampleValues_2);
        chart.setRange(0,200);
        chart.setLowerRange(0,-150);
        chart.setFont("rangeLabelFont", new Font("Arial", Font.BOLD, 13));
        chart.setMultiColorOn(true);
        chart.setSampleColors(sampleColors);
        chart.setValueLabelsOn(true);
        chart.setFont("valueLabelFont", new Font("Arial", Font.BOLD, 11));   
        chart.setValueLinesOn(true);
		  chart.setMaxValueLineCount(10);
        chart.setBarType(BarChart.STACKED_BARS);
        chart.setBarAlignment(Chart.HORIZONTAL);
        chart.setBarWidth(0.6);
        chart.setBackground(Color.white);
        
        com.objectplanet.chart.NonFlickerPanel p = new com.objectplanet.chart.NonFlickerPanel(new BorderLayout());
        p.add("Center", chart);
        Frame f = new Frame();
        f.add("Center", p);
        f.setSize(450,320);
        f.show();
    }
} 
<hr>
</font>
</pre>
    
</td></tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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