<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JavaFX News, Demos and Insight // FX Experience &#187; Charts</title>
	<atom:link href="http://fxexperience.com/category/charts/feed/" rel="self" type="application/rss+xml" />
	<link>http://fxexperience.com</link>
	<description>Sharing the Experience of JavaFX</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:47:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Curve fitting and styling AreaChart</title>
		<link>http://fxexperience.com/2012/01/curve-fitting-and-styling-areachart/</link>
		<comments>http://fxexperience.com/2012/01/curve-fitting-and-styling-areachart/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 05:50:04 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Charts]]></category>
		<category><![CDATA[Tips n' Tricks]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1623</guid>
		<description><![CDATA[I was experimenting today with extending AreaChart to do curve fitting for some example code I was hacking on. It is also a example of what can be done with styling JavaFX charts with CSS. Here is the result: Curve Fitting I have to admit I did not work out all the Math myself for [...]]]></description>
			<content:encoded><![CDATA[<p>I was experimenting today with extending AreaChart to do curve fitting for some example code I was hacking on. It is also a example of what can be done with styling JavaFX charts with CSS. Here is the result:</p>
<div id="applet-container" style="background-image: url('/applications/CurveFittedChartApplet/screenshot.png'); width: 540px; height: 440px;"></div>
<p><span id="more-1623"></span><br />
<script type="text/javascript" src="/applications/CurveFittedChartApplet/web-files/dtjava.js"></script><br />
<script type="text/javascript">// <![CDATA[
        dtjava.embed(
            {
             	url : '/applications/CurveFittedChartApplet/CurveFittedChartApplet.jnlp',
                placeholder : 'applet-container',
                width : 540,
                height : 440 
            },
            {
             	javafx : '2.0+'
            },
            {}
	);
// ]]&gt;</script></p>
<h3>Curve Fitting</h3>
<p>I have to admit I did not work out all the Math myself for the curve fitting I found a great article on CodeProject <a href="http://www.codeproject.com/Articles/31859/Draw-a-Smooth-Curve-through-a-Set-of-2D-Points-wit">&#8220;Draw a Smooth Curve through a Set of 2D Points with Bezier Primitives&#8221;</a>. Then ported the code to Java from C# and wired it up to our AreaChart. My version is not the most efficient as we do not yet have the correct API hooks to make it easy but we are thinking about how to add them. The current implementation extends AreaChart and overrides the layoutPlotChildren() method. That method creates all the nodes need for the chart and populates the node properties of the Series and Data items. So I can call super to let the standard code do its job then look at the Path elements for the stroked Path and filled Path that make up the AreaChart. I can then replace the LineTo elements with CubicCurveTo with the new control points calculated with the maths from the article. This way everything like auto ranging and animation still works as expected. The only waste is we are creating all the LineTo object and then throwing them away to replace them with CubicCurveTo objects. So here is the code that does this:</p>
<pre class="brush: java; title: ; notranslate">
    /** @inheritDoc */
    @Override protected void layoutPlotChildren() {
        super.layoutPlotChildren();
        for (int seriesIndex=0; seriesIndex &lt; getDataSize(); seriesIndex++) {
            final XYChart.Series&lt;Number, Number&gt; series = getData().get(seriesIndex);
            final Path seriesLine = (Path)((Group)series.getNode()).getChildren().get(1);
            final Path fillPath = (Path)((Group)series.getNode()).getChildren().get(0);
            smooth(seriesLine.getElements(), fillPath.getElements());
        }
    }

    private int getDataSize() {
        final ObservableList&lt;XYChart.Series&lt;Number, Number&gt;&gt; data = getData();
        return (data!=null) ? data.size() : 0;
    }

    private static void smooth(ObservableList&lt;PathElement&gt; strokeElements, ObservableList&lt;PathElement&gt; fillElements) {
        // as we do not have direct access to the data, first recreate the list of all the data points we have
        final Point2D[] dataPoints = new Point2D[strokeElements.size()];
        for (int i = 0; i &lt; strokeElements.size(); i++) {
            final PathElement element = strokeElements.get(i);
            if (element instanceof MoveTo) {
                final MoveTo move = (MoveTo)element;
                dataPoints[i] = new Point2D(move.getX(), move.getY());
            } else if (element instanceof LineTo) {
                final LineTo line = (LineTo)element;
                final double x = line.getX(), y = line.getY();
                dataPoints[i] = new Point2D(x, y);
            }
        }
        // next we need to know the zero Y value
        final double zeroY = ((MoveTo) fillElements.get(0)).getY();

        // now clear and rebuild elements
        strokeElements.clear();
        fillElements.clear();
        Pair&lt;Point2D[], Point2D[]&gt; result = calcCurveControlPoints(dataPoints);
        Point2D[] firstControlPoints = result.getKey();
        Point2D[] secondControlPoints = result.getValue();
        // start both paths
        strokeElements.add(new MoveTo(dataPoints[0].getX(),dataPoints[0].getY()));
        fillElements.add(new MoveTo(dataPoints[0].getX(),zeroY));
        fillElements.add(new LineTo(dataPoints[0].getX(),dataPoints[0].getY()));
        // add curves
        for (int i = 1; i &lt; dataPoints.length; i++) {
            final int ci = i-1;
            strokeElements.add(new CubicCurveTo(
                    firstControlPoints[ci].getX(),firstControlPoints[ci].getY(),
                    secondControlPoints[ci].getX(),secondControlPoints[ci].getY(),
                    dataPoints[i].getX(),dataPoints[i].getY()));
            fillElements.add(new CubicCurveTo(
                    firstControlPoints[ci].getX(),firstControlPoints[ci].getY(),
                    secondControlPoints[ci].getX(),secondControlPoints[ci].getY(),
                    dataPoints[i].getX(),dataPoints[i].getY()));
        }
        // end the paths
        fillElements.add(new LineTo(dataPoints[dataPoints.length-1].getX(),zeroY));
        fillElements.add(new ClosePath());
    }
</pre>
<h3>CSS Styling</h3>
<p>This is just the standard AreaChart in terms of the nodes its drawing with. The first part of the CSS is styling the main chart node and its background. We are using a dark gray texture as the background, adding a 1px black border and a drop shadow. Also adjusting the padding a little.</p>
<pre class="brush: css; title: ; notranslate">
.chart {
    -fx-background-image: url(&quot;background.png&quot;);
    -fx-padding: 15 25 15 15;
    -fx-border-color: black;
    -fx-effect: dropshadow( gaussian , rgba(0,0,0,0.8) , 10, 0.0 , 0 , 2 );
}
</pre>
<p>Next we are looking at the background of the plot area, this is the rectangular area bordered by the two axis. We are using two background images here one a colored glow and the second is transparent white gridlines. The first image is sized to &#8220;cover&#8221; the whole area of the plot background and the second is tiled to fill. We also add black borders to the top and right to complete a box around the plot area including the two axis lines.</p>
<pre class="brush: css; title: ; notranslate">
.chart-plot-background {
    -fx-background-image: url(&quot;chart-background.png&quot;), url(&quot;graph-gridlines.png&quot;);
    -fx-background-size: cover, auto;
    -fx-background-repeat: no-repeat, repeat;
    -fx-background-position: 0% 0%, 0% 100%;
    -fx-border-color: black black transparent transparent;
}
</pre>
<p>The line that connects the data points we are styling to be 2px wide and white.</p>
<pre class="brush: css; title: ; notranslate">
.chart-series-area-line {
    -fx-stroke: white;
    -fx-stroke-width: 2px;
}
</pre>
<p>The filled area under the line we are styling with a linear gradient from white on the left to 100% transparent white on the right. We also use a blend mode to get the desired effect when blending with the colored background of the plot area.</p>
<pre class="brush: css; title: ; notranslate">
.chart-series-area-fill {
    -fx-fill: linear-gradient(to right, white, rgba(255,255,255,0));
    -fx-blend-mode: OVERLAY;
}
</pre>
<p>Making the plot symbols for each data point white.</p>
<pre class="brush: css; title: ; notranslate">
.chart-area-symbol {
    -fx-background-color: white;
}
</pre>
<p>Hiding the tick marks and changing the color of the axis lines to black</p>
<pre class="brush: css; title: ; notranslate">
.axis {
    -fx-tick-mark-visible: false;
    -fx-minor-tick-visible: false;
    -fx-tick-length: 3;
    -fx-minor-tick-length: 0;
    -fx-border-color: transparent;
}
.axis:bottom {
    -fx-border-color: black transparent transparent transparent;
}
.axis:left {
    -fx-border-color: transparent black transparent transparent;
}
</pre>
<p>Styling the text labels on the axis so they are white with black shadow and a little larger than default.</p>
<pre class="brush: css; title: ; notranslate">
.axis Text{
    -fx-fill: white;
}
.tick-mark {
    -fx-font-size: 10px;
    -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.8) , 0, 0.0 , 0 , 1 );
}
</pre>
<p>There you go that is all you need to take one of our standard charts and make it look completely different. Hopefully this will inspire some of you to try some exciting designs with JavaFX charts.</p>
<h3>Source Code</h3>
<p>The full Netbeans project and code including the maths is available here (<a href="http://fxexperience.com/applications/CurveFittedChartApplet/CurveFittedChart.zip">CurveFittedChart.zip</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2012/01/curve-fitting-and-styling-areachart/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>JavaFX 2.0 Charts</title>
		<link>http://fxexperience.com/2011/05/javafx-2-0-charts/</link>
		<comments>http://fxexperience.com/2011/05/javafx-2-0-charts/#comments</comments>
		<pubDate>Sat, 28 May 2011 16:00:11 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Charts]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=1128</guid>
		<description><![CDATA[We did a complete rewrite of charts in JavaFX 2.0 to add cool features like: Dynamic Data Support Animation Auto Ranging CSS Styling There is a sample application called &#8220;Chart Sampler&#8221; that ships with JavaFX 2.0 Beta that shows some of what can be done with the new charts. Here are a few screen shots [...]]]></description>
			<content:encoded><![CDATA[<p>We did a complete rewrite of charts in JavaFX 2.0 to add cool features like:</p>
<ul>
<li>Dynamic Data Support</li>
<li>Animation</li>
<li>Auto Ranging</li>
<li>CSS Styling</li>
</ul>
<p>There is a sample application called &#8220;Chart Sampler&#8221; that ships with JavaFX 2.0 Beta that shows some of what can be done with the new charts. Here are a few screen shots to tempt you to go and check it out <img src='http://fxexperience.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<a href="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Bar.png"><img class="aligncenter size-full wp-image-1129" title="Charts - Bar" src="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Bar.png" alt="" width="540" height="401" /></a><br />
<span id="more-1128"></span><br />
<a href="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Pie.png"><img class="aligncenter size-full wp-image-1130" title="Charts - Pie" src="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Pie.png" alt="" width="540" height="401" /></a><br />
<a href="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Scatter.png"><img class="aligncenter size-full wp-image-1131" title="Charts - Scatter" src="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Scatter.png" alt="" width="540" height="401" /></a><br />
<a href="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Audio.png"><img class="aligncenter size-full wp-image-1132" title="Charts Audio" src="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Audio.png" alt="" width="540" height="401" /></a><br />
<a href="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Candle-Stick.png"><img class="aligncenter size-full wp-image-1133" title="Charts - Candle Stick" src="http://fxexperience.com/wp-content/uploads/2011/05/Charts-Candle-Stick.png" alt="" width="540" height="401" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2011/05/javafx-2-0-charts/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Dean Iverson: Creating XYCharts</title>
		<link>http://fxexperience.com/2009/06/dean-iverson-creating-xycharts/</link>
		<comments>http://fxexperience.com/2009/06/dean-iverson-creating-xycharts/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 19:52:48 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Charts]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=96</guid>
		<description><![CDATA[Another excellent article on JavaFX charts this time covering the various types of XYCharts. The remaining five types of charts are all meant to work with XY data. These charts are all subtypes of the XYChart base class&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://pleasingsoftware.blogspot.com/2009/06/creating-xycharts-in-javafx.html"><img class="alignright" src="http://1.bp.blogspot.com/__eCG_vXQUQk/SjH_B3eO9OI/AAAAAAAAAB4/rLkFlIot-ss/s400/lineareachart.png" alt="" width="400" height="179" /></a>Another excellent <a href="http://pleasingsoftware.blogspot.com/2009/06/creating-xycharts-in-javafx.html">article</a> on JavaFX charts this time covering the various types of XYCharts.</p>
<blockquote><p>The remaining five types of charts are all meant to work with XY data. These charts are all subtypes of the XYChart base class&#8230;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/dean-iverson-creating-xycharts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Charts are getting all the Love</title>
		<link>http://fxexperience.com/2009/06/charts-are-getting-all-the-love/</link>
		<comments>http://fxexperience.com/2009/06/charts-are-getting-all-the-love/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 18:54:30 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Charts]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=92</guid>
		<description><![CDATA[Another good blog post was published today by Dean Iverson on JavaFX Charts. The chart components included in JavaFX give developers an easy way to let the users of their applications visualize a wide variety of data. There are six kinds of charts supported in JavaFX 1.2: Creating Charts in JavaFX]]></description>
			<content:encoded><![CDATA[<p><a href="http://pleasingsoftware.blogspot.com/"><img class="alignright" src="http://1.bp.blogspot.com/__eCG_vXQUQk/Si9sAOL7zVI/AAAAAAAAABg/H328tZzrDu8/s400/chartdemo.png" alt="" width="400" height="337" /></a>Another good blog post was published today by Dean Iverson on JavaFX Charts.</p>
<blockquote><p>The chart components included in JavaFX give developers an easy way to let the users of their applications visualize a wide variety of data. There are six kinds of charts supported in JavaFX 1.2:</p></blockquote>
<p><a href="http://pleasingsoftware.blogspot.com/2009/06/this-is-test.html">Creating Charts in JavaFX</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/charts-are-getting-all-the-love/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vaibhav: Charts and RSS</title>
		<link>http://fxexperience.com/2009/06/vaibhav-charts-and-rss/</link>
		<comments>http://fxexperience.com/2009/06/vaibhav-charts-and-rss/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 16:05:57 +0000</pubDate>
		<dc:creator>Richard Bair</dc:creator>
				<category><![CDATA[API Design]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=82</guid>
		<description><![CDATA[Another link I found the other day to a blog posting by Vaibhav Choudhary on using the JavaFX 1.2 Charting APIs. He then followed up with a blog populating a chart from a web service call. The important pieces are the following code blocks. The first here is what generates the Pie Chart data slices [...]]]></description>
			<content:encoded><![CDATA[<p>Another link I found the other day to a blog posting by Vaibhav Choudhary on <a href="http://jfxstudio.wordpress.com/2009/06/05/javafx-1-2-chart-apis/">using the JavaFX 1.2 Charting APIs</a>.<br />
<img src="http://blogs.sun.com/vaibhav/resource/bubblechart.PNG" alt="JavaFX Bubble Chart" /></p>
<p><span id="more-82"></span>He then <a href="http://jfxstudio.wordpress.com/2009/06/08/chart-api-with-del-icio-us-web-service/">followed up with a blog populating a chart from a web service call</a>. The important pieces are the following code blocks. The first here is what generates the Pie Chart data slices after the web service call succeeded:</p>
<pre class="jfx:nogutter">function generateChartData(tg:TagInformation, done:Boolean):PieChart.Data[] {
    for (i in [0..&lt;sizeof tg.tag]) {
        PieChart.Data {
            action: function() {
                showShopping = true;
            }
            label: tg.tag[i]
            value: tg.tagCount[i]
        }
    }
}</pre>
<p>This function <code>generateChartData</code> simply returns a sequence of PieChart.Data instances. &#8220;for loop&#8221; expressions in JavaFX yield a sequence, one item for each iteration of the loop. So the generated sequence will be one PieChart.Data for each result in the tg.tag sequence.</p>
<p>This next block of code uses the <code>HttpRequest</code> class to fetch and parse the RSS feed from Del.icio.us. The only thing here that I might have done differently, is to have used the RSS APIs introduced in JavaFX 1.2 rather than hand rolling my own parsing code and using HttpRequest. First the code from the blog doing it the &#8220;long&#8221; way:</p>
<pre class="jfx:nogutter">public class TagInformation {
    public var tag: String[]=[];
    public var tagCount: Integer[]=[];
    public var username: String = "javafx";  // for this sample it's javafx
    public-read var done = false;
    var url = bind "http://feeds.delicious.com/v2/rss/tags/{username}?count=4";
    var p: PullParser;
    var h: HttpRequest;
    init {
            h = HttpRequest {
                location: url
                onException: function(exception: Exception) {
                    exception.printStackTrace();
                }
                onInput: function(input) {
                    p = PullParser {
                        input: input
                        onEvent: function(event) {
                            if ((event.type == PullParser.END_ELEMENT)) {
                                if (event.qname.name == "title" and
                                    event.level == 3) {
                                   insert event.text into tag;
                                }
                                if(event.qname.name == "description" and
                                    event.level == 3){
                                   insert Integer.parseInt(event.text)
                                   into tagCount;
                                }
                            }
                        }
                    };
                    p.parse();
                    p.input.close();
                }
                onDone: function() {
                    Main.showtag = false;
                    done = true;
                }
            };
            h.start();
        }
    }</pre>
<p>And now here is how I would have done it using the JavaFX 1.2 APIs. In JavaFX 1.2 we released some ATOM and RSS support. These classes are in the javafx.data.feed package.</p>
<pre class="jfx:nogutter">public class TagInformation {
    public var tag: String[]=[];
    public var tagCount: Integer[]=[];
    public var username: String = "javafx";  // for this sample it's javafx
    public-read var done = false;
    var url = bind "http://feeds.delicious.com/v2/rss/tags/{username}?count=4";
    init {
		RssTask {
	        location: "http://feeds.delicious.com/v2/rss/tags/javafx?count=4"
	        interval: 1h
	        onItem: function(item) {
	            insert item.title into tag;
	            insert Integer.parseInt(item.description) into tagCount;
	        }
	        onDone: function() { done = true }
	    }.start();
    }
}</pre>
<p>The only thing here that I found somewhat irritating and will get put on the bug list for the next release is that you <em>must</em> specify an interval for the RssTask, even if you won&#8217;t be polling. Expect this to change to some reasonable polling value as the default. Maybe 1 hour (as in this example) isn&#8217;t a bad default. 1 minute is a bit more extreme, but for the feed-junkies out there maybe that&#8217;s a better default.</p>
<p>As you can see, the code is much simpler using the feed APIs. I guess that&#8217;s a good thing <img src='http://fxexperience.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . The RSS/ATOM feed APIs use the same basic programming model as HttpRequest &#8212; both extend from Task. Task&#8217;s have API for monitoring progress, canceling, starting, handling error condition, etc in a unified model. All asynchronous operations in JavaFX should extend from Task either directly or indirectly.</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/vaibhav-charts-and-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Example 3D Pie</title>
		<link>http://fxexperience.com/2009/06/example-3d-pie/</link>
		<comments>http://fxexperience.com/2009/06/example-3d-pie/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 07:18:08 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Charts]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=43</guid>
		<description><![CDATA[Want to know how easy it is to create a 3D pie chart with the new JavaFX 1.2 chart API? All the code you need to create this is: The JavaFX charts API is based on the idea of a &#8220;Visual Model&#8221; so each PieChart.Data represents a single slice of the pie so if you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://fxexperience.com/wp-content/uploads/2009/06/pie3d.png" alt="pie3d" title="pie3d" width="469" height="141" class="aligncenter size-full wp-image-52" />Want to know how easy it is to create a 3D pie chart with the new JavaFX 1.2 chart API?<span id="more-43"></span> All the code you need to create this is:</p>
<pre class="brush: javafx; title: ; notranslate">
import javafx.stage.Stage;
import javafx.stage.Alert;
import javafx.scene.Scene;
import javafx.scene.chart.PieChart;
import javafx.scene.chart.PieChart3D;

Stage {
    scene: Scene {
        height: 400
        width: 500
        content: PieChart3D {
            title: &quot;Sample Pie&quot;
            startAngle: 0
            data: [
                PieChart.Data { label: &quot;Apples&quot; value: 34 },
                PieChart.Data { label: &quot;Oranges&quot; value: 27 },
                PieChart.Data { label: &quot;Bananas&quot; value: 16 },
                PieChart.Data { label: &quot;Grapes&quot; value: 50 },
                PieChart.Data { label: &quot;Cherries&quot; value: 6 },
                PieChart.Data { label: &quot;Strawberries&quot; value: 5 },
                PieChart.Data { label: &quot;Raspberries&quot; value: 7 }
            ]
        }
    }
}
</pre>
<p>The JavaFX charts API is based on the idea of a &#8220;Visual Model&#8221; so each PieChart.Data represents a single slice of the pie so if you would like to add an action to one of the pie slices this can be done like this:</p>
<pre class="brush: javafx; title: ; notranslate">
PieChart.Data {
    label: &quot;Apples&quot;
    value: 34 action:function(){Alert.inform(&quot;Clicked on Apples&quot;)}
}
</pre>
<p>Here is a web start link to try it out for your self <a href="http://fxexperience.com/webstart/piechart3d/PieChart3D.jnlp"><img src="http://fxexperience.com/webstart/launch.jpg" alt="Lanuch Webstart"  style="margin:0px"/><a></p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/example-3d-pie/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Clarke: What&#8217;s new in JavaFX 1.2</title>
		<link>http://fxexperience.com/2009/06/clarke-whats-new-in-javafx-12/</link>
		<comments>http://fxexperience.com/2009/06/clarke-whats-new-in-javafx-12/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 01:18:03 +0000</pubDate>
		<dc:creator>Richard Bair</dc:creator>
				<category><![CDATA[Charts]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[Layout]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=17</guid>
		<description><![CDATA[There&#8217;s a great article over at InformIT by Jim Clarke about what&#8217;s new in JavaFX 1.2. Jim has been involved in JavaFX both contributing to the source and building apps since before I got involved last year. From the article: Once you start using JavaFX, I think you&#8217;ll find that the language is powerful yet [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a great article over at <a href="http://www.informit.com/articles/article.aspx?p=1352545">InformIT</a> by Jim Clarke about what&#8217;s new in JavaFX 1.2. Jim has been involved in JavaFX both contributing to the source and building apps since before I got involved last year.</p>
<p>From the article:</p>
<blockquote><p>Once you start using JavaFX, I think you&#8217;ll find that the language is powerful yet very concise. You&#8217;ll be amazed at the things you can do with very little code. I have only discussed a few of the new JavaFX 1.2 user interface features—there&#8217;s much more to the entire JavaFX platform. I hope that this overview will provide just enough enticement for you to start your own exploration.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/clarke-whats-new-in-javafx-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaFX 1.2 and JavaOne 2009</title>
		<link>http://fxexperience.com/2009/06/javafx-12-and-javaone-2009/</link>
		<comments>http://fxexperience.com/2009/06/javafx-12-and-javaone-2009/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 01:09:34 +0000</pubDate>
		<dc:creator>Richard Bair</dc:creator>
				<category><![CDATA[Charts]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://fxexperience.com/?p=14</guid>
		<description><![CDATA[Jasper and I are back at the hotel working on writing blogs and building the site design and thinking a lot about JavaOne 2009 which has just about come to an end, and about what our direction is going to be for the next year for Controls and JavaFX in general. I think we delivered [...]]]></description>
			<content:encoded><![CDATA[<p>Jasper and I are back at the hotel working on writing blogs and building the site design and thinking a lot about JavaOne 2009 which has just about come to an end, and about what our direction is going to be for the next year for Controls and JavaFX in general.</p>
<p><span id="more-14"></span>I think we delivered more in JavaFX 1.2 on the vision, but we still haven&#8217;t released the complete vision. JavaFX 1.2 was a lot of work, and we got a tremendous amount done, much of which was the hard work of engineering the lower levels of the scene graph and rendering pipelines, paving the way for some hopefully radical improvements in startup, footprint, and rendering speed over the next couple releases.</p>
<p>We also have released our first set of user interface controls and charts libraries which was really exciting. I think we&#8217;ve got a strong foundation upon which to build, and hopefully see a community start to grow around this work and build upon it as well.</p>
<p>Amy Fowler has done some amazing work on the layout engine for FX. When used correctly, the complexity of the code goes down and the performance goes up. We&#8217;re still learning a bit with these APIs as to how to best build apps, and learning some best practices around them. One of my favorites is using Panels.</p>
<p>We&#8217;re going to be blogging about all these things and more.</p>
<p>JavaOne, as usual, has been great for networking and meeting friends from throughout the industry. We had a nice meetup with Hans and Chet (who are at Adobe working on Flex) and my good friend Romain Guy (working on Android) and Ben Galbraith and Dion Almaer (Mozilla) and Joe Nuxoll, Carl Quinn, Dick Wall, and Tor Norbye (the JavaPosse).</p>
<p>It has also been great to get to see members of our team who are not local. I wanted to give a special shout-out to some of the people on our team that don&#8217;t usually &#8220;make the papers&#8221; &#8212; David Grieve who has stepped up and become our CSS guru; Paru Somashekar who has been helping fix all the bugs I put into the platform; and Stuart Marks who&#8217;s feedback on the scenegraph and control APIs has been invaluable.</p>
<p>Now its time for a little rest and relaxation to get ready for the next major push for JavaFX 1.3!</p>
]]></content:encoded>
			<wfw:commentRss>http://fxexperience.com/2009/06/javafx-12-and-javaone-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

