ASE Home Page Product Download Purchase Support About ASE

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.

The zooming and scrolling features are supported in both Windows and Web based applications. For Windows based applications (applicable to ChartDirector for ASP/COM/VB, .NET, Java and C++), these features are supported as enhancements to the windows chart viewer object. For Web based applications, ChartDirector includes a Javascript JsChartViewer library for supporting these mouse interactions on the browser side.
AJAX Chart Updates
The Javascript JsChartViewer in ChartDirector Ver 4.1 supports "partial chart updates" using AJAX techniques. This allows charts and their image maps to be updated on the browser side without refreshing the web page. Furthermore, it supports transferring custom attributes through the AJAX communication channel when requesting and receiving chart updates. This allows other objects on the web page to be updated together with the chart.
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.

By using the Javascript JsChartViewer, ChartDirector Ver 4.1 allows image maps to be delivered after web pages and the chart images are loaded. This allows web pages to display faster even with largr image maps.

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.

  • The operating system is Linux, FreeBSD or Solaris.

  • The charts use the subtitute fonts that come with ChartDirector, with bold fonts, or normal fonts at larger size (15 points or above), or rotated fonts.

  • The texts that use the above fonts have multiple lines, or the legend box is using the above fonts and has multiple lines.
FinanceChart Changes
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:
  • Axis.syncAxis and Axis.copyAxis do not work properly for x-axis. Also, Axis.syncAxis does not work properly with a non-zero intercept.

  • Axis image maps generated by Axis.getHTMLImageMap may be incorrect if the axis labels are rotated, or if the axis is an AngularAxis, or if the axis is label based and is reversed (using Axis.setReverse).

CDML Related Issues
The following CDML related issues are fixed in ChartDirector Ver 4.1:
  • The <*advance*> tag does not work.

  • CDML image stretching is broken in ChatDirector for .NET.

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.
FinanceChart Issues
The following FinanceChart related issues are fixed in ChartDirector Ver 4.1:
  • The Ultimate Oscillator is computed wrongly.

  • The addBollingerWidth method always uses the default band width of two standard deviations, irrespective of what is specified in the method call.

    (Note: Do not confuse Bollinger Width with Bollinger Band. The Bolliger Band is a commonly used indicator and is not found to contain any error. The Bollinger Width is rarely used and is the subject of this issue.)

    Also, for the Bollinger Width in ChartDirector Ver 4.0 for Java and ChartDirector for .NET, the method is declared as:
    public XYChart addBollingerWidth(int height, double period, int width, int color)
    The above is incorrect, as the moving average period should be an integer, while the width should allow non-integers. In ChartDirector Ver 4.1, this is corrected to:
    public XYChart addBollingerWidth(int height, int period, double width, int color)
    The change in declaration means that .NET and Java code that use the above method and are pre-compiled needs to be re-compiled. Otherwise, exceptions will occur when the above method are actually called. Code in ASPX and JSP pages are not affected as these code are not pre-compiled.

Upgrade Considerations

Code Compatibility
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.)
Behavioural Compatibility
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.
License Compatibility
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.
Upgrade Procedure
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.