Archive for February, 2009

ColdFusion 8 documentation is now running under Community Help

Hi everyone,
As most of you know, I also manage the ColdFusion documentation and I’m happy to announce that, as of this morning, the ColdFusion 8 HTML-format content (aka LiveDocs) now uses the Community Help commenting system. We first rolled out community help as a pilot project for Flex and then deployed it for all of the CS4 products last fall.

What does this mean?

  • The content under uses a different commenting system. (The original code name for the project was Ion, so you’ll sometimes hear people refer to this as “Ion commenting.”)
  • One difference: Comments display by default and inappropriate comments are moderated out. In the old system, comments were hidden by default and appropriate comments were moderated in.
  • Community Help is more than updated commenting:
    • You will also notice an enhanced ColdFusion Support page, now renamed to Help and Support.
    • When you search, we now use Community Search, which is a custom system than pulls in results from a predefined list of all the best ColdFusion resource inside and outside of Adobe. This is a process of continuous improvement, so if you see that we’re missing a site, just let me know (ranielse [at] adobe [dot] com).
    • Moderators include Adobe employees and external ColdFusion developers. As the system grows, I’m sure that we’ll be inviting more of you to be moderators.
    • We now assign points to helpful comments. Depending on whether you point out a typo or post a 100-line code example, we’ll asign you anywhere from 5 – 50 points. We haven’t quite figured out what to do with the points, but at some point, we’ll ask high-point achievers to join the moderators (and we’ll probably send out swag or something).
  • We don’t have a migration utility, so it’ll be at least a week before I’ve copied existing CF8 comments to the new system. Please be patient.

As always, comments are _not_ for ongoing, threaded Q&A, such as conversations about troubleshooting issues. In most cases, we’ll let these conversations stand, but in general, you’ll get better and faster results in the user-to-user forums.

For more information:

And, finally, there is currently a IE 6 bug in which a Server Communications error displays for pages that have no comments. I’m told that this will be fixed in the next iteration.

Randy Nielsen

Changing chart series color at run time with a ColorPicker

A recent thread in the Flex support forums resulted in a couple of new charting examples. Specifically, a user was trying to use a ColorPicker component to change the color of a series in a chart at run time. Turns out, it was a little tricky, so I figured I should share the examples.

The first example shows a LineChart. You can click on an item in the chart, which brings up a ColorPicker. You select a color and Flex applies that color to the selected series.

The meat of the example is in the itemClick handler. This is where you get a reference to the LineSeries by accessing the LineSeriesItem’s element property. Here’s the code:

private function selectItemHandler(e:ChartItemEvent):void {
var hitData:HitData = e.hitData;
csi = LineSeriesItem(hitData.chartItem);
el = ChartElement(csi.element);

cp = new ColorPicker();
cp.addEventListener(ColorPickerEvent.CHANGE, changeItemColor);
cp.x = e.localX;
cp.y = e.localY;;

The changeItemColor() method is pretty straightforward. For a LineChart’s series, you define a new Stroke and then apply that Stroke to the series’ lineStroke style. You then remove the ColorPicker from the display list so it doesn’t pollute the chart’s appearance. Here’s the code for that:

private function changeItemColor(e:ColorPickerEvent):void {
var s1:Stroke = new Stroke(cp.selectedColor, 4, 1);
el.setStyle("lineStroke", s1);

Here’s a running example:

To change the color of a series like a ColumnSeries or a BarSeries, you have to apply the style a little bit differently. In this case, you define a SolidColor and then apply that to the series’ fill property.

var c:SolidColor = new SolidColor(cp.selectedColor);
el.setStyle("fill", c);

Here’s the running example:

The final example is a little different in that it applies the color to a single item in the series and not the entire series. I thought it was interesting, so I figure I’d share it.

Instead of applying a style to the series, you set the fill property on the ColumnSeriesItem:

var c:SolidColor = new SolidColor(cp.selectedColor);
csi.fill = c;

In addition, to get it to work requires a little workaround: You have to trigger a call to the series’ updateDisplayList(). To do that, you just set a property on the itemRenderer, like this:

csi.itemRenderer.height = csi.itemRenderer.height;

Here’s the running example:

Here is a ZIP file of the 3 running examples and the source code:
Download file (985KB)

You might notice that these examples also use the live data that I blogged about recently.