http://www.perlmonks.org?node_id=973559

temporal has asked for the wisdom of the Perl Monks concerning the following question:

Silly question for this old-ish module. I've got some line charts that are generated using Spreadsheet::WriteExcel. I'd like to change the color of the lines from the default to something else. Seems simple enough.

Has anyone stumbled upon a way to accomplish this? The documentation doesn't include this functionality and I'm beginning to suspect that it hasn't been implemented.

Strange things are afoot at the Circle-K.

Replies are listed 'Best First'.
Re: line colors in Spreadsheet::WriteExcel
by roboticus (Chancellor) on May 31, 2012 at 18:09 UTC

    temporal:

    You may be right. I didn't see any likely candidates in the examples directory, and the t (tests) directory didn't show me anything obvious, either. You may want to look more closely at the tests 62_chart_formats.t and 63_chart_area_formats.t more closely than I did, as you might find a hint there. (Both mention colors, but I didn't see anything on changing line colors.)

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      Thanks for digging around roboticus =)

      It hadn't occurred to me to check the tests (usually I dive straight into laborious source-mining). Took a close look at them and this functionality isn't being tested so I'm going to assume it doesn't exist.

      Strange things are afoot at the Circle-K.

Re: line colors in Spreadsheet::WriteExcel
by jmcnamara (Monsignor) on Jun 02, 2012 at 13:39 UTC

    Changing the line colour in charts isn't possible in Spreadsheet::WriteExcel.

    It is possible with Excel::Writer::XLSX which is an API compatible replacement for Spreadsheet::WriteExcel.

    --
    John.