RISC World


A sophisticated graph and chart package by Ben Moseley

Copyright © Ben Moseley 1991-2008 - All rights reserved.

No part of this product may be reproduced in whole or part by any means without written permission of the publisher. Unauthorised hiring, renting, loaning, public performance or broadcasting of this product or its constituent parts is prohibited.

While every care has been taken with this product, neither the author nor the publisher can be held responsible for errors which it may contain, or for the loss of any data or consequential effects from the use of this package.

Note: clicking on references from the following list will take you to the appropriate section, whilst clicking on the main headings within the manual will return the view to this list of contents.

About this manual

This manual describes the installation and use of the ChartWell data presentation package. It is divided into the following sections:

1. Introduction

A quick summary of ChartWell's capabilities

2. Installation

How to get ChartWell up and running

3. Overview

Basic principles and method of use

4. Tutorials

A series of examples to guide you through the production of some simple graphs

5. The Graph Window

An explanation of the main ChartWell control panel

6. The Menus

Details of ChartWell's two main menus

7. Graph Types

Detailed explanations of each different type of graph

8. Style Sheets

Using ChartWell's style sheet functions


1. Installation Details
2. Curve Fitting Techniques

Typographic conventions

The following is a simple description of the conventions used in this manual.


Wherever reference is made to a computer key, the name of that key is given in the following style:

 Space - The space bar
Return - The 'Return' key
Ctrl-U - This means press 'U' while holding down the Ctrl key.


These are enclosed in single quotes, e.g. 'Save Options'.


The standard Acorn terminology is used.

Select - indicates the left button.
Menu - indicates the middle button.
Adjust - indicates the right button.

Where the button is unspecified, use Select.

1. Introduction

A more versatile package

ChartWell is a data presentation package for RISC OS computers. It allows comprehensive bar, pie and scatter charts to be produced with properly marked and labelled axes. ChartWell also allows more advanced graphs such as polar or cumulative area charts to be created quickly and easily. But perhaps more importantly, emphasis has been placed on ease of use and flexibility - for example, there are ten different types of bar chart on offer, and pie charts can be drawn in 3D and viewed from any angle!

ChartWell allows the user to control virtually all aspects of graph production, including line thickness, colours, data point types, and axes. It uses the Acorn outline font system to enhance the quality of the text included in graphs. It offers several choices of best fit curve and permits the use of error bars, making it an ideal scientific tool.

Yet despite its many features, ChartWell uses only five main graph types (with twenty four variants).

ChartWell is a fully multitasking RISC OS compliant application, and will work alongside other applications. It can take its data from a wide range of sources, accepting files from spreadsheets such as Pipedream or Schema, word processors and text editors such as Edit, DeskEdit and EasiWriter, and DTP applications such as Impression and Ovation. The resulting graphs (produced as Draw files) can be exported to an even wider variety of programs - into Draw for further refinement, into any DTP document, or into a multimedia package for interactive presentations (examples here being Magpie or Genesis). In addition, the graphs can be output using any standard RISC OS printer driver.

2. Installation

The Package

The following text describes the recommended installation procedure for both floppy and hard disc systems.

