Bug 54353 - different colors of chart
Summary: different colors of chart
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2012-12-27 15:12 UTC by Rajani Kanth
Modified: 2017-07-10 05:22 UTC (History)
0 users

chart with different colors when viewed in Excel 2010 and above version (548.27 KB, image/bmp)
2012-12-27 15:12 UTC, Rajani Kanth
Doh, wrong issue. Ignore. (49.00 KB, application/vnd.ms-powerpoint)
2015-06-25 11:54 UTC, Tim Allison

Note You need to log in before you can comment on or make changes to this bug.
Description Rajani Kanth 2012-12-27 15:12:12 UTC
Created attachment 29795 [details]
chart with different colors when viewed in Excel 2010 and above version

Generated Chart shows the consistency of the graph color when viewed in Excel 2007 or below version. Where as generated chart showing different colors when opened in Excel 2010 or above version. We are using poi 3.8 and 3.9 to generated the excel sheet.

Is their any possible way to show the consistency of the graph color with poi 3.8 or 3.9 supporting Excel 2010 or above version.

Find the attached file which shows the graphs viewed in different versions of Excel.
Comment 1 Rajani Kanth 2013-01-03 08:56:21 UTC
Properties like 'vary color by points', 'Mojor Gridlines', 'Scatter Chart with Smoothlines' - how they are handled for Excel 2010 using poi 3.8 or 3.9
Comment 2 Tim Allison 2015-06-25 11:54:49 UTC
Created attachment 32855 [details]
Doh, wrong issue.  Ignore.
Comment 3 Javen O'Neal 2017-07-10 02:27:49 UTC
Chart support is still quite limited for both HSSF and XSSF. Some work has been done recently (3.17 beta), but much work is still needed.

Usage questions should be asked on the mailing list.
Comment 4 Greg Woolsey 2017-07-10 05:22:16 UTC
If the file specifies to use Excel's default color palette, that depends on the document or system theme colors.  "Automatic" setting doesn't store the color info in the XLSX document.  Thus two different installations of Excel could have different default color schemes that apply to automatically colored elements like chart series.

If you want consistency explicitly define a default theme in the document.  Easiest I've found is to use Excel to create a theme I want, set it as the document theme, save an empty document, and use it as a template in POI - open a copy of that document and add your data/charts etc. to it every time.  Faster than figuring out how to code a theme in my experience.