1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <TITLE>Fl_Chart</TITLE> |
---|
4 | </HEAD> |
---|
5 | <BODY> |
---|
6 | <!-- NEW PAGE --> |
---|
7 | <H2><A name=Fl_Chart>class Fl_Chart</A></H2> |
---|
8 | <HR> |
---|
9 | <H3>Class Hierarchy</H3> |
---|
10 | <UL> |
---|
11 | <PRE> |
---|
12 | <A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A> |
---|
13 | | |
---|
14 | +----<B>Fl_Chart</B> |
---|
15 | </PRE> |
---|
16 | </UL> |
---|
17 | <H3>Include Files</H3> |
---|
18 | <UL> |
---|
19 | <PRE> |
---|
20 | #include <FL/Fl_Chart.H> |
---|
21 | </PRE> |
---|
22 | </UL> |
---|
23 | <H3>Description</H3> |
---|
24 | This widget displays simple charts and is provided for Forms compatibility. |
---|
25 | <CENTER><IMG src="charts.gif" width="80%" alt="Fl_Chart widget"></CENTER> |
---|
26 | <H3>Methods</H3> |
---|
27 | <CENTER> |
---|
28 | <TABLE width=90% summary="Fl_Chart methods."> |
---|
29 | <TR><TD align=left valign=top> |
---|
30 | <UL> |
---|
31 | <LI><A href=#Fl_Chart.Fl_Chart>Fl_Chart</A></LI> |
---|
32 | <LI><A href=#Fl_Chart.~Fl_Chart>~Fl_Chart</A></LI> |
---|
33 | <LI><A href=#Fl_Chart.add>add</A></LI> |
---|
34 | </UL> |
---|
35 | </TD><TD align=left valign=top> |
---|
36 | <UL> |
---|
37 | <LI><A href=#Fl_Chart.autosize>autosize</A></LI> |
---|
38 | <LI><A href=#Fl_Chart.bounds>bounds</A></LI> |
---|
39 | </UL> |
---|
40 | </TD><TD align=left valign=top> |
---|
41 | <UL> |
---|
42 | <LI><A href=#Fl_Chart.clear>clear</A></LI> |
---|
43 | <LI><A href=#Fl_Chart.insert>insert</A></LI> |
---|
44 | </UL> |
---|
45 | </TD><TD align=left valign=top> |
---|
46 | <UL> |
---|
47 | <LI><A href=#Fl_Chart.maxsize>maxsize</A></LI> |
---|
48 | <LI><A href=#Fl_Chart.replace>replace</A></LI> |
---|
49 | </UL> |
---|
50 | </TD><TD align=left valign=top> |
---|
51 | <UL> |
---|
52 | <LI><A href=#Fl_Chart.size>size</A></LI> |
---|
53 | <LI><A href=#Fl_Chart.type>type</A></LI> |
---|
54 | </UL> |
---|
55 | </TD></TR> |
---|
56 | </TABLE> |
---|
57 | </CENTER> |
---|
58 | <H4><A name=Fl_Chart.Fl_Chart>Fl_Chart::Fl_Chart(int x, int y, int w, |
---|
59 | int h, const char *label = 0)</A></H4> |
---|
60 | Creates a new <TT>Fl_Chart</TT> widget using the given position, size, |
---|
61 | and label string. The default boxtype is <TT>FL_NO_BOX</TT>. |
---|
62 | <H4><A name=Fl_Chart.~Fl_Chart>virtual Fl_Chart::~Fl_Chart()</A></H4> |
---|
63 | Destroys the <TT>Fl_Chart</TT> widget and all of its data. |
---|
64 | <H4><A name=Fl_Chart.add>void add(double value, const char *label = |
---|
65 | NULL, uchar color = 0)</A></H4> |
---|
66 | The <TT>add</TT> method adds the <TT>value</TT> and optionally <TT> |
---|
67 | label</TT> and <TT>color</TT> to the chart. |
---|
68 | <H4><A name=Fl_Chart.autosize>uchar autosize(void) const |
---|
69 | <BR> void autosize(uchar onoff)</A></H4> |
---|
70 | The <TT>autosize</TT> method controls whether or not the chart will |
---|
71 | automatically adjust the bounds of the chart. The first form returns a |
---|
72 | boolean value that is non-zero if auto-sizing is enabled and zero is |
---|
73 | auto-sizing is disabled. |
---|
74 | <P>The second form of <TT>autosize</TT> sets the auto-sizing property |
---|
75 | to <TT>onoff</TT>. </P> |
---|
76 | <H4><A name=Fl_Chart.bounds>void bounds(double *a, double *b) |
---|
77 | <BR> void bounds(double a, double b)</A></H4> |
---|
78 | The <TT>bounds</TT> method gets or sets the lower and upper bounds of |
---|
79 | the chart values to <TT>a</TT> and <TT>b</TT> respectively. |
---|
80 | <H4><A name=Fl_Chart.clear>void clear(void)</A></H4> |
---|
81 | The <TT>clear</TT> method removes all values from the chart. |
---|
82 | <H4><A name=Fl_Chart.insert>void insert(int pos, double value, const |
---|
83 | char *label = NULL, uchar color = 0)</A></H4> |
---|
84 | The <TT>insert</TT> method inserts a data value at the given position <TT> |
---|
85 | pos</TT>. Position 1 is the first data value. |
---|
86 | <H4><A name=Fl_Chart.maxsize>int maxsize(void) const |
---|
87 | <BR> void maxsize(int n)</A></H4> |
---|
88 | The <TT>maxsize</TT> method gets or sets the maximum number of data |
---|
89 | values for a chart. If you do not call this method then the chart will |
---|
90 | be allowed to grow to any size depending on available memory. |
---|
91 | <H4><A name=Fl_Chart.replace>void replace(int pos, double value, const |
---|
92 | char *label = NULL, uchar color = 0)</A></H4> |
---|
93 | The <TT>replace</TT> method replaces data value <TT>pos</TT> with <TT> |
---|
94 | value</TT>, <TT>label</TT>, and <TT>color</TT>. Position 1 is the |
---|
95 | first data value. |
---|
96 | <H4><A name=Fl_Chart.size>int size(void) const</A></H4> |
---|
97 | The <TT>size</TT> method returns the number of data values in the |
---|
98 | chart. |
---|
99 | <H4><A name=Fl_Chart.type>uchar type() const |
---|
100 | <BR> void type(uchar t)</A></H4> |
---|
101 | The first form of <TT>type()</TT> returns the current chart type. The |
---|
102 | chart type can be one of the following: |
---|
103 | <DL> |
---|
104 | <DT>FL_BAR_CHART</DT> |
---|
105 | <DD>Each sample value is drawn as a vertical bar.</DD> |
---|
106 | <DT>FL_FILLED_CHART</DT> |
---|
107 | <DD>The chart is filled from the bottom of the graph to the sample |
---|
108 | values.</DD> |
---|
109 | <DT>FL_HORBAR_CHART</DT> |
---|
110 | <DD>Each sample value is drawn as a horizontal bar.</DD> |
---|
111 | <DT>FL_LINE_CHART</DT> |
---|
112 | <DD>The chart is drawn as a polyline with vertices at each sample |
---|
113 | value.</DD> |
---|
114 | <DT>FL_PIE_CHART</DT> |
---|
115 | <DD>A pie chart is drawn with each sample value being drawn as a |
---|
116 | proportionate slice in the circle.</DD> |
---|
117 | <DT>FL_SPECIALPIE_CHART</DT> |
---|
118 | <DD>Like FL_PIE_CHART, but the first slice is separated from the pie.</DD> |
---|
119 | <DT>FL_SPIKE_CHART</DT> |
---|
120 | <DD>Each sample value is drawn as a vertical line.</DD> |
---|
121 | </DL> |
---|
122 | The second form of <TT>type()</TT> sets the chart type to <TT>t</TT>. |
---|
123 | </BODY></HTML> |
---|