Home » U++ Library support » ScatterDraw & ScatterCtrl » zooming produces too many labels on x axis
zooming produces too many labels on x axis [message #44416] |
Sun, 08 March 2015 23:11 ![Go to next message Go to next message](theme/default/images/down.png) |
aftershock
Messages: 143 Registered: May 2008
|
Experienced Member |
|
|
Hi,
I am using scatterdraw.
If I turn on xhart.chart.SetMouseHandling ( true, false ); I can zoom using the mouse button 3.
It works for a while
Then once a while.. too many ticks, labels appear... Labels starts cover each other, making them unreadable Meaning MajorUnits becomes too small
Then if I zoom again, it becomes ok again.
There is an option that can be used SetMajorUnitsNum(5,Nuller()) that works without zooming.
Once zooming starts , it is forgotten time by time.
Zooming could be fixed by maximizing the number of ticks for zooming...
Or meaking MajorUnitsNum fixed or both.
If I use Window zooming, ctrl+ mouse, the grid becmoes too dense again . Is there way to set that? I have been looking at the source, I have not found the parameter that causes that.
IS there way to set minimum grid size that is honoured by zooming?
Can you fix this?
Aftershock
[Updated on: Sun, 08 March 2015 23:32] Report message to a moderator
|
|
|
Re: zooming produces too many labels on x axis [message #44417 is a reply to message #44416] |
Mon, 09 March 2015 00:24 ![Go to previous message Go to previous message](theme/default/images/up.png) |
aftershock
Messages: 143 Registered: May 2008
|
Experienced Member |
|
|
I found the code
This is the fix of line 1138 in scatterDraw.cpp
Quote:if (!IsNull(maxMajorUnitsX)) {
if (xRange < 2*xMajorUnit)
xMajorUnit = xRange/maxMajorUnitsX;
else if (xRange/xMajorUnit > maxMajorUnitsX)
xMajorUnit = xRange/maxMajorUnitsX;
AdjustMinUnitX();
}
Probably similar fix needed for this
Quote:if (!IsNull(maxMajorUnitsY)) {
if (yRange < 2*yMajorUnit) {
yMajorUnit /= 5;
yMajorUnit2 /= 5;
} else if (yRange/yMajorUnit > maxMajorUnitsY) {
yMajorUnit *= 5;
yMajorUnit2 *= 5;
}
AdjustMinUnitY();
}
yMajorUnit = yRange/maxMajorUnitsy;
aftershock
[Updated on: Thu, 12 March 2015 09:49] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Sep 01 06:56:01 CEST 2024
Total time taken to generate the page: 0.01696 seconds
|