30#define FL_HORBAR_CHART 1
31#define FL_LINE_CHART 2
32#define FL_FILL_CHART 3
33#define FL_SPIKE_CHART 4
35#define FL_SPECIALPIE_CHART 6
37#define FL_FILLED_CHART FL_FILL_CHART
39#define FL_CHART_MAX 128
40#define FL_CHART_LABEL_MAX 18
92 double min,
double max,
int autosize,
int maxnumb,
103 Fl_Chart(
int X,
int Y,
int W,
int H,
const char *L = 0);
109 void add(
double val,
const char *str = 0,
unsigned col = 0);
111 void insert(
int ind,
double val,
const char *str = 0,
unsigned col = 0);
113 void replace(
int ind,
double val,
const char *str = 0,
unsigned col = 0);
119 void bounds(
double *a,
double *b)
const {
124 void bounds(
double a,
double b);
129 int size()
const {
return numb; }
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:1063
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:1120
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1092
#define FL_CHART_LABEL_MAX
max label length for entry
Definition Fl_Chart.H:40
static void draw_horbarchart(int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[], double min, double max, int autosize, int maxnumb, Fl_Color textcolor)
Draws a horizontal bar chart.
Definition Fl_Chart.cxx:100
Fl_Color textcolor() const
Gets the chart's text color.
Definition Fl_Chart.H:160
void insert(int ind, double val, const char *str=0, unsigned col=0)
Inserts a data value val at the given position ind.
Definition Fl_Chart.cxx:412
int size() const
Returns the number of data values in the chart.
Definition Fl_Chart.H:129
void textfont(Fl_Font s)
Sets the chart's text font to s.
Definition Fl_Chart.H:151
static void draw_piechart(int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[], int special, Fl_Color textcolor)
Draws a pie chart.
Definition Fl_Chart.cxx:225
void autosize(uchar n)
Sets whether the chart will automatically adjust the bounds of the chart.
Definition Fl_Chart.H:175
void clear()
Removes all values from the chart.
Definition Fl_Chart.cxx:366
void size(int W, int H)
Sets the widget size (width, height).
Definition Fl_Chart.H:138
void bounds(double *a, double *b) const
Gets the lower and upper bounds of the chart values.
Definition Fl_Chart.H:119
static void draw_barchart(int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[], double min, double max, int autosize, int maxnumb, Fl_Color textcolor)
Draws a bar chart.
Definition Fl_Chart.cxx:46
void textsize(Fl_Fontsize s)
Sets the chart's text size to s.
Definition Fl_Chart.H:157
Fl_Font textfont() const
Gets the chart's text font.
Definition Fl_Chart.H:148
void replace(int ind, double val, const char *str=0, unsigned col=0)
Replaces a data value val at the given position ind.
Definition Fl_Chart.cxx:447
uchar autosize() const
Gets whether the chart will automatically adjust the bounds of the chart.
Definition Fl_Chart.H:169
void add(double val, const char *str=0, unsigned col=0)
Adds the data value val with optional label str and color col to the chart.
Definition Fl_Chart.cxx:380
Fl_Chart(int X, int Y, int W, int H, const char *L=0)
Create a new Fl_Chart widget using the given position, size and label string.
Definition Fl_Chart.cxx:341
int maxsize() const
Gets the maximum number of data values for a chart.
Definition Fl_Chart.H:143
static void draw_linechart(int type, int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[], double min, double max, int autosize, int maxnumb, Fl_Color textcolor)
Draws a line chart.
Definition Fl_Chart.cxx:165
void textcolor(Fl_Color n)
Sets the chart's text color to n.
Definition Fl_Chart.H:163
Fl_Fontsize textsize() const
Gets the chart's text size.
Definition Fl_Chart.H:154
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
unsigned char uchar
unsigned char
Definition fl_types.h:30
For internal use only.
Definition Fl_Chart.H:43
float val
For internal use only.
Definition Fl_Chart.H:44
char str[FL_CHART_LABEL_MAX+1]
For internal use only.
Definition Fl_Chart.H:46
unsigned col
For internal use only.
Definition Fl_Chart.H:45