Alpha Video Training
Results 1 to 10 of 10

Thread: Can't load multiple googles charts on page layout or embedded in ux

  1. #1
    Member
    Real Name
    Richard
    Join Date
    Mar 2012
    Posts
    350

    Default Can't load multiple googles charts on page layout or embedded in ux

    I have 6 UX's each with 1 google chart defined. Each UX displays the google chart fine.

    I want to dashboard the google charts so thought I'd put them on a Page Layout component but none of them will load, even if only one UX is added.

    I also tried putting them onto a single UX as embedded components but get "Unable to get property 'load' of undefined or null reference" if more than one UX (with chart) is embedded.

    It's got me stumped.

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,565

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    Can you post a sample component for review?

  3. #3
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,565

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    I just tried this... and just adding in the UX as a component doesn't complete the Page Layout setup. I found the same... that the chart was not displaying. However, the chart is actually there.

    In the Page Layout Component Properties... set a Window height and Window width... and now your UX will show through... the Window.
    Last edited by Davidk; 12-12-2017 at 10:12 PM.

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,565

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    It looks like something is a bit of a mess.

    With 1 UX and 1 Chart... the chart was rendered but would not display.
    I added in a Page Layout Component Width and Height... the chart displayed.
    I added a 2nd UX with 1 Chart. Only one chart would display.
    I removed the 2nd UX... removed the Width and Height settings... and the chart displayed. So... something's a mess.

    I then added a 2nd Chart to a UX... still no Width and Height set... and both charts display. So... there you go.

    I feel all the charts would be better in 1 UX anyway... since you'd need to ensure the Google Chart libraries are loading for each UX. And you don't really want them loading... or even attempting to load... more than once.

    Also... just to ensure stuff is properly set up... your UX does have it's property "Google visualization libraries" set up... right?
    And... my chart code is in a function... and that function is being called in the Client-side Event afterGoogleVisualization.

    So, nothing gets run until the libs are loaded.

  5. #5
    Member
    Real Name
    Richard
    Join Date
    Mar 2012
    Posts
    350

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    Thanks David, something definitely isn't right that's for sure.

    My charts have been created exactly as per Selwyn's sample videos, Google visualization libraries loaded etc.

    As a workaround, I managed to get all 6 charts rendered in a UX by using IFrames. Each UX was saved as a page and each IFrame URL pointed to the respective page.

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,565

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    Yikes... I didn't have to go to those lengths... here's my UX and PageLayout components. Be interesting to find out if they run for you.

    GoogleCharts_PageLayout.PNG
    Attached Files Attached Files

  7. #7
    Member
    Real Name
    Richard
    Join Date
    Mar 2012
    Posts
    350

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    Thanks David,

    I added those components to a new project and the pagelayout renders as it should. However I thought I'd try something... I duplicated the UX and added that to the pagelayout so there are now 2 UX components on it... and it won't render.AAcharts.PNG

    I wonder if the same happens for you?

    The other difference between your sample and my original issue is that I'm retrieving the data from a database as per Selwyn's videos. Again each UX works fine, I just can't get them to work together on a pagelayout or as embeeded components on another UX.

    P.S. I'd zip it up for you but it would mean cleaning out the database as it contains confidential patient data.

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,565

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    Results are all over the map. No errors... but sometimes the second chart of the 1st UX is displayed... sometimes not... although it is rendered.

    I think the Page Layout Component is just old and out of date... not really compatible with the rest of Alpha.

    The database data shouldn't really matter... although then it's a matter of refreshing the charts when data is passed from the callback... it would become a matter of timing.

    You should report this to Alpha.

  9. #9
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,548

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    Are you sending the result of the Google Chart to it's own div. I push the data in to the chart from a list, into it's own div, and have no issues.
    2017-12-15_1732.png
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

  10. #10
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,502

    Default Re: Can't load multiple googles charts on page layout or embedded in ux

    I believe this might be related to the property Google Visualization Libraries where you declare the libray (corechart table etc) When I first built a dashboard using a page layout I have multiple charts in separate ux components and it worked perfectly. After an AA version update it stopped working as the process changed so that once the library for the first ux component was loaded the page layout stopped looking for any other libraries declared in the other ux components. From memory Selwyn suggested loading all needed libraries in each component.

    Glen
    Glen Schild



    My Blog


Similar Threads

  1. Multiple Google Charts on a page layout issue
    By glenschild in forum Mobile & Browser Applications
    Replies: 8
    Last Post: 12-12-2017, 08:59 PM
  2. How to manage multiple radio button "groups" in Page Layout component?
    By fsi in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 08-05-2014, 11:26 AM
  3. Multiple Column Charts
    By David Boomer in forum Alpha Five Version 11 - Desktop Applications
    Replies: 0
    Last Post: 04-17-2013, 06:09 PM
  4. How can I submit multiple grids using a button on a page layout
    By cor_dav in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 12-13-2012, 03:11 PM
  5. V11 Charts and Multiple Columns
    By Imaac in forum Alpha Five Version 11 - Desktop Applications
    Replies: 0
    Last Post: 11-29-2011, 11:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •