February 1, 200224 yr 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.
February 1, 200224 yr 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();
February 1, 200224 yr Author 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.
February 3, 200224 yr 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]">
February 3, 200224 yr Author 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?
February 4, 200224 yr 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.
Create an account or sign in to comment