Many folks would suggest that you render the graphic in a web viewer: build the HTML for the image you want in a calculation, and load that in a web viewer. If you're not comfortable with HTML, another approach is to put a repeating field on the layout and use conditional formatting to change the color of different repetitions.
I have done this type of thing by stacking 2 charts of the same info, with the green one on top of the read one. The green chart would be set to show only up to max value of 96, while the red behind it would show up to 100. When the charts pass 96, the read will appear in the remaining area.
Thanks, the reating field sounds like my type of approach .. the only thing is how do i get the entire are filled especially in the dimensions i quoted earlier ..?
Thanks Stephen, Havent thought of this approach though. Makes sense .. I will give it a try.. thanks..Art
Is there a way to say eg. colour or RGB the rectangle with a 96% green and the remaining 4% of the remaining area = red?
No, but you could use a calculation field with a Text result, e.g.:
formatted in Webdings font.
Haven't noticed Jeremy's suggestion of repeating field: that would work well, too.
Message was edited by: Michael Horak
Just one thing ...
I actually wanted to program and settle for an exact position as employing a graph (which also makes sense .. but not for my situation) will take up extra space on my layout .. You see it forms part of a dashboard screen and I've allocated certain areas of my layout for certain 'displays'. I can 'colour' the whole rectangle red and just 'overlay' the green bar - the only thing is just how do i specify the co-ordinates or size of the area to dislay green?
the webdings 'thing' could work but my vertical dimensions should be ideally about 2cm high and thats my problem ..
You can set a abuilt-in FM chart to display the color scheme of your choice, and set its labels to 1pt and its background to transparent. This will cause it to have fairly small border areas, and it can overlay other stuff on the layout without being in the way of them if they are packed that tight.
I'd put two conditional formatting calculations on the repeating field. The first one would format each repetition red when "not IsEmpty ( $$PROGRESS )", where $$PROGRESS contains the proportion of the chart you want to be green, .96 for your example. This is so you can turn the bar "off" by leaving or setting $$PROGRESS to null. The second one would format each repetition green when "Get ( CalculationRepetitionNumber ) / <repetitionCount> ≥ $$PROGRESS", where <repetitionCount> is how many repetitions are being displayed. This will override the red from the first conditional format.
Charts are a good quick way to accomplish this sort of thing, but the repeating field gives you more control over exactly where on the layout the bar with display. Even when you turn off all the "chrome" in the chart formatting that you can, there's still space between the chart object borders and the charted bar itself that we aren't in control of, so it can take some trial-and-error to position it exactly where you want it.
Thanks guys, i like jbante's approach. will note it and keep it in mind. however michael's suggestion just gave an idea to use the a simple font formatting technique eg. using the 'shift' & 'back-slash' key for the vertical bar and font-size it it to lets say 72 and use it in my formula..
Thanks guys. appreciated
I (before charts) used 100 instances of the "|" (pipe character) in a field (sometimes overlaying the same field 2-3 times and offset a px to "fill" the bar). Then you can calculate the color of the text to the length needed for both colors. This works for multiple colors, as well.
It's quick and dirty way to "bar chart", especially if you need multiple lines (bars).
Beverly, thanks. I like it. It's simple and no real fuss to program! However, how do you 'pack' these "|" characters tightly together so that there's no visible 'spaces' between them...? I tried it but when you change to a bigger, bolder font - you can never get rid of the spaces between the pipe characters! The idea is to get an even and solid bar - not a bar with 'gaps' ? In other words, when I pack these '||||||||||" together I want to see a solid bar ...? something like the actual bars on the BAR CHART of FMP?
That's why I overlay several copies of the field. Nudge each field enough to make it appear to be together.
If you have trouble, I'll make a demo file.
-- sent from my iPhone4 --
Message was edited by: Beverly Voth; added graphic
simple_bar.jpg 27.7 K
Very clear and i understand fully ...
Thanks a million, especially for taking time on a week-end.
Bev for President ..?