I need to create a simple histogram using JFreeChart. There should be 3 groups with numeric values assigned to each of these groups. The problem is that DefaultCategoryDataset
requires specifying "Group" and "Subgroup" (i.e. dataset.setValue(5,"Subgroup1.1","Group1"
);), but I don´t have subgroups. What is the alternative of DefaultCategoryDataset
? I need to get something like this:
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.setValue(2, "Group1");
dataset.setValue(3, "Group2");
dataset.setValue(5, "Group3");