Your chart is set up with these properties:
Names: Availability,Performance,Quality,OEE
Values: avail,perf,qual,oee
Looks like you typed the widget ids into the 'values' property, but that's not what's expected. The 'values' property needs to contain the values that should be shown in the chart, so it's expecting numbers here. There are many ways to specify these numbers:
Simple ways:
a) You can use a 'bound' field, in which case your RPG program would put the numbers into the field, separated by commas.
b) You can use the section titled 'database-driven chart' to load the chart data directly from a database, similar to the way you are doing your dropdowns
Not as simple, but more similar to what you seem to be trying to do here:
c) You can use JavaScrpt to set these. In which case, you'd use "script:" and write code in JavaScript to load them.
More complex ways:
d) You can use the "chart XML" property, which is more complicated but gives more flexibilty.
e) similar to (c), you can use the chart json property.
f) You can use 'chart URL' to load data from a web service
So there are several solutions here, depending on what you want to do. I think probably the best choice based on what you've shown me is to use a bound field in your RPG. So in the RPG program do something like this:
Code: Select all
myField = %char(s1avrate)+','+%char(s1prfrate)+','+%char(s1qualrate)+','+%char(s1oeerate);
In the display file, bind the 'values' property to myField, and define it as character, and large enough for all the data to fit (maybe 100?) Then it should work.
Or if you really want to get it from other fields already on your display instead of binding (like you'd do in a 5250 display in Genie) you could do it with JavaScript by changing your values property to this:
Code: Select all
script: get("avail") + "," + get("perf") + "," + get("qual") + "," + get("oee")
Good luck