ChartDirector Ver 4.1 Release Notes
This document describes the enhancements and bug fixes in ChartDirector Ver 4.1 comparing to ChartDirector Ver 4.0. For enhancements in earlier versions of ChartDirector, please refer to the release notes archive.
Enhancements in Ver 4.1
Zooming and Scrolling Support
Previous versions of ChartDirector generate all standard mouse events (mouse click, mouse move, etc) for the charts. There are no built-in actions for these events. It is expected the software developers will put code in the event handlers to achieve the actions they need.
In ChartDirector Ver 4.1, in addition to generating these mouse events, ChartDirector includes an implementation of using the mouse to drag to scroll a logical view port, to drag to select a region in the logical view port, or to click to zoom in or out the logical view port. By handing the view port changed event, zoomable and scrollable charts with extremely large zoom and scroll ranges (eg. zoom from 10 years down to 1 second - a zoom ratio of 315 million times) can be implemented easily.
AJAX Chart Updates
Delayed Image Map with Independent Compression
In complicated charts with many data points, image maps can become large in size (eg. over 100 Kbytes). In standard HTML, image maps are embedded in web pages as HTML tags. Large image maps will therefore slow down the display of web pages.
Furthermore, ChartDirector includes built-in HTTP compression for the delayed image maps. Image maps are highly compressible, and compression ratios of 80 - 90% are common. For large image maps, this can lead to significant improvements in network performance.
Rounded Frame Borders
ChartDirector Ver 4.1 supports charts and text boxes with rounded borders. The radii of the 4 corners are individually configurable. For example, a chart frame may have all 4 corners rounded, or it may have the top two corners rounded and the bottom two corners squared.
Glass and Soft Lighting Shading Effects
ChartDirector Ver 4.1 supports special glass and soft lighting shading effects for text boxes and bars in bar charts. The glass shading effect gives an impression that the object is made by a glass or semi-transparent plastic material. The soft lighting shading effect gives an impression that the object is being illuminated by a spot light.
Improved Linear Gradient Colors
A gradient color is defined as a variation of colors along a vector. The vector identifies the direction and end points of the gradient color. In previous versions of ChartDirector, the vector is assumed to repeat itself periodically. If an object needs a non-periodic gradient color, the gradient vector must be of the same length as the object (so there is no need to repeat the vector).
ChartDirector Ver 4.1 includes support for non-periodic gradient colors. Points that are beyond the end points of the gradient vector assume the color of the end points. This makes it easier to use gradient colors in many cases.
Radial Gradient Colors
Previous versions of ChartDirector only supports linear gradient colors, ChartDirector Ver 4.1 adds support for radial gradient colors through the new radialGradientColor API.
Conditional Axis Format
In some applications, it may be desirable to use different axis label formats depending on the result of auto-scaling. For example, if auto-scaling decides that all ticks on the axis are yearly ticks, then one may only need to show the year in the date format.
ChartDirector Ver 4.1 introduces a new API Axis.setFormatCondition. This allows developers to predefined axis label formats to be applied under various conditions.
Configurable Line Spacing
In previous versions of ChartDirector, if a text string contains multiple lines, the line spacing is the default line spacing specified in the font used. In ChartDirector Ver 4.1, a CDML attribute is added to allow the line spacing to be configured.
Line Truncation Support
ChartDirector Ver 4.0 can wrap a text string into multiple lines if it is too long. In ChartDirector Ver 4.1, the text string can also be trucated if it exceeds a maximum number of lines (usually 1 line). Three dots ("...") will be appended to the end of the last line to indicate it is truncated.
ArrayMath Data Aggregation
Data aggregation is usually performed by a database. For example, the SQL "GROUP BY" clause may be used to aggregate data.
Occasionally, it may be desirable to aggregate data after they are retrieved from the database. For example, the database may be non-SQL, so there is no "GROUP BY" clause to use; or the data may be retrieved from the database once and cached in memory, and then used to draw charts at various resolutions (eg. in zoomable charts).
Also, some aggregate types commonly used in charting are not supported or are hard to express in SQL. For example, there is no standard SQL aggregate functions to get the first and last data values from a group of data (useful in OHLC and candlestick charts).
To simplify coding for applications requiring data aggregation without using SQL, ChartDirector Ver 4.1 introduces the ArrayMath.aggregate method. It partitions a data series into segments based on a "partition defintion array", then aggregate each segment into a single value. It supports aggregation functions commonly used in charting, such as sum, average, first, last, median, percentile, standard deviation, etc.
Behaviour Changes in Ver 4.1
ChartDirector Ver 4.1 is designed to be code compatible with previous versions of ChartDirector. This means existing source code will continue to work. However, in the following cases, the appearance of the charts produced may be slightly different.
Linux/FreeBSD/Solaris Font Metrics
In Linux, FreeBSD or Solaris, there is no standard location for fonts. So ChartDirector needs to include some basic fonts in its distribution. These basic fonts look like Arial, Times New Roman, and Courier fonts, and are used as substitutes of those fonts. However, they are not exactly the same as those fonts. It is recommended that one may download real Microsoft fonts and use them with ChartDirector. (See the Microsoft license agreement on how one may use these fonts legally on Linux/FreeBSD/Solaris).
In previous versions of ChartDirector, for bold fonts or normal fonts in large font size (15 points or above), the line spacing of these substitute fonts is around 25% larger than real Microsoft fonts. This may make charts slightly different on Windows and on Linux/FreeBSD/Solaris. For example, multi-line text that just fit a chart on Windows may overflow outside of the chart on Linux. This may be inconvenient for developers that develop their scripts on Windows, but will copy their scripts to Linux/FreeBSD/Solaris for production.
In ChartDirector Ver 4.1, the font metrics of the substitute fonts are adjusted to be more compatible with real Microsoft fonts. This may cause charts to become slightly different if the charts have the following characteristics. The line spacing of the text will be reduced.
By default, the CharDirector CandleStickLayer uses 80% of the available space as candlesticks, and leave 20% as the gap between candlesticks. In ChartDirector Ver 4.1 FinanceChart objects, if the candlesticks are thin (5 pixels or less), FinanceChart will increase the candlestick width to 100%. This is to avoid the candlesticks being too narrow.
In finance, the Bollinger Band is defined as +/- two standard deviations from a moving average line. In rare cases, it is possible the Bollinger Band will include negative prices. In previous versions of ChartDirector, the Bollinger Band will plot strictly as defined above. In ChartDirector Ver 4.1, the band will be clipped at the zero price. This ensures the price axis is always non-negative.
Bug Fixes in Ver 4.1
Font disappearing issue in ASP.NET
In ChartDirector for .NET Ver 4.0.5 or above, in certain cases, the fonts in ASP.NET may disappear intermittenly. This issue is fixed in ChartDirector for .NET Ver 4.1.
IBM WebSphere Java JIT Compatibility
In certain cases, NullPointerException in "Compiled Code" may occur when using ChartDirector for Java Ver 4.0 with IBM WebSphere server, under Java 1.4.x, when JIT is enabled. The reason is due to a compatibility issue between the the IBM Java VM JIT compiler and the brand and version of Java compiler that was used to compile ChartDirector. This issue has been addressed in ChartDirector Ver 4.1.
Axis Related Issues
The following axis related issues are fixed in ChartDirector Ver 4.1:
CDML Related Issues
The following CDML related issues are fixed in ChartDirector Ver 4.1:
BaseChart.makeTmpFile in Perl/Python
In previous versions of ChartDirector for Perl and Python, the BaseChart.makeTmpFile may not return unique file names if it is called multiple times in the same execution of the script. This is fixed in ChartDirector Ver 4.1.
Number Formatting Incorrect in .NET/Java
In previous versions of ChartDirector Ver 4.0 for .NET and JSP/Java, the number formatting functions may not work properly if the number is greater than around 1E+20. This is fixed in ChartDirector Ver 4.1.
PNG/GIF Encoding Error in .NET/Java.
In previous versions of ChartDirector Ver 4.0 for .NET and JSP/Java, if the 257th unique color happens to be pure black, the PNG and GIF images may be encoded incorrectly. (This should be very rare. If the chart uses pure black color, the pure black color should appear earlier and not as the 257th unique color.) This is fixed in ChartDirector Ver 4.1.
The following FinanceChart related issues are fixed in ChartDirector Ver 4.1:
ChartDirector Ver 4.1 is designed to be code compatible with previous versions of ChartDirector. This means source code should work without modification. However. for pre-compiled .NET or Java code that use the FinanceChart.addBollingerWidth method, re-compilation may be necessary. (See FinanceChart Issues.)
The charts produced by ChartDirector Ver 4.1 may be slightly different from the charts produced by earlier versions of ChartDirector using the same source code. Please refer to Behaviour Changes in Ver 4.1 for details.
It is decided that ChartDirector licenses purchased on or after 1 April 2003 will be entitled to free upgrade to ChartDirector Ver 4.1. ChartDirector Ver 4.1 will automatically recognize license keys issued on or after that date and continue to accept them. There is no need to obtain an upgrade key.
If your ChartDirector liecnse was purchased before 1 April 2003 (that means at the time of the purchase, the ChartDirector version was Ver 2.5 or below), you will need to purchase an upgrade license to use ChartDirector Ver 4.1. Please refer to Purchasing ChartDirector Upgrades for details.
To upgrade ChartDirector, simply install the new version on top of the old version.
For the ASP/COM/VB editions ChartDirector, you may need to run the installer twice to upgrade ChartDirector. The installer will first uninstall your existing ChartDirector. It may prompt you to reboot in order to complete uninstallation (especially if you are using ChartDirector with IIS). If this happens, please reboot first before continuing to install ChartDirector. After uninstallation is completed, please run the installer again to install ChartDirector.
For the PHP/Perl/Python editions of ChartDirector, please remember to update the files "phpchartdir.php", "perlchartdir.pm" and "pychartdir.py". These files are the language interfaces to the ChartDirector DLL or shared object. Their versions must match exactly with that of the ChartDirector DLL or shared object. Depending on how you install ChartDirector, these files may have been copied to the default module directory of your language interpreter, and/or to various scripting directories in your computer. Please ensure you update all of them.
For Linux, FreeBSD and Solaris, please remember to update all the files of the ChartDirector library in "ChartDirector/lib", including the fonts. ChartDirector Ver 4.1 uses different default fonts with metrics more compatible with Microsoft. If you do not update the fonts, texts in the charts may not display.
If you are using PHP or mod_perl with Apache, you may need to restart the Apache server for the upgraded ChartDirector to take effect.