Line Width


Applet code: <applet code=com.objectplanet.chart.ChartApplet archive=chart.jar width=450 height=300> <param name=chart value="line"> <param name=seriesCount value="4"> <param name=sampleValues_0 value=10,71,51,83,68> <param name=sampleValues_1 value=35,44,22,56,46> <param name=sampleValues_2 value=70,11,82,27,36> <param name=sampleValues_3 value=50,95,10,20,5> <param name=range value=100> <param name=rangeLabelFont value="Arial,bold,13"> <param name=sampleColors value="#C6C6C6,#498EFF,#635AFF,#31319C"> <param name=lineWidth value=6,5,3,2> <param name=background value=white> </applet>
Servlet code: <img src="http://server_name/servlet/com.objectplanet.chart.ChartServlet? width=450& height=300& chart=line& seriesCount=4& sampleValues_0=10,71,51,83,68& sampleValues_1=35,44,22,56,46& sampleValues_2=70,11,82,27,36& sampleValues_3=50,95,10,20,5& range=100& rangeLabelFont=Arial,bold,13& sampleColors=%23C6C6C6,%23498EFF,%23635AFF,%2331319C& lineWidth=6,5,3,2& background=white">
Application code: package com.objectplanet.chart.testing; import com.objectplanet.chart.*; import java.awt.*; public class Line { public static void main(String[] argv) { double[] sampleValues_0 = new double[] {10,71,51,83,68}; double[] sampleValues_1 = new double[] {35,44,22,56,46}; double[] sampleValues_2 = new double[] {70,11,82,27,36}; double[] sampleValues_3 = new double[] {50,95,10,20,5}; Color[] sampleColors = new Color[] {new Color(0xC6C6C6),new Color(0x498EFF),new Color(0x635AFF),new Color(0x31319C)}; LineChart chart = new LineChart(); chart.setSeriesCount(4); chart.setSampleCount(sampleValues_0.length); chart.setSampleValues(0, sampleValues_0); chart.setSampleValues(1, sampleValues_1); chart.setSampleValues(2, sampleValues_2); chart.setSampleValues(3, sampleValues_3); chart.setSampleColors(sampleColors); chart.setFont("rangeLabelFont", new Font("Arial", Font.BOLD, 13)); chart.setLineWidth(0, 4); chart.setLineWidth(1, 3); chart.setLineWidth(2, 2); chart.setLineWidth(3, 1); 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(); } }