Whichever RISC OS system you use, your first action should be to make a backup copy of the ChartWell disc, in case anything should go wrong with the original (for details of how to do this, refer to your computer's manual).

Floppy Disc

After you have made a backup, you should create a 'working disc'. This should contain the ChartWell application, a copy of the System folder and any other applications you may need to work alongside ChartWell, e.g. Draw and Edit.

Having done this, there should remain slightly more than 300K on the disc for any graphs and data files on which you are currently working. These can of course also be saved on any other disc you choose.

Hard Disc

Installation on a hard disc is much simpler. You have only to drag the ChartWell application into your chosen hard disc directory viewer.

For further details about installation, and how to change the font used by ChartWell, see Appendix 1.

3. Overview

Graph Types

ChartWell supports five basic graph types, each of which has a number of variations (e.g. 3D or 2D Pie charts, Horizontal or Vertical Bar charts). The variations are discussed later, but a brief guide is given below as to the main differences between types.

    Bar Charts are probably the most widely used graph type because they provide a simple contrast between separate quantities.

    Line Graphs are similar to bar charts, except that a line is drawn connecting the data points, instead of representing these by bars. A line graph is produced from Y values alone, and should not be confused with the 'Scatter Graph' type, which needs both X and Y values.

    Pie Charts are often used to depict percentages. A common example might be a chart showing the uses to which a department budget is put. Multiple Pie charts are also possible with ChartWell.

    Scatter Graphs are often used by the scientific community, and show the relationships between pairs of variables (X and Y).

    Polar Charts are used in specialised situations when values are measured at distances and angles from a central point.

This section summarises the way in which ChartWell fits into the RISC OS environment, and explains how best to use it in conjunction with other existing applications.

ChartWell can accept source data in a variety of formats from other RISC OS applications, and the resulting Draw file can be put to a variety of uses.

Spreadsheets, DTP programs and text editors are possible sources, and Draw, DTP programs and so on are possible outputs. Acceptable source files are Text and CSV (comma separated value). CSV files can be produced by most spreadsheets and other applications which handle numeric data. Text files can be generated by DTP programs, word processors and text editors such as Edit and DeskEdit. They should contain one or many sets of numbers to form the data for the graph. If there is more than one data set, then the first set should be separated from the second by a comma:


This simple format might be used to generate a scatter graph which requires two sets of data: pairs of 'x' and 'y' values. The same data could equally well come from a spreadsheet, where two parallel columns would contain the 'x' and 'y' data. You would then select these two columns of data and then save them as a CSV file for ChartWell to process.

Put simply, ChartWell acts as a file converter. It will take a numeric file (in Text or CSV format) and output a graphical file containing the finished graph (in Draw file format).

For example, you can prepare some figures in Edit and drag them to ChartWell, which will process them and produce a Draw file which can in turn be dragged to Draw to view the results. The graph can also be edited and fine-tuned within Draw if desired.

The choice of graph and the stylistic variations of the graph are controlled by the ChartWell main window and the main menu respectively. You can also adjust the order and selection of individual columns of data in the source file, for example, to align the lower bars in front of the higher ones in a 3D chart. This is achieved in the data allocation section of the main window.

In ChartWell, there is also a style sheet facility whereby the details of any commonly used graph style can be saved. So if you want to prepare, for example, a monthly bar chart in 3D, with thin columns, thick lines, and certain axis labels, then these settings would be saved in a ChartWell style sheet file. Details of these facilities are given later.

Negative Numbers

ChartWell is capable of handling negative numbers in data. If a data set contains negative numbers, then all graphs behave in the normal way with the exception of 3D bar charts, where a choice of opaque or transparent graph base is available (see section 7.1 for further details).

Beware that attempting to draw graphs based on data containing negative numbers will produce unpredictable results if Pie charts, Percentage Bar charts or Stacked Bar charts are selected, as these graph types are not relevant when dealing with negative values.

4. Tutorials

This section aims to acquaint the ChartWell user with the basics of the package. Once this has been completed, you should be able to create all of the main types of graph. What this section does not do is to introduce all of the features of the program - these are covered in detail in the sections on the menus and on the graph types.

4.1 Bar Chart Tutorial

Install ChartWell and Draw on the icon bar, and then open the Tutorials directory on the main ChartWell disc. Inside, you should find two sub-directories.

    Data: The text files containing the numeric data needed for creating the charts.

    Output: A set of Draw files identical to the ones which you should be producing in this tutorial session.

Load the Tut1 data file into ChartWell by dragging the file icon from the directory viewer to the icon bar icon in the usual manner. The ChartWell main window will appear and the file is loaded.

The file is a simple one with just two columns of data - a text column containing some pupils' names, and a numeric column containing their examination results.

Now that the file is loaded we shall set some of the graph attributes and then create the graph.

First of all, click Menu in the ChartWell main window to bring up the 'Graphs' menu. Move the mouse pointer over the arrow to the right of the 'General' menu option. The 'General options' submenu will now appear.

Click on each of the icons to the left of 'X graduations lines', 'Y graduation lines' and 'Filled background'. This deselects these options (which are set by default) and will generally simplify the graph's appearance. Click with the Adjust button on the 'OK' icon to confirm these settings. Now move the pointer over the arrow to the right of the 'Colours' option on the main menu. The 'Colours' submenu will now appear.

Click on the arrows to the left and right of the first colour cell to select a suitable colour for the bar chart. Note that, since we have only one column of numeric data in our file, only the first colour cell has any relevance. Now click on the 'OK' icon to confirm the settings. The menu will disappear. Finally, click on the 'Create' icon of the ChartWell main window. After a short while, a RISC OS save box will appear. This enables us to save the graph to disc or to drag the graph to the Draw application for viewing. Drag the graph icon with the Select button to the Draw application icon on the icon bar.

The graph will now be displayed. Compare it with the graph Tut1 in the Tutorials.Output directory. The two should be identical, with the possible exception of different bar colours. The graph can now be printed, as with any other Draw file, using Draw (if you are unsure exactly how to do this, consult your RISC OS User guide).

4.2 Line Graph Tutorial

This tutorial follows on from the previous one and assumes that the Tut1 data file is already loaded. If it is not, load it as described in the previous section. In this section we will re-display the bar chart created earlier as a line graph in a different colour.

Close the Draw window which is currently displaying the Bar chart (if it i still on screen). You will be asked for confirmation. Now select the 'Line graph' radio button in the ChartWell main window.

Bring up the 'Graphs' menu as before. Go to the 'Colours' submenu and choose a new colour. Now go to the 'Line graph' submenu and alter the line width from 'Thin' using the left and right arrows. Set it to about 12. Now dick on 'OK' to confirm these settings.

Next go to the 'General' submenu and select the 'X graduation lines', the 'Y graduation Lines', and the 'Filled background' icons which you deselected previously. Now click on the 'OK' icon to confirm these settings.

Finally click on the 'Create' icon on the ChartWell main window. After a short while, a save box will appear as before. Drag this to Draw for viewing. (Compare it with the graph Tut2 in the Tutorials.Output directory. The two should be identical, with the possible exception of different line colours.) Note the default data points - red squares. Data point size is proportional to line width - hence the size of the squares. Note also the 'Filled background' and the 'X' and 'Y' graduation lines.

4.3 Pie Chart Tutorial

Here we will create a pie chart, again using the same data as before. Check that the Tut1 data file is loaded - its name should be visible in the top-left panel of the ChartWell main window.

Select the 'Pie chart' radio button from the ChartWell main window and bring up the 'Graphs' menu by clicking Menu over the main window.

Go to the 'Pie chart' option and then select the 'Pie options' submenu and select the 'Legend' option. Go to the 'Withdraw' submenu and select the 'Overall' radio button followed by the 'Smallest' radio button. This tells ChartWell to withdraw the smallest segment of the pie chart (note that the 'Overall' and 'Every pie' options are identical where only one pie chart is being plotted).

Click 'OK' to confirm these choices, then click on 'Create' in the main window to create the graph for viewing with Draw as before.

4.4 Scatter Graph Tutorial

In this tutorial we shall have to use a different data file since Scatter Graphs need at least two sets of data - namely 'x' and 'y'.

Load the Tut4 data file from the 'Tutorials.Data' directory by dragging it either to the ChartWell icon bar icon or to the ChartWell main window.

Select the 'Scatter' radio button in the ChartWell main window.

Use the Menu button to obtain the main menu, and select the 'Scatter' option and the 'Line' submenu, and select the 'Best fit' radio button. This tells ChartWell to produce a straight line of best fit through the data. Click on 'OK'.

Next go to the 'Data points' submenu to alter the kind of data point used with the graph. This window contains two sets of left/right arrows. The first set alters the shape of the data point. The second alters the colour. Again, only the first data point has any relevance since we have only one line (from one 'x' column and one 'y' column of data).

Alter the data point so that it becomes a light blue diamond, then click on 'OK' to confirm your choices.

Finally click on 'Create' in the main window and display the graph in Draw as normal. It should appear identical to the file Tut4a in the Tutorials.Output directory. Note the display of the equation of the line, automatically produced by ChartWell, and the value of 'r^2' (where 'r' is the correlation coefficient).

Now we will remove the background, add some error bars and redraw the graph. The errors are to be plus/minus 0.1 for 'x' and plus/minus 15 for 'y'.

Close the Draw window which is currently displaying the graph. Bring up the 'Graphs' menu and go to the 'General' submenu. Click on the 'Filled background' icon to deselect it.

Select 'Scatter' again from the main menu and then the 'Error bars' submenu.

Select the 'Value' radio button since our errors are absolute values and not percentages. Type in our chosen error values in the two writable icons and then click on 'OK'.

Click on 'Create' and then re-display the graph. It should appear identical to the file Tut4b in the Tutorials.Output directory.

4.5 Polar Chart Tutorial

In this tutorial, we will create an ordinary polar chart (as opposed to a mathematical one). Load the Tut5 data file just as we loaded the Tut4 file. Here the columns of data are 'r' and 'q' respectively.

First select the 'Polar' radio button in the ChartWell main window. Now go to the 'Polar plot' submenu and alter the line width to 4 with the left and right arrows. Select the colour red for the line from the 'Colours' menu, together with cream circular data points from the 'Data points' menu, and a filled background from the 'General' menu, then click on 'OK' to confirm all of these choices.

Finally 'Create' the graph and display it in Draw.

5. The Graph Window

The ChartWell main window is produced by dragging a suitable file to the ChartWell icon on the icon bar, or by clicking with Select on ChartWell's icon bar icon. The window is divided into two main sections.

On the left are the graph type options. These permit you to select the category of graph you want to produce. Also on this side is the 'Create' button and name of the currently loaded data file (when no data is loaded this shows 'No data' and the 'Create' button is greyed out). The 'Create' button is used to create the graph with the current set of options (as defined by the main menu - see Sections 6 and 7).

To the right of the main menu is the data allocation section. This defines the use made by the program of each column of data in the input file. For example, if you are producing a bar chart, then the first row of bars will be Data set 1, the second row of bars will be Data set 2, etc. Usually, Data set 1 will come from Column 1 in your data, and so on. Using this section, it is a simple matter to adjust the ordering of the data sets in the graph or chart. The order of columns can be changed, or columns omitted altogether. Apart from re-ordering bars in bar charts, you can swap the x and y co-ordinates used in scatter graphs, rearrange your pies, etc. This feature of ChartWell offers considerable power and flexibility in allowing the user to choose which columns of data should be used in producing a graph, and in which order. ChartWell will allow up to six data sets to be selected from a maximum of 32 columns of data. This set of icons also allows you to specify one column of data as a text column. This might for example be used to label the bars of a Bar chart. The window will appear whenever a suitable file (Text or CSV) has been dragged to the ChartWell icon bar icon, or whenever the icon is clicked upon. Once data has been loaded and options set as required by the user, clicking the 'Create' button will produce the resulting graph in Draw file format. This appears as a standard Save box, and the Draw file may be dragged into any other suitable application, or into Draw for viewing, editing and printing. Alternatively, it may be saved to a directory viewer.

6. The Menus

The Main Menu

The main menu is used to give the user control over all aspects of the graph's appearance. This menu is invoked by clicking Menu with the pointer over the main ChartWell window. It is divided into two sections.

The upper half contains a set of submenus which give options specific to each of the main graph types. These will be dealt with in turn in Section 7. The lower half contains options which apply generally to all graph types where appropriate. We shall now look at these in turn.

Throughout the ChartWell main menu, one feature common to all windows is the presence of 'OK' and 'Cancel' buttons. These are used to confirm and undo settings respectively. Note that settings are ignored until they are confirmed.

Note also that the 'OK' and 'Cancel' buttons need only be clicked once for each time the menu is opened: if you alter settings in several windows, you do not need to click 'OK' in each window; you can just click it in the last window in which you make changes. If you fail to click 'OK' before closing the menu structure, however, the altered settings will be forgotten. This behaviour is a little different from most other RISC OS applications, which normally require you to click an 'OK' button for each individual window.


The 'General options' dialogue box is used to control features which apply equally to several different graph types.

    Graduated Back-fill determines whether a shaded grey-scale background is drawn behind and around the graph. Its purpose is purely aesthetic.

    Filled background should not be confused with the above option. When this is selected, the graph area will be shaded in a uniform light grey. For Bar, Line and Scatter charts, the graph area is the rectangle constructed from the axes and the sides of the graph. For Polar charts, it is simply the outermost circle. Again, this option is purely visual in its effect. Note that this option is not applicable to Pie charts.

    X/Y graduation lines allow the user to select whether dashed lines are to be displayed across the graph vertically and/or horizontally. This aids visual registration of the graph against the vertical and/or horizontal scales. For Bar, Line and Scatter types, these are straight lines. For Polar charts, the X graduation lines are the graduation circles and the Y graduation lines are the radial spokes. Again, this option is not applicable to Pie charts.

The graph axes are also controlled from this dialogue box. By default, they are generated completely automatically, but it is possible to override their default behaviour in order to cater for a wide range of situations. Note that not all options are available for all types of graph.

    Include axes causes axes to be drawn along the zero lines. If the option is deselected then the axes will be omitted (in which case the left and bottom edges of the bounding rectangle will act as axes).

    Values on axes may only be selected if 'Include axes' is turned on. If 'Values on axes' is selected, then values will be printed along the axes; otherwise they will be printed along the left and bottom edges.

    Show values allows numeric values on axes to be shown or suppressed.

    Show ticks allows the display of ticks along axes to be enabled or disabled.

    Auto-scaling: most of the time, it is convenient to have the axes generated automatically. In some situations, though, it is helpful to be able to limit the range of values displayed on the graph. To achieve this, simply deselect the 'Auto-scaling' option, and enter the required values. There are three writable icons for each of X and Y. These are, respectively, the minimum axis value, the maximum axis value, and the axis tick value. The axis tick value is simply the interval at which the numbers are placed on the axis. This also controls the positioning of graduation lines and little 'tick marks' on the axis itself.

Axes settings are ignored by Pie chart types, and, for Polar charts, the X values are taken to be the radii, whilst the Y values are ignored.

Finally, in this window, control is available over the general line thickness used. This is the thickness of lines used for bars in Bar charts, pies in Pie charts, axes, etc. It is separate from the line width options which can be altered independently for Line, Scatter and Polar types. These are covered later. As with all line width settings, the minimum value is 'Thin'. This simply means that the line will be drawn as thinly as is possible, whatever the output device (screen or printer). Caution should be taken with Thin lines, as they are liable to vanish on high-resolution printers. If this is of concern to you, you may like to edit all the Thin values to a minimum of 1.


The 'Colours' dialogue box provides all colour control for the graphs. There are six alterable colour settings which correspond to the different data sets in the graph (rows of bars, lines etc.). To adjust any colour, simply click on the left and right arrows. The box controls different features depending on the graph type being used.

For Bars, it controls the colour of each set of bars, whether they are stacked one above the other, or in rows. If only one set of bars is being plotted, then the first colour is used. One point to note here is the special treatment of colours in 3D charts. For most colours, ChartWell produces a separate shade for the bar sides and top (only visible in modes with at least 256 colours - 16-colour modes will show the nearest equivalent colours). However, since most monochrome printers have difficulty in distinguishing between similar colour shades, the colour black may be used as the selected colour for the data sets. This is treated in a slightly different way: the side of the bar is mid-grey, the top white, and the front black, rather than the three different grey shades which might have been expected. It is therefore recommended that 3D Bar charts destined for output to monochrome printers are produced with the colour option set to black.

For normal Line graphs, the colour setting controls the line colour used (differences here are more easily seen with thick lines). For the 'Cumulative area' and the 'Stacked area' variations, the colour setting controls the colour of each area beneath the line.

For Pie charts, the six colours do not behave as normal by controlling colours for each data set (which would be each pie plotted). Instead, they control the colours of the individual pie segments. Where there are more than six segments, colours begin again - hence segment seven is the same colour as segment one, segment eight is the same colour as segment two, and so on.

For Scatter graphs, the setting controls the colour of the line used (whether it is a joined line, a best fit line or a curve).

For Polar graphs, the setting alters the polar line colour.

Note that the default colour settings correspond with those used in the 'Data points' submenu. This can be useful in relating lines of best fit to their appropriate set of data points.

'Data set names'

This window enables you to give some graph types a key (data set legend). For example, if you are producing a stacked bar chart, with three different levels. then it may well be useful to have a key to explain what each different data set means.

This is quite easily achieved by selecting the 'Data set legend' icon and then entering the desired text in the writable icons.

'Data points'

This window applies only to the Polar, Line and Scatter types of graph. It is used to change how each point of data is marked in each different data set It is also possible to remove data points altogether by deselecting the 'Data points' icon. Data points will then be joined by lines but otherwise unmarked.

The window can be considered in two parts. The left-hand part controls the data point shape. The right-hand part controls the data point colour (data point size is dependent upon the line thickness used). Note that the default colour settings for each data set correspond with those used as defaults in the 'Colours' dialogue box.


This window allows you to add titles to all graphs and axis labels where applicable (Bar, Line, Scatter, Polar). Y axis labels are written vertically. For Polar charts, use X axis label for radius label.

To generate labels, simply ensure that the required icon is selected, and then enter the desired text into the corresponding writable icon.


See 'Style Sheets' (Section 8).

The Icon Bar Menu

This menu is obtained by clicking Menu over the ChartWell icon on the icon bar. It contains just three options. The first, 'Info', leads to the standard information box submenu. Note that the version number of the program is given in this box. This number should be quoted in all correspondence. The second option, 'Save options', will save the current menu settings as the default start-up options. In effect, you are altering the default style sheet (see Section 8). The final option, 'Quit', will terminate ChartWell and remove it from the icon bar.

7. Graph Types

7.1 Bar Chart

These are controlled from the first option on the main menu.

The 'Bar chart' window controls which of the many different bar sub-types is used, and also the thickness of the bars. The different sub-types are listed below, followed by an explanation.

Vertical 3D Bar Chart
Vertical Clustered Bar Chart
Vertical Stacked Bar Chart
Vertical Layered Bar Chart
Vertical Percentage Bar Chart
Horizontal 3D Bar Chart
Horizontal Clustered Bar Chart
Horizontal Stacked Bar Chart
Horizontal Layered Bar Chart
Horizontal Percentage Bar Chart

These variations can be considered as five sub-types in each of two variants - horizontal and vertical. Each sub-type is explained below:

    3D bar chart plots the bars as three dimensional boxes. For more than one data set, the following data sets are drawn in successive layers behind the first.

    Clustered plots bars as two dimensional rectangles. For more than one data set, bars are clustered into groups, side by side. The first cluster will use the first values from each data set, the second cluster will use the second values, and so on.

    Stacked plots bars as normal, but further sets of bars are plotted stacked on top of earlier ones.

    Layered again plots normal 2D bars, with further sets layered behind, and slightly offset from, the first.

    Percentage bar charts are similar to stacked bars, but each stack is scaled up in height to represent 100%. Each bar inside each stack then represents the percentage of the stack total.

Functionally, vertical and horizontal bar charts are identical.

If a 3D Bar chart containing negative values is created, then there are two ways in which the negative bars can be drawn, and the option 'Transparent' is available to reflect this. If 'Transparent' is selected, then the base on which the bars rest or descend from will be treated as transparent; otherwise it will be treated as opaque.

7.2 Line Graphs

As mentioned earlier, line graphs are used where only one value specifies a data point as opposed to Scatter graphs where both 'x' and 'y' pairs of values are necessary.

The first section of this window offers the choice of the three line graph sub-types: Normal, Cumulative area and Stacked area.

    Normal line graphs take a set of values for each line, where each value specifies the 'y' co-ordinate of a point. Lines may be of any thickness, or even completely absent (leaving just the data points themselves - see below).

    Cumulative area charts take each set of data and sum the values as the points are plotted. For example, if the data contained 3, 7, 5, 2, then the points plotted would be 3, 10, 15, 17. Further to this summation process, each different set is drawn as a solid area in a different colour, with each successive set being stacked above the previous one.

    Stacked area charts are similar to Cumulative area charts except that the values are not summed as they are plotted.

The other section of this window controls both the line thickness and, for Normal graphs, whether the line is actually plotted or not. If the line is not plotted, then the data points are left by themselves. An interesting effect can be created by doing this with just X axis graduation lines to give an 'abacus' style of graph.

7.3 Pie Charts

ChartWell allows up to six data sets to be represented in Pie chart format by displaying up to six pie charts in the same graph.

Depending on the number of pie charts, the pies are placed in predetermined positions.

All pie chart options are controlled from the 'Pie chart' option in the main menu, which leads to a submenu and hence to three further submenus. These menus control segment withdrawal, graph labelling and other options. Let us look at each of them in turn.

The 'Pie options' window provides general Pie chart control. The first option, Proportional size, controls whether, in the case of multiple pies, the charts should be drawn with different sizes depending on each pie's total value. When selected, the chart's area is proportional to the total value of all the segments.

The Legend option gives you the choice of whether you would like a legend (or key) explaining each segment. If you have selected this option and there is a text column of data (as set in the data allocation section of the main window), then the key will use this text.

The 3D pie chart option is self-explanatory. If selected, you can alter the angle from which the pie chart is viewed (90° equating to a view from directly above, etc.).

The Pie segment withdrawal window enables you to choose which segments (if any) should be removed slightly from the others. The two sets of radio buttons enable you to control the basis for withdrawal and how this should be applied. Again, these are fairly self-explanatory.

For example, you could withdraw the biggest segment from each pie, or you could withdraw the smallest segment overall. Alternatively, you could withdraw (for example) the third segment in size from every pie chart.

Using the 'Pie segment label' window, you can control how each pie segment is labelled. The label may be purely numerical (optionally as a percentage of the pie total), or it may also include text (if there was a text column in the data).

7.4 Scatter Graphs

The 'Scatter' option leads to a submenu which in turn leads to two further submenus enabling control of line type and error bar facilities.

The 'Line options' sub-submenu gives control over what kind of line is drawn for the scatter diagram (if any). A line width control is also provided. This acts in exactly the same way as the other line width controls.

The different line types are described below:

    None: no line is drawn. A scatter of data points is left.

    Joined: each point is connected to the previous one by a straight line. Points are plotted in order of ascending 'x' values.

    Best fit: a straight line of best fit is drawn through the points. The equation of the line is displayed at the top of the graph. Also, the coefficient of determination is given. This is 'r^2', and it gives some idea of the correlation between the 'x' and 'y' values ('r' is the correlation coefficient).

    Power: a best fit power curve is plotted through the points. The equation of the curve is given.

    Log: a best fit logarithmic curve is plotted through the points. The equation of the curve is given.

    Exponent: a best fit exponential curve is plotted through the points. The equation of the curve is given.

For more details on the curve fitting techniques used, see Appendix 2.

Error bars may be included on scatter graphs, either from absolute values set in the 'Error bars' window, or from additional data columns. If 'Error bars from data' is selected, ChartWell will assume that the next two columns following the designated 'x' and 'y' values specify error bar values for each point (one column to apply to 'x' values, one to 'y' values). For this option, data columns can only be selected in the order that they occur (other data allocation settings are invalid).

If values are to be specified in the 'Error bars' window, two values are needed: one for the 'x' variable and one for the 'y' variable. These two numbers may either be percentages or absolute values. The 'Percentage' and 'Value' radio buttons control the choice between percentage errors for errors and absolute values.

The error values (whether they are percentages or absolute values) are entered into the two writable icons to the left of the window.

7.5 Polar Charts

ChartWell supports two different kinds of polar chart. The first (as with the other graph types used in the program) is data-based, i.e. it is produced from a CSV/Text file containing point co-ordinates. The second type is generated from an equation entered into the 'Maths polar' submenu (see below). For the first, data-based, polar type, data is specified as two values per point. The first is the distance from the centre (or pole) of the chart; the second is the angle:


Angles (q) are measured in degrees, from 0 to 360.

The 'Polar line type' window simply controls the type of line used in polar charts (both mathematical and data-based).

The two radio buttons control whether the line is plotted or not, i.e. whether the chart is a polar line graph, or a polar scatter chart.

Finally, there is a line width selector which acts in the normal way.

7.6 Mathematical Polar Charts

This is the second type of polar chart, which, as mentioned above, does not take a source data file but a source equation. This option generates a graph directly and does not use the 'Create' button in the main ChartWell window.

To use this type of graph, you must enter an equation giving 'r' in terms of 'q' in the writable icon provided.

Instead of typing the greek 'theta' symbol itself (which is not given on the keyboard) into the equation, simply type the word "theta". Also note that the equation must be entered with all operators given explicitly, i.e. "2*theta" rather than "2theta".

Next, having chosen the angular step for 'theta', click on 'OK'. After a short delay, a save box will appear as normal, from which the graph can be saved. The angular step determines the interval at which the function is evaluated. The lower the value of 'theta', the more accurate the plot will be, but the longer the calculation will take.

The equation SIN(2*theta)-COS(theta), which is entered in the window by default, would be written in conventional mathematical notation as "sin 2Ø - cos Ø" (where Ø represents 'theta').

8. Style Sheets

The final entry in the main menu is entitled 'Settings', and it enables the user to control the graph options set elsewhere from the main menu. These may be reset to their default values, or the option settings saved as a 'style sheet' (the default start-up option settings can be adjusted from the icon bar menu).

These style sheets, or options/settings files, provide a high degree of flexibility, and are a unique ChartWell feature. You need only once specify the characteristics of a complex type of graph with your desired labels, scales, colours, sizes etc.; in the future, when you require a similar graph but with different data, you can simply re-load your previously-saved style sheet into ChartWell.

Style sheets are saved from a standard RISC OS save box in the 'Settings>Save' submenu. Simply type in the filename and drag the style sheet icon to a directory viewer.

Style sheets may be loaded in the standard RISC OS manner by dragging, or by double-clicking on the style sheet icon. When this is done, ChartWell will load the saved values into all the options windows, from where further adjustments can be made; or, alternatively, the graph may be plotted straight away in the selected style. This feature is most useful where the same style of graph is required from data which is frequently updated.

Appendix 1: Installation Details

Floppy disc users should ensure that any relevant modules are installed in the !System directory of the working disc. Although ChartWell does not require any such modules itself, supporting applications such as Draw and Edit, require 'CLib', 'Colours' and 'FPEmulator'.

ChartWell can use any font in its graphs, but defaults to Homerton. Should you prefer to use another font, the !ChartWell.!Run file should be altered as described below.

For example, to change from Homerton.Medium to Trinity.Medium:

  1. Double-click on the !ChartWell icon whilst holding down the Shift key. This will open its directory viewer.
  2. Load Edit (or similar text editor).
  3. Drag the !Run file from the viewer opened in (1) onto the Edit icon on the icon bar. This will load the file for editing, and a window will appear containing the following:

    | ChartWell, version "1.19 (11-May-99)"
    | !Run file

    If "<Font$Path>"="" Then Error 0 Fonts cannot be found

    Set ChartWell$Dir <Obey$Dir>
    Set Graf$Scrap <Wimp$ScrapDir>.GraphTemp
    Set Alias$@RunType_C43 /<Obey$Dir>.!Run %%*0
    Set File$Type_C43 ChartOpt

    | Change the line below
    | to alter the font used

    Set ChartWell$Font Homerton.Medium

    IconSprites <Obey$Dir>.!Sprites
    IconSprites <Obey$Dir>.Sprites

    | Change the lines below (and increase WimpSlot)
    | to enable more data points to be plotted

    Set ChartWell$MaxDataPoints 128
    Set ChartWell$MaxDrawfileSize 48k
    Set ChartWell$MaxPathSize 16k

    WimpSlot -min 192k -max 192k
    Run "<ChartWell$Dir>.!RunImage" %*0

  4. Locate the following line:

    Set ChartWell$Font Homerton.Medium

  5. Change it to:

    Set ChartWell$Font Trinity.Medium

  6. Resave the !Run file from Edit.

From now on, when ChartWell is loaded, it will use the Trinity.Medium font.

Increasing the size of data sets

(This section is for advanced users only.)

The !ChartWell.!Run file can be edited to increase the space available for data, allowing the program to accommodate larger data sets. There are three relevant lines in the !Run file:

    Set ChartWell$MaxDataPoints 128
    Set ChartWell$MaxDrawfileSize 48k
    Set ChartWell$MaxPathSize 16k

These values set, respectively, the maximum number of data points, the maximum Draw file size, and the maximum size of each individual path. If the values of these variables are increased, then it may be necessary also to increase the value of WimpSlot, set in the line:

    WimpSlot -min 192k -max 192k

The best way to decide on the amount of extra WimpSlot needed is simply to experiment.

Appendix 2: Curve Fitting Techniques

There are four types of best fit line available in ChartWell. Three of these are best fit curves, one is a simple straight best fit line. All of them display the equation of the line at the top of the graph. The straight best fit line also calculates and displays the coefficient of determination for the data which is the standard measure of correlation for two variables.

The methods of calculation of the best fit lines are given below:

1) Straight best fit line:y = Ax + B
2) Exponential curve:y = A + B ln x
3) Logarithmic curve:ln y = ln A + Bx
4) Power curve:ln y = ln A + B ln x

Correlation calculation:

'r' is the coefficient of correlation, or Pearson's product-moment correlation coefficient. ChartWell displays R^2 (which is the same as r^2). This is the coefficient of determination. The following table may help with its interpretation:

.901.00.811.00Very high
. low

Foundation RISCWorld