> Hello for the following code how do i change the colour of the value labeling > of the bar charts (val_str in this case) ? Thanks! > > > //code from http://seriss.com/people/erco/fltk/#add_fd > #include <FL/Fl.H> > #include <FL/Fl_Window.H> > #include <FL/Fl_Chart.H> > #include <math.h> > // Demonstration of how to use Fl_Chart -- erco 11/20/08 > int main() { > Fl_Window *win = new Fl_Window(1000, 480); > Fl_Chart *chart = new Fl_Chart(20, 20, win->w()-40, win->h()-40, > "Chart"); > chart->bounds(-125.0, 125.0); > for ( double t=0; t<15; t+=0.5 ) > { > double val = sin(t) * 125.0; > static char val_str[20]; > sprintf(val_str, "%.0lf", val); > chart->add(val, val_str, (val<0)?FL_RED:FL_GREEN); > } > win->resizable(win); > win->show(); > return(Fl::run()); > }
Hello,just to add on to my question. I wanna change the "text colour" for some selected bar only. For instance, bar chart with value less then 50 will be have a "red number label" below the bar chart and else it will be blue colour. Thank you! _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

