This is a simple graphic creation project. The aim is to write a small java programme such that it will take in a set of parameters and accordingly create a “radar chart” to be superposed on a picture/graphic image.
There is this circular outline, which has a variable radius. The radius will be one of the parameters in the specification. There are 6 spokes in the frame, equally distributed across the circle. The picture looks as follows. See image.
Each of the 6 spokes has the length of the radius, and is equal to 100%. There will be a set of 6 floating point numbers in an array as input. These numbers are between 0 and 100, representing 0% to 100%. So, corresponding to (A,B,C,D,E,F) there will be (n1,n2,n3,n4,n5,n6). The number is used to indicate the position on the corresponding spoke. For example, if A corresponds to 78, then that marks a point at 78% of the spoke A. So, if an array looks like (78,26,89,70,81,69) then the graph as shown on the right is to be created. A, B, C etc and the spokes, drawn in dotted lines, are mainly for explanation purposes. They may or may not be needed in the final delivery. In fact the entire non- shaded area may not be required to appear either. The program must allow the non-shaded area to be totally hidden from view. See image.
Shaded area requirements:
This shaded area is to be created and superposed on top of the original picture. The shaded area should
- be in a single colour, programmatically settable ;
- be in different degree of transparency/opacity, settable by % ;
- allow both the edges surrounding the shaded area to be shown or not shown, and in a colour that can be defined; both settable;
- show the percentage value (like 78%) as shown in the diagram below; the colour, size and font of the characters as well as the size and colour of background of that text box should be settable.
- The “A”, “B”, “C” etc, as well as the 6 spokes leading from the centre to the “A”, “B”, “C”, should be capable of being hidden, settable ;
- Similarly, the non-shaded area should be allowed to be hidden, leaving only the shaded area on top of the picture. Below right shows the potential graphic to be added on top of the picture; settable ;
- be drawn according to the value of radius, meaning the diagram will resize according to the circular frame ; radius is settable. See image.
- The shaded area is currently indicated by stripes. In the final result there shall be no stripes, only a transparent colour overlay within the edges of the “radar”.
- There should be two inputs to the java program. The first would be the “init file”. All the settable variables mentioned above should be kept in this file, and when the program starts, it reads from this file all setting values. In the program itself, there should be a default setting such that should the init file be missing, the program will run correctly and normally. The actual picture/graphic file name (complete path) should be placed in the init file too. This may be modified by the second input later, but that is another separate level of control.
- The second input to the program will be the parameters. The most important parameters are the input array (A, B, C, D, E, F), and possibly a different picture from that specified in the init file.
- The picture / graphic will be given in one of the various standard formats, such as jpeg or png.
- In the picture / graphic is a point corresponding to the centre of a circular outline.
A java program that allows for a set of parameter inputs, using which the shaded area is produced and superposed on a picture and the end combined result in the same graphic/picture format is returned.