Hello Bjoern,
Bjoern Milcke schrieb:
Hi Regina,
Hello,
I have written a calc-dokument which visualizes the Riemann sums of a
definite integral, see
http://www.rhenschel.homepage.t-online.de/oberuntersumme.ods
It uses macros, which draw rectangles into a diagram. It works fine in
OOo2.2, but with the new chart I get a runtime error, if I press
"Rechtecke neu zeichnen" which calls TreppenAktalisieren. I guess that
the amount of default objects (like title or legend) in a diagram has
changed.
There might be something else in addition.
Nice Document/Chart!
First of all, the "Model" of the new chart no longer is derived from a
draw model, that is it contains no shapes at all. (The shapes are
contained in the view). So, when you add your own shapes, these are the
only ones.
I fear, I'm not advanced enough to understand it and see the
consequences without help.
In short:
change "Const MIN_INDEX% = 2" to "Const MIN_INDEX% = 0"
That seems to solve the IndexOutOfBoundsException. But the rectangles
are not drawn.
I noticed also that the chart is not automatically updated. I haven't
investigated, but maybe adding/removing of "additional" shapes does not
trigger a modified state that refreshes the view. Only way to get the
correct chart seems to be double click (unprotected) chart. The chart
also behaves a bit weird, changes to the series or legend, etc. seem to
have no effect.
In use, there should be no need to add/remove rectangles. There are
always 2x250 rectangle present, most of them will be invisible because
there are transparent. Changing the settings in Column B will (on
command with the button) change the position, size, and transparency of
the rectangles.
When you change the function in B2 or the x-range in B3 or B4 press
"Wertetabelle neu berechnen" to get the new graph and afterwards press
"Rechtecke neu zeichnen" to get the adapted rectangles. If you only
change the settings for the rectangles in B8, B9, or B10, "Rechtecke neu
zeichnen" will show the changes (at least in OOo2.2 it does).
I will investigate this when back at work (where I also have a more
recent build).
It is nice, that you will have a closer look. It is only a sheet where
pupils can explore the integral; getting it work would be good nevertheless.
kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]