Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
Expand all | Collapse all

Assign colors to measures/series on Cognos charts

  • 1.  Assign colors to measures/series on Cognos charts

    Posted Thu May 15, 2025 09:07 AM

    Hi, 

    is there a way of making sure that a specific measure/data point would always have the same color in Cognos Analytics charts? 

    We can define a palette, but if some data points will be missing due to filtering/prompting, the colors will shift.

    What are best practice approaches to this?

    Still on 11.1.7. If there is some development in this area in newer versions, that would be good to know as well.

    Thanks

    Tomas



    ------------------------------
    Tomáš Polakovič
    ------------------------------


  • 2.  RE: Assign colors to measures/series on Cognos charts

    Posted Fri May 16, 2025 02:15 AM

    When you say Cognos Analytics charts do you mean the newer 11.1 visualisations? If so - nope. However, if you are willing to fall back to the older Charts (Cognos 10 charting engine), then YES!

    Just use a chart conditional palette. You can define this on anything - for example always make Camping Equipment blue.

    I would say that when authoring report I always fall back to these charts rather than using the 11.1 visualisations. The limited interactivity of 11.1 charts just doesn't make them a big enough feature for me to switch to them. And the older charts have limitless formatting capabilities, and master detail relationships, that the newer 11.1 charts can't even come close to. However, there are some chart types that are only available in the 11.1 suite.



    ------------------------------
    Marc Reed
    Reporting Lead
    ------------------------------



  • 3.  RE: Assign colors to measures/series on Cognos charts

    Posted 30 days ago

    Hi Marc,

    thank you for your suggestion. 

    It kind of works, however, the chart legend now contains both the original colors and the conditional colors as well. I did not find a way to switch off the original colors, other than recreating the legend from scratch - https://www.ibm.com/support/pages/how-create-legend-custom-palette
    Is this what you do or is there a better way?
    Thanks



    ------------------------------
    Tomáš Polakovič
    ------------------------------



  • 4.  RE: Assign colors to measures/series on Cognos charts

    Posted 30 days ago

    Yes. Just remove the legend from the chart and create your own. I often do this anyway as I am not a fan of the formatting of chart legends. 

    As your legend is very specific its just a case of adding a table and colouring the background of a cell and putting some text next to it. You don't need anything as advanced as the document you linked to. 



    ------------------------------
    Marc Reed
    Reporting Lead
    ------------------------------



  • 5.  RE: Assign colors to measures/series on Cognos charts

    Posted 29 days ago

    Yes, this is still a bummer.

    There were talks for quite some time about functionality to use a Data Item value as a color in a Viz...  No ETA.

    For now, I just add Dummy Data to make sure that ALL Color categories always exist in the Query regardless of the applied Filters.

    And define a Custom palette to map required colors to categories.

    In the attached picture there are 3 charts side by side. Only one has Legend visible because it is the same for all charts. 

    The Legend always has all Color categories even if there is no data for some due to Filters.



    ------------------------------
    Andrei Istomine
    Open to work - anything Cognos
    https://www.linkedin.com/in/andreii/
    ------------------------------



  • 6.  RE: Assign colors to measures/series on Cognos charts

    Posted 29 days ago

    If you're going to the effort to make sure all the categories always appear in the data then there isn't any need for the conditional palette - you can just use the normal palette.

    For example, you know your data will always have the three product lines of Camping, Golf, Outdoor. You can just define a three colour palette.

    I submitted an enhancement request about defining palettes to provide colour consistency across all Cognos products. Please vote on it! https://ibm-data-and-ai.ideas.ibm.com/ideas/CA-I-4538



    ------------------------------
    Marc Reed
    Reporting Lead
    ------------------------------



  • 7.  RE: Assign colors to measures/series on Cognos charts

    Posted 29 days ago

    I'd think, that implementing Conditional Styles  (like in List/Crosstab) would be a standard Cognos approach.

    I would add a functionality to use a Query Data item as a color.

    Though, if Cognos was perfect nobody would migrate from it to other tools like Power BI :-)



    ------------------------------
    Andrei Istomine
    Open to work - anything Cognos
    https://www.linkedin.com/in/andreii/
    ------------------------------



  • 8.  RE: Assign colors to measures/series on Cognos charts

    Posted 29 days ago

    OK - I voted for the idea ;)

    One more thing - I saw in the 12.1 deprecation list:
    As of release 12.1.0, Presentation Graphics SDK (PGSDK) visualizations will not be supported and will be removed from reports.

    I am not quite sure which visualizations this refers to (there are so many ;)) - I hope it's not the charts we discuss in this thread - do you know?

    Thanks



    ------------------------------
    Tomáš Polakovič
    ------------------------------



  • 9.  RE: Assign colors to measures/series on Cognos charts

    Posted 29 days ago

    I believe that it is the much older Cognos 8 charts that are going. In 12.1 the following chart engines are available.

    What isn't available is this: 

    Which would switch the charts options to Cognos 8 charts.



    ------------------------------
    Marc Reed
    Reporting Lead
    ------------------------------



  • 10.  RE: Assign colors to measures/series on Cognos charts

    Posted 25 days ago

    PGSDK is the legacy visualization engine and does not appear in the report's visualization dropdown unless it is enabled through the advanced feature that Marc highlighted above.



    ------------------------------
    Shaveta Srivastava
    ------------------------------



  • 11.  RE: Assign colors to measures/series on Cognos charts

    Posted 24 days ago

    Hi @Shaveta Srivastava,

    Any plans to add Conditional Formatting/Styles to Chart Visualizations ( e.g. a functionality to use a Data Item value as a color)?

    Thank you!



    ------------------------------
    Andrei Istomine
    Open to work - anything Cognos
    https://www.linkedin.com/in/andreii/
    ------------------------------