Don,
I should have done the SQL option since it's real easy.

I have installed FusionCharts into my /www folder, so my directory structure is like -

=>www
=>FusionCharts
=>Charts
=>Contents
=>JSClass

The (entry) macro just has a starting link.
The (graph) macro is essentially a cut and paste of the Fusion column3D.html demo example with the relative urls changed to absolute.
The nice thing is that you no longer have to create a stream file containing the xml data for the url "Data/Column3D.xml" to pick up.
Instead of a static url like "Data/Column3D.xml" you simply specify the name of the macro containing your SQL, in this case "get_xml".
The (get_xml) macro could not be an easier. No stream file, just dynamically return the necessary lines of xml.
You just need to create a DB2400 table with the columns PERIOD,AMOUNT and COLOR and populate it with a row for each month (PERIOD) of the year.

Here's the source member -

%html(entry) { <h3>Existing Macro<h3/>
<p><a href="graph">3D Graph</a>
%}

%html(graph) {
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FusionCharts Free Documentation</title>
<link rel="stylesheet" href="/www/FusionCharts/Contents/Style.css" type="text/css" />
<script language="JavaScript" src="/www/FusionCharts/JSClass/FusionCharts.js"></script>
</head>
<body>
<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td valign="top" class="text" align="center">
<div id="chartdiv" align="center">FusionCharts. </div>
<script type="text/javascript">
var chart = new FusionCharts("/www/FusionCharts/Charts/FCF_Column3D.swf", "ChartId", "600", "350");
chart.setDataURL("get_xml")
chart.render("chartdiv");
</script>
</td>
</tr>
<tr>
<td valign="top" class="text" align="center">
<a href="get_xml" target="_blank"><img src="/www/FusionCharts/Contents/Images/BtnViewXML.gif" border="0" /></a>
</td>
</tr>
</table>

</body>
</html>
%}

%function(dtw_sql) buildXml() {
select * from fusiontst0
%report { <?xml version='1.0' encoding='UTF-8'?>
<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'>
%row { <set name='$(V_PERIOD)' value='$(V_AMOUNT)' color='$(V_COLOR)' /> %}
</graph>
%}
%}

%html(get_xml) { @buildXml() %}

Cheers, Peter

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Don Cavaiani
Sent: Tuesday, 7 December 2010 9:29 a.m.
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Fully seamless job stream

I have the FusionCharts set up correctly to output a graph from data in
an IFS file which is in XML format - named data.xml. What methods can I
use to replace that data on the fly just before graphing takes place -
possibly via an SQL statement in a net.data macro, and then somehow
copied/written BACK OVER the top of the data in the data.xml file ...

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Jim Oberholtzer
Sent: Monday, December 06, 2010 6:00 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Fully seamless job stream

Having read this thread, I'm wondering why no one suggested Query?
WebQuery can produce the exact results your looking for. If you don't
own Query then a PHP, Javascript, or Java solution would work but
require quite a bit of care and feeding over time making the Query look
better.

Jim Oberholtzer
CEO/Chief Technical Architect
Agile Technology Architects, LLC


On 12/5/2010 6:57 PM, Aaron Bartell wrote:
Wouldn't it be best if IBM i solutions were sought out first?

AaronBartell.com
On Dec 5, 2010 3:25 PM, "Maurice O&apos;Prey"<Maurice.Oprey@xxxxxxxxx>
wrote:
Checkout the free Chart Control in .NET 4

-----Original Message-----
From:web400-bounces@xxxxxxxxxxxx
[mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Aaron Bartell
Sent: 05 December 2010 19:34
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Fully seamless job stream

Check out RPG Chart Engine at MowYourLawn.com. It is completely
open source, uses data queues to talk to Java from RPG, and uses
JFree Chart as the chart "engine".


Aaron Bartell
www.MowYourLawn.com/blog
www.OpenRPGUI.com
www.SoftwareSavesLives.com



On Sat, Dec 4, 2010 at 6:11 PM, Don
Cavaiani<dcavaiani@xxxxxxxxxxxxx
wrote:

Jim,

I am looking at downloading JreeChart and using it SOMEWHAT
similar
(directions?) to how I use jscalendar inside the net.data macro
- is that logical?

Don C

-----Original Message-----
From:web400-bounces@xxxxxxxxxxxx
[mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Jim Franz
Sent: Saturday, December 04, 2010 3:38 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Fully seamless job stream

How are you doing your web presentation? php, cgi, websphere...

This thread from 2009 discusses several options
http://archive.midrange.com/web400/200901/msg00154.html
The Excel option is also possible, assuming the web user has
Excel (then you have to worry about various levels of Excel 2003
or 2007 or 2010).
Scott Klement has some published tools (free) to generate excel
with formulas).
jQuery and many other toolkits& plugins are an option (and
mostly
free-)

Jim Franz

----- Original Message -----
From: "Don Cavaiani"<dcavaiani@xxxxxxxxxxxxx>
To:<web400@xxxxxxxxxxxx>
Sent: Saturday, December 04, 2010 11:03 AM
Subject: [WEB400] Fully seamless job stream


> Is this possible:
>
> IBM i job stream which calculates supplier delivery
performance
'on-time
> %' statistics for past 12 months - a data file which I have
already > created, and then have that calculated 12 month data

auto transferred
to
> an Excel spreadsheet which shows a month by month line graph

(which > would be accessed by a Web Page click - which I know
how to do).
>
> Some other way easier?
> --
> This is the Web Enabling the AS400 / iSeries (WEB400)
mailing list > To post a message email:WEB400@xxxxxxxxxxxx >

To subscribe, unsubscribe, or change list options, >
visit:http://lists.midrange.com/mailman/listinfo/web400
> or email:WEB400-request@xxxxxxxxxxxx > Before posting,
please take a moment to review the archives >
athttp://archive.midrange.com/web400.
>
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To
post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.