Focal Point
[CLOSED] Upgrading from 8.1 to 8.2 -- Two Graphs on one html page clash

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4157067196

October 03, 2019, 02:46 PM
John_Edwards
[CLOSED] Upgrading from 8.1 to 8.2 -- Two Graphs on one html page clash
I'm taking tried-and-true code from 8.1 and moving to 8.2. I'm getting a curious effect on an html page that combines two reports and two graphs, with code like this --

<table align='center'>

  <tr><td align='center'>
    !IBI.FIL.THE_SUMMARY_TABLE ;
    <br>
    <br>
    <br>
  </td></tr>

  <tr><td width='90%'>
    !IBI.FIL.THE_GRAPH ;
  </td>
  <td width=20px /></tr>

  <tr><td align='center'>
    <br>
    <br>
    <br>
    <br>
    <br>
    !IBI.FIL.THE_TABLE ;
  </td></tr>

  <tr><td align='center'>
    <br>
    <br>
    <br>
    <br>
    <br>
    !IBI.FIL.PIE_GRPH ;
  </td></tr>

</table>


The two tables work fine and appear every single time.

The first graph, THE_GRAPH, generally does not show up but shows up occasionally. That is, the first graph only shows a heading line, not the associated graph underneath it. No errors are presented in the output.

The second graph, PIE_GRPH, shows up every time.

When I remove the second graph, the first works like a clock. So somehow the two hold files are clashing with each other.

The graphs are jscharts, generated like this --
ON GRAPH HOLD FORMAT JSCHART AS THE_GRAPH  

ON GRAPH HOLD FORMAT JSCHART AS PIE_GRPH  


8.2 seems to have an issue with this, or perhaps there's an odd setting on the new server that I'm overlooking?

Anyone bump into something like this in the past?

This message has been edited. Last edited by: FP Mod Chuck,



October 03, 2019, 05:10 PM
Waz
Are the Charts JSCHART ?

Have you checked for JS errors ?

Are the charts the same name ?

Can you repro with sample files ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 04, 2019, 09:14 AM
John_Edwards
1. Yes.
2. Yes.
3. No.
4. Probably.

After I opened this thread I found a similar one with a different set of search terms. They were in the same situation I was, a conversion up to 8.2 I get the feeling 8.2 doesn't like two js charts on the same page.

I get a couple of Javascript errors that I get on all pages, not just this one about duplicate tags. So I don't think those are related to this particular issue.

I may need to embed in an iframe. This is an upgrade and I'd very much like to not change the appearance as it always raises questions with the people that wear ties around here. Upgrades always end up costing a lot of money in lost productivity.



October 04, 2019, 09:57 AM
John_Edwards
Yeah, I got a deadline, so I iframed it. That puts two (or multiple) jscharts into different chunks of source code and everyone plays nice at that point. The nitty-gritties --

<script>

 function loadPage()
    {
     var getRandomNumber = Math.random();
     var cmd = "/ibi_apps/WFServlet?IBI_app=realid&" + "IBIF_ex=graph_non_compliants_corrected_by_categories.fex"
             + "&" + "random=" + getRandomNumber;
     document.getElementById('pie').src = cmd;
     document.getElementById('pie').style.height='450px';
     document.getElementById('pie').style.width='620px'
    }

</script>

<body onload="javascript: loadPage();">
 .
 .
 .
<iframe id='pie' scrolling="no" frameBorder="0" style="background-color:#FFFFFF; border-width:0px; left:0px; top:0px; z-index:0;"></iframe>


Fifty says I have this problem in five years, completely forget that I've run into it before and search for this same thing. John, you're welcome.



October 04, 2019, 10:13 AM
Tom Flynn
Did you try with this syntax:

ON GRAPH HOLD AS THE_GRAPH FORMAT JSCHART
ON GRAPH HOLD AS PIE_GRPH FORMAT JSCHART


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 04, 2019, 10:39 AM
John_Edwards
Yes. Made no difference.

Everything I'm looking at indicates that this is an issue with displaying them on the page, not their generation in the FOCUS code.

This message has been edited. Last edited by: John_Edwards,



October 07, 2019, 03:54 PM
Waz
Hi John,

Can you send me the HTML generated ?

I'd like to analyse it


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!