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

📄 linechartwithhole.java

📁 一个完整的
💻 JAVA
字号:
package cn.com.fcsoft.chart.examples;
import cn.com.fcsoft.chart.*;

import java.awt.*;
import java.awt.event.*;


/**
 * This example shows how to use the target value lines.
 * @author meiqi.
 */
public class LineChartWithHole {

	public static void main(String[] argv) {
		
		LineChart chart = new LineChart();
		double[] values = new double[] {34,68,Double.NaN,56,75,Double.NaN,24,63,54};
		chart.setSampleCount(values.length);
		chart.setSampleValues(0, values);

		// display the chart
		Frame f = new Frame();
		f.add("Center", chart);
		f.setSize(400,300);
		f.show();
		
		
		LineChart chart2 = new LineChart();
		values = new double[] {34,68,Double.NaN,56,75,Double.NaN,24,63,54};
		chart2.setSampleCount(values.length);
		chart2.setSampleValues(0, values);
		chart2.getSample(0, 2).clearValue();
		chart2.getSample(0, 5).clearValue();

		// display the chart
		Frame f2 = new Frame();
		f2.add("Center", chart2);
		f2.setSize(400,300);
		f2.setLocation(400,0);
		f2.show();
	}
}

⌨️ 快捷键说明

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