00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <stdio.h>
00016 #include <values.h>
00017
00018 #include "gdc.h"
00019 #include "gdchart.h"
00020
00021
00022 main()
00023 {
00024
00025 float h[12] = { 17.8, 17.1, 17.3, GDC_NOVALUE, 17.2, 17.1,
00026 17.3, 17.3, 17.3, 17.1, 17.5, 17.4 };
00027
00028 float c[12] = { 17.0, 16.8, 16.9, GDC_NOVALUE, 16.9, 16.8,
00029 17.2, 16.8, 17.0, 16.9, 16.4, 16.1 };
00030
00031 float l[12] = { 16.8, 16.8, 16.7, GDC_NOVALUE, 16.5, 16.0,
00032 16.1, 16.8, 16.5, 16.9, 16.2, 16.0 };
00033
00034 float v[12] = { 150.0, 100.0, 340.0, GDC_NOVALUE, 999.0, 390.0,
00035 420.0, 150.0, 100.0, 340.0, 1590.0, 700.0 };
00036 char *t[12] = { "May", "Jun", "Jul", "Aug", "Sep", "Oct",
00037 "Nov", "Dec", "Jan", "Feb", "Mar", "Apr" };
00038
00039
00040
00041
00042 GDC_ANNOTATION_T anno;
00043
00044
00045 FILE *outgif1 = fopen( "g2.gif", "wb" );
00046
00047
00048 anno.color = 0x00FF00;
00049 strncpy( anno.note, "Did Not\nTrade", MAX_NOTE_LEN );
00050 anno.point = 3;
00051 GDC_annotation_font = GDC_TINY;
00052 GDC_annotation = &anno;
00053
00054 GDC_HLC_style = GDC_HLC_I_CAP | GDC_HLC_CLOSE_CONNECTED;
00055 GDC_HLC_cap_width = 45;
00056
00057 GDC_bar_width = 75;
00058
00059
00060
00061 GDC_title = "Widget Corp.";
00062 GDC_ytitle = "Price ($)";
00063 GDC_ytitle2 = "Volume (K)";
00064 GDC_ytitle_size = GDC_SMALL;
00065 GDC_VolColor = 0x4040FFL;
00066 GDC_3d_depth = 4.0;
00067
00068
00069 GDC_PlotColor = 0xFFFFFF;
00070 GDC_grid = FALSE;
00071
00072
00073
00074
00075
00076 out_graph( 200, 175,
00077 outgif1,
00078 GDC_COMBO_HLC_AREA,
00079 12,
00080 t,
00081 1,
00082 h,
00083 l,
00084 c,
00085 v );
00086
00087 fclose( outgif1 );
00088 exit(0);
00089 }