« Re: Collection & Iterator and Class(cast) | Main | Internationalization/localization in Flash applications »

December 06, 2004

XPCharting - new features added

Weve updated the XPCharting set in the last few days to add in some advanced features that are particularly useful for Stock charts.

  • HiLo charts

  • CSV Connector

  • Dynamically add and remove chart series
  • HiLo charts are the traditional stock or forex charts displaying High/Low/Open/Close prices.

    Often the data sources for stock charts is CSV formatted data so we have added a CSVConnector. This is to CSV files what the XMLConnector is for XML files. It makes it trivial to load, parse and use CSV files in your application.

    We then connect the CSV data to our chart through a new component the TimeSeriesDataProvider which handles translating dates in the CSV files into real Date Objects that are need by the charting system.

    The example below shows this all coming together.
    The source is CSV data provided by Yahoo Finance.
    In this example you can also add or remove Moving Average analyses by clicking the buttons. These averages are calculated on the fly and are not part of the original data.

    All this was achived with only 36 lines of code most of which was just event handlers and only 7 lines were directly manipulating the chart.













    FYI. The CSVConnector has also been added in to our XPCompent set which now totals over 40 components and still growing.

    Post a comment

    (If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)