Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ScatterDraw & ScatterCtrl » bug in scatterdraw.h and its fix
bug in scatterdraw.h and its fix [message #48026] Thu, 11 May 2017 15:15 Go to previous message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member
Hi,

I found a bug in scatterdraw.h in ScatterDraw::Plot.

around here
double xx, yy;
if (fastViewX) {
yy = series[j].PointsData()->y(i);
if (IsNull(yy)) {
++i;
continue;
}
int64 ii;
double maxv = dxpix*npix;
double maxY = yy, minY = yy;
for (ii = 1; i + ii < imax && series[j].PointsData()->x(i + ii) < maxv; ++ii) {
double dd = series[j].PointsData()->y(i + ii);
if (IsNull(dd))
continue;
//yy += dd;
maxY = max(maxY, dd);
minY




this line is incorrect
double maxv = dxpix*npix;

the fix is
double maxv = series[j].PointsData()->x(imin)+ dxpix*npix;

The bug causes to have extra points on the graph.. which is ugly, on the left..
a lot of points..

Enjoy!

 
Read Message
Read Message
Previous Topic: ScatterCtrl Difference in Debug and Release mode.
Next Topic: Use function pointer
Goto Forum:
  


Current Time: Fri Apr 19 01:20:55 CEST 2024

Total time taken to generate the page: 0.02323 seconds