Cognos Analytics

Cognos Analytics

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


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Google Charts Library not Importing for Custom Visualization

    Posted 11/13/19 09:46 AM
    I'm trying to use a Google Chart in a Custom Visualization, and it doesn't seem to be importing correctly.

    Here is my import statement in Main.ts:
    import * as google from "https://www.gstatic.com/charts/loader.js";​

    It finishes building successfully, but it does have a warning about that library not being resolved:
    [Info] [08:24:05] Started building the sources...
    'https://www.gstatic.com/charts/loader.js' is imported by renderer\Main.ts, but could not be resolved – treating it as an external dependency
    [Info] [08:24:07] Finished building the sources in 2000 ms​

    Then when I try to validate it in a Dashboard, I get an error message: "Cannot read property 'forEach' of null". I'm guessing that's because it could not be resolved when trying to import. 

    Is there anything else that has to be installed or imported to be able to use Google Charts or any other libraries except for D3?



    ------------------------------
    Thanks,
    Rory Cornelius
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Google Charts Library not Importing for Custom Visualization

    Posted 11/17/19 06:38 AM
    Hi Rory

    I have a working example, so send me an email on torben.noer@dk.ibm.com and I can share it with you

    Torben

    ------------------------------
    Torben Noer
    ------------------------------