Focal Point
[CLOSED] Multiple JSCHARTS in one HTMLFORM

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

July 25, 2018, 02:52 PM
mlhapner
[CLOSED] Multiple JSCHARTS in one HTMLFORM
Since our migration to 8201M from 8104, we have be unable to display multiple JSCHARTS in an HTMLFORM. It seems to be only displaying the last !IBI.FIL.; in the HTMLFORM. Here is my code:

  
GRAPH FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS COUNTRY FORMAT JSCHART
ON GRAPH SET HAXIS 200.0
ON GRAPH SET VAXIS 400.0
ON GRAPH SET LOOKGRAPH BAR
END
-RUN

GRAPH FILE CAR
SUM SALES
BY CAR
ON TABLE HOLD AS CAR FORMAT JSCHART
ON GRAPH SET HAXIS 200.0
ON GRAPH SET VAXIS 400.0
ON GRAPH SET LOOKGRAPH BAR
END
-RUN

-HTMLFORM BEGIN
<table>
	<tr>
		<td width="50%">
			!IBI.FIL.COUNTRY;
		</td>
		<td width="50%">
			!IBI.FIL.CAR;
		</td>
	</tr>
</table>
-HTMLFORM END


The output only shows the !IBI.FIL.CAR bar graph. I've tested in both IE and Chrome.

Any ideas?

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


WebFOCUS 8.201m
Windows, All Outputs
July 25, 2018, 03:06 PM
BabakNYC
I'm getting the same behavior. I found this example in Focal Point:
  
EMBED BEGIN PCHOLD FORMAT HTML
EMBED COMPONENT AS COUNTRY
GRAPH FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS COUNTRY FORMAT JSCHART
ON GRAPH SET HAXIS 200.0
ON GRAPH SET VAXIS 400.0
ON GRAPH SET LOOKGRAPH BAR
END

EMBED COMPONENT AS CAR

GRAPH FILE CAR
SUM SALES
BY CAR
ON TABLE HOLD AS CAR FORMAT JSCHART
ON GRAPH SET HAXIS 200.0
ON GRAPH SET VAXIS 400.0
ON GRAPH SET LOOKGRAPH BAR
END
EMBED MAIN

TABLE FILE CAR
"Two graphs in the heading of a report:"
"COUNTRY<+0>CAR"
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE HOLD FORMAT HTML
ON TABLE SET STYLE *
type=heading, headalign=internal, $
type=heading, line=2, item=1, embed=COUNTRY, $
type=heading, line=2, item=2, embed=CAR, $
END

EMBED END


However, if your issue is upward compatibility, you might have to reach out to IB tech support to see why it's stopped working. If you do, could you let us know what they say?


WebFOCUS 8206, Unix, Windows
July 25, 2018, 03:51 PM
mlhapner
Thanks BabakNYC,

I was able to get that to work, but I went ahead and started a case with IBI anyways to see if we can get the old (correct) way of doing it to work again. I will update you with information when it comes my way.

Matt


WebFOCUS 8.201m
Windows, All Outputs
July 25, 2018, 05:16 PM
Waz
Did you check developer tools on the browser for issues like js errors, or html layout issues ?


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!

July 25, 2018, 05:19 PM
Waz
Interesting, I tried your code and it worked.

I'm on 8.1.04, perhaps there is a difference in 8.2.01


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!