[英]How to show Multiple data series in jfree chart
我想在一行中添加多個數據集。 我們如何用Jfree圖表做到這一點? 這樣我的輸出在BAR圖的單行中帶有多個顏色代碼
公共課程演示{
public static void main(String arg[]){
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.setValue(2, "Amu-referet Form", "Dtest");
dataset.setValue(7, "ApraisalForm", "Richa Dept");
dataset.setValue(4, "Feedback", "Test department");
dataset.setValue(12, "HES report", "Vipul HR dept");
dataset.setValue(6, "Marks", "Chandan");
JFreeChart chart = ChartFactory.createBarChart3D("Any title", "x label", "y label", dataset, PlotOrientation.HORIZONTAL, true, true, true);
ChartFrame frame1=new ChartFrame("Bar Chart",chart);
frame1.setVisible(true);
frame1.setSize(400,350);
}
}
通過使用ChartFactory.createStackedBarChart3D()方法解決了我的問題
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.