0

I would like to display duplicate items on X Axis as I have different values for that duplicate items which I want to compare. But the problem is that addValue() ignores the duplicate value. I have below code which I have written :

Code

DefaultCategoryDataset my_bar_chart_dataset = new DefaultCategoryDataset();
for(int i=0;i <list1.size();i++)
{
     for(String checkelementID : checkelementIDs)
     {
         if(checkelementID.equals(list1.get(i).get(0)))
         {
              if(!list1.get(i).get(12).equals(""))
              {                         
                  my_bar_chart_dataset.addValue(Double.parseDouble(list1.get(i).get(12)), "KEY",list1.get(i).get(1));
              }
         }
    }
 } 
Baz
  • 36,440
  • 11
  • 68
  • 94
  • 1
    What has this got to do with SWT or eclipse-rcp? – greg-449 Aug 02 '16 at 10:47
  • I am using this chart into my eclipse rcp product – Rahul Prajapati Aug 02 '16 at 11:24
  • 1
    But there is nothing in this question that an expert on SWT or Eclipse RCP can answer so the tags are wrong. – greg-449 Aug 02 '16 at 11:44
  • I have modified tags. – Rahul Prajapati Aug 02 '16 at 12:28
  • You may be looking for multiple series, for [example](http://stackoverflow.com/a/36172705/230513). For more specific guidance, please edit your question to include a [mcve] that exhibits the problem you describe. – trashgod Aug 02 '16 at 15:54
  • Multiple series but with duplicate name. As shown in (http://stackoverflow.com/questions/36171659/cast-defaultcategorydataset-to-categorydataset/36172705#36172705) , i need to display "Category 1" multiple time because I have duplicate names have unique values. – Rahul Prajapati Aug 03 '16 at 05:57

0 Answers0