1

I'm using CFCHART to generate awesome charts on the fly. It would be nice to dynamically change the title of the chart based on selection criteria.... and I've been attempting to do that by setting a string, graphTitle, that conditionally populates based on selections. All I want to do is simply start a new line for each criterion.

For instance: Suppose I have a chart that has a large number of selection criteria in it. I would want the chart title to look like this: (Break, of course, indicates the end of a line)

Fiscal Year 2006 to projected 2013 (Break)
Hires of African American Heritage candidates (Break)
Whom are Female
From New Mexico, California, Texas and Colorado (Break)
With an Age of 29+ (Break)
With a breakdown of Degree Achievement:

I tried using the <SPAN> and <BR /> tags in the title. With no luck. Any other ideas?

4

1 に答える 1

1

If you mean you want to add line breaks into the chart title so it "wraps" you might try adding ascii coded line breaks like so...

<Csfet linefeed = chr(10) & chr(13)/> 

Then your variable would be

<cfset mytitle = "fiscal year 2006 to projected 2012 #linefeed# Hires of..."/>

And so on - you get the idea. Note: you might need "just" chr(10) or you might need both. you'll need to experiment. I don't "know" that this will work. If it were me and I wanted something that complex to decorate the chart I think I would draw a plain "undecorated" chart with only x and y axis labels present and then set up my title outside the chart using HTML. I would have better control that way.

Anyway if that doesn't work try fiddling with the "style" attribute. You can provide an XML () var with all sorts of options - but it is not well documented I'm afraid. Ray has some stuff on his blog regarding this.

于 2012-04-26T17:33:49.733 に答える