https://issues.apache.org/bugzilla/show_bug.cgi?id=52067

             Bug #: 52067
           Summary: HSSFChart createSeries not working properly when
                    adding more than one series
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: mgar...@uibuk.com
    Classification: Unclassified


I have a worksheet with 2 sheets. In the 1st sheet i have the data and in the
2nd one a graph - i open it thru java and load data into 1st sheet and then i
need to create some series in 2nd tab's graph dynamically depending on data.

The graph already have a dummy series - I need it to have setSeriesTitle
working and I will delete it later.

When I add a new series to the graph, it works fine. The problem is if I add
more than one. My file gets corrupted and if I add 4 series to the graph it
only displays 3...

This is my code:

HSSFSeries series;
int employeeGradedPercColumn=4;
CellRangeAddress productsRange = new
CellRangeAddress(rowStartingSecondReport+1,
rowStartingSecondReport+totalProducts, 1, 1) ;            
Iterator<String> iterator = employeeSeriesHeader.iterator();
while(iterator.hasNext()){                
                series = chart.createSeries();
                series.setCategoryLabelsCellRange(productsRange) ;
                series.setValuesCellRange( new CellRangeAddress(
rowStartingSecondReport+1, rowStartingSecondReport+totalProducts,
employeeGradedPercColumn, employeeGradedPercColumn)) ;
                series.setSeriesTitle(iterator.next()); 
                employeeGradedPercColumn=employeeGradedPercColumn+2;            
            }

Thanks,
Maria

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to