craigbowman Posted February 1, 2002 Posted February 1, 2002 Creating variable length graph bars: Using <img scr = "xyzpixel.gif" width="abc"> where abc = a field value calculated by a constant. The thing is that I do not want the field value to change but only to be calculated and substituted for the img width. Maybe something like [FMP-Field: efg] * 100 within the format file. Any other suggestions on how to do this would be great.
dspires Posted February 1, 2002 Posted February 1, 2002 This doesn't directly answer your question, but should take care of your issue, if I understand what you want to accomplish: http://developer.netscape.com:80/docs/technote/javascript/graph/index.html This is the portion of my code that I use with the javascript graphing file to insert the FMP data (result of a query): var g = new Graph(600,400); g.addRow(0[FMP-record],[FMP-field: GraphElapsed][/FMP-record]); g.scale = 10; g.title = "Processing Time"; g.xLabel = "Calls"; g.yLabel = "Time Min"; g.build();
craigbowman Posted February 1, 2002 Author Posted February 1, 2002 OK, this graph builder looks great for the long run - something I will probably use a lot. Does it only work on Netscape? Ever time the page loaded in Explorer it locked up! I am still looking for an answer to this problem using CDML if anyone can help.
Vaughan Posted February 3, 2002 Posted February 3, 2002 It'd create a calc field in the database that works out the maths for the width value. The code in the format file could be: <img scr = "xyzpixel.gif" width="[FMP-Field: widthcalc]">
craigbowman Posted February 3, 2002 Author Posted February 3, 2002 Thanks Vaughn. That worked great. The problem now is that I have probably about a hundred fields that need to be calculated with the orginal value fields staying the same. How do I get around making a hundred other fields just to calculate the orginal values of each field?
Vaughan Posted February 4, 2002 Posted February 4, 2002 Errr, I dunno. Do you have a hundred fields to calculate, or a hundred *records*? I assume you meand records: the solution I posted only used one calculation field. You originally wrote "abc = a field value calculated by a constant." How complicated it is depends partly on how complicated you want to make it. You should try hard to make it easy, but if each image is different from all others then it's going to be a lot of work. That's why I suggested using the calculatin field: you can enter in an algorithm and let it do the maths. But if ther are all different there is only one way to do it: a record at a time.
Recommended Posts
This topic is 8398 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now