Hello,
We allow our users to resize the charts. One of them went ahead and resized the chart to 0 width.
This causes a divide by zero error in:
TTeeCanvas3D.CalcPerspective
because chartRect.right-chartRect.left=0
you may want to fix this.
divide by zero error
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact:
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact:
To solve this becomes part of a bigger issue. The way you have implemented the code, there does not seem to be a way to ask
"What size will the chartRect be given the current plot options, size etc."
The draw method gets called
then InternalCanvas.initWindow
then adjustChartBounds
So, before the chart is drawn for the first time, the chartRect is 0 width, but the draw method resizes it.
However, if the chartREct is really supposed to be 0, (lets say I have a really long legend, or make a really small plot) then the chartRect is still zero and does not get resized.
It would be great if you could break the resizing code and make a method called:
getNewChartRect which will return what the chartrect wil be when it is eventually recalculated.
"What size will the chartRect be given the current plot options, size etc."
The draw method gets called
then InternalCanvas.initWindow
then adjustChartBounds
So, before the chart is drawn for the first time, the chartRect is 0 width, but the draw method resizes it.
However, if the chartREct is really supposed to be 0, (lets say I have a really long legend, or make a really small plot) then the chartRect is still zero and does not get resized.
It would be great if you could break the resizing code and make a method called:
getNewChartRect which will return what the chartrect wil be when it is eventually recalculated.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
Thanks for your suggestion. I've already added it to our wish-list to be considered for future releases.
Thanks for your suggestion. I've already added it to our wish-list to be considered for future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |