first chart

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

first chart

Post by ppbedz »

I am trying to learn how to do a chart. I dragged a 2dcolumn widget to my screen. I added 4 fields to the screen and am trying to load the chart using the values from the 4 fields by referencing the element id per the documentation. When I display the chart, it does not contain any values. The only way I can get data into the chart is to physically key the numbers into the "values" definition. Please advise. Thank you, Patti
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: first chart

Post by Scott Klement »

You're getting chart data from elements on the screen? I've seen people do this in Genie, but I haven't run into someone doing it in a Rich Display. Still, it should work. Can you post your display file so we can see what you're doing?
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: first chart

Post by ppbedz »

Hi Scott,

I've enclosed the display file. As I said, I'm doing charts for the first time, so it was just something simple to see if I could get it to work.
Thanks, Patti
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: first chart

Post by Scott Klement »

Patti, as far as I'm concerned... simpler is better :-) At least, it makes my job easier!

I don't see the code posted here. Did you forget an attachment?
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: first chart

Post by ppbedz »

Hmm... I thought I added it. How about now?
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: first chart

Post by ppbedz »

Scott,

I am adding the attachments using the attachment tab like I usually do, but they don't seem to be saving with my post? I just posted another question and the attachment is not with that one either. I'm not sure why they are not saving with my post. If you want to provide an email, I can email them instead... Patti
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: first chart

Post by Scott Klement »

You can e-mail support@profoundlogic.com -- just mention that it's related to this forum thread.

I'll see if I can figure out the attachment issue.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: first chart

Post by Scott Klement »

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
ppbedz
Experienced User
Posts: 147
Joined: Tue Jun 17, 2014 4:00 pm
First Name: Patti
Last Name: Bednarz
Company Name: McGard
State / Province: New York
Country: United States
Contact:

Re: first chart

Post by ppbedz »

I'll try to use the bound field option. I am actually building a grid with performance measures. I want the user to be able to request a chart representation of whatever is in the grid. The values in the grid are mainly calculated and will changed based on what the user selects from various drop-downs (the other issue you were helping me with). Thank you for your time. Patti
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests