This project is read-only.

FoxCharts: tweaking SideLegend...

Topics: Enhancement Request
Dec 17, 2009 at 3:58 PM

is there a way to have the SideLegend 'wrap' to multiple lines ? 




Dec 18, 2009 at 12:55 AM

Yes, you can.

Just add to your legend text a CHR(13) + CHR(10) to skip one line.

Try the following:

.Fields(1).Legend = "Line1" + CHR(13) + CHR(10) + "Line2"

Make sure to be using Horizontal side legends, otherwise the text may be drawn over the next line of legend

Hope this helps !

Dec 18, 2009 at 5:13 PM
Thank you!

I'm deriving the 'SideLegend' values on my piecharts by setting the
.FieldLegend to a column name of the cursor I present to Foxcharts. I
just did some STRTRAN() to insert the CRLFs in the col w/in my SQL...
and it works great... on the Sidelegends . Awesome.

2 related questions, if I may:

1) I've set .SideLegend.Rotation to 31, and .RotationCenter to 12... and
with your CRLF tip... the long-descriptions that were previously
plaguing the screen real-estate issues posed by a few 'dashboards' I'm
working on my have been resolved. YAY. However... I would like to be
able to still 'squeeze' the SideLegend entries together a bit more...
there is more inter-space now that they 'wrap'. Is there a way to
control this SideLegend 'horizontal inter-space'?

2) On some of my dashboards, it would be really great to be able to put
the legend-descriptions in the Shapes instead their values or pcts. I
cant find a way to make this happen, e.g., on pie charts... is there?

Much obliged. FoxCharts rox.
Dec 18, 2009 at 7:52 PM

For your second point, about being able to put legend expressions in shapes .... see the description for ShapeLegendExpression in the Help file.  There are a number of properties available to you at that time, including more than you can probably imagine needing.

What you may in fact want to do is to add a method (call it something like GetShapeLegend) to your chart, and then set property  

            This.ShapeLegendExpression = 'This.GetShapeLegend()'

That way it's easier to write and modify the expression.

(I have my own subclass of the main FoxCharts class in which I've changed the values of a few of the properties and added a few methods, such as the one mentioned here.)

Jim Nelson