Today, Adobe released the final versions of both the Flex SDK and Flash Builder 4. I have been dabbling with the beta versions for some time now and so I thought this would be a good time than any to note down a couple of things that I found interesting about the two.
Thanks to the few users who acknowledged my last post on the topic of CFChart. I hope it has been (and will continue) useful to even more people. One particular developer, delta_mu, commented on a problem he was having when using the CFChart as explained in my post.
When a user reaches a page with cfcharts in flash format by clicking the browser ‘back’ button, instead of the original flash chart, an image that says “Image expired. Please refresh the page to view the image” is displayed.(Sample image shown below) Very clearly, not desirable.
The Android and mobile development team at Toobler has just made a small addition to it’s portfolio – the Flight Delay Predictor. Flight delay predictor is a nifty little Android application that helps user’s keep track of delays in their flight, if any.
Completely developed in house and primarily for test and research purposes, the flight delay predictor uses an API provided by FlightCaster and has now been made available on the Android market as a freeware.
Flight delay predictor will be a very handy tool for all frequent fliers. It helps users to search for any flight by entering the route(From and To airports) or by flight names. On inputting your flight, flight delay predictor displays chances of how late your flight is/could turn out. The service currently covers all flights flying within the United States of America. The delay prediction is based on live air traffic data by flight caster and calculation will start six hours prior to scheduled departure time from source.
The Flight delay predictor features a very simple and elegant, easy to use interface that stays true to Toobler’s focus on user experience. All information and features are easily accessible and usage a complete delight.
The application also includes a “my flights” feature that lets you save any number of flights of your choice for easy access later. The flight search feature can also be used to get list of next available flights between two airports.
We hope you enjoy using it as much as we enjoyed developing it(We always do). And please don’t forget to give us your feedback and suggestions.
Now lets have a look at the code required to generate the above CFCharts.
<cfchart format=”png” name=”mychart” title=”Fruits Harvest” showlegend=”true”>
<cfchartdata item=”Mangoes Harvest” value=”5000″/>
<cfchartdata item=”Oranges Harvest” value=”4000″/>
<cfchartdata item=”Apples Harvest” value=”3000″/>
<cfchartdata item=”Grapes Harvest” value=”2000”/>
The result of a query may directly be converted to a chart by using the code below. Coldfusion will generate the chart data items on its own from the query
<cfchartseries type=”bar” query=”data” itemcolumn=”name” valuecolumn=”sales”/>
Cfchart and Cfchartseries have a large number of attributes which maybe used to customize chart. You can check the complete list on Adobe Livedocs at http://bit.ly/cjiRPs and http://bit.ly/b3pioP
The type attribute of Cfchartseries is the most important among the list. It lets you choose from a wide array of chart types such as bar, line, pyramid, area, horizontalbar, cone, curve, cylinder, step, scatter and pie.
But what really takes the pie is the amount of styling options Coldfusion gives to the developers. Instead of setting each of the attributes, I found an easy way of doing this by modifying the built in style files in the folder cf_root\charting\styles and saving them under a new name to access. The style files are simple XML files and modifying them is really easy. One of the coolest attributes was the “show3D” attribute, which gives the chart a 3D effect. The appearance maybe modified to such extents that people will have a hard time figuring out it is custom generated and not designed by a web designer specifically.