0

我想在一个屏幕中表示两个图表

这是我的代码

PieChart chart = new PieChartBuilder().width(800).height(600).title("Analysis on the Cases of 2020").title("Age").title("Amount").build();
        
chart.addSeries("Finland", 3);
chart.addSeries("Germany", 10);

new SwingWrapper(chart).displayChart();

输出:

在此处输入图像描述

我想在同一个屏幕上再显示一个饼图。它的代码是

PieChart chart1 = new PieChartBuilder().width(800).height(600).title("Analysis on the Cases of 2020").title("Age").title("Amount").build();
        
chart1.addSeries("USA", 13);
chart1.addSeries("UK", 20);
new SwingWrapper(chart).displayChart();

请帮助如何做到这一点。

4

0 回答 0