MacArthur, Ian (SELEX GALILEO, UK) wrote:

> 
>> I am using one Fl_Chart to show several graphs. I have a
>> button for each
>> graph. When the button is selected, it calls clear() on the
>> Fl_Chart before
>> populating it with the data.
>> 
>> The problem I am seeing is that the Fl_Chart does not reset/clear its
>> bounds. I have the Fl_Chart determine the bounds automagically using
>> autosize(true).
>> 
>> Should Fl_Chart::clear() not only clear the values but also
>> the automatic
>> bounds as well? If this is a bug, then I'm willing to write a
>> patch and
>> submit it as a bug report.
> 
> I don't know, but it sure sounds like a bug. Probably best to file an
> STR in any case.
> 
> Does toggling autosize off/on help, maybe? (Just a thought, as a
> workaround...)

Toggling autosize didn't work. After reading the source, I belive that the
problem is with the min and max bounds (Y-axis). After clearing the chart,
I called bounds(0,0) which forces a min and max to be recalculated. This
fixed the problem.

I will submit a bug report. At the very least, the documentation for
Fl_Chart::clear() should mention this. Currently it implies that the chart
is put in a neutral state.

Thanks,

-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to