ScatterDraw: Modified distance between ticks

git-svn-id: svn://ultimatepp.org/upp/trunk@6293 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2013-08-29 21:22:11 +00:00
parent fd7cf27d17
commit a6a794ecf2
2 changed files with 6 additions and 6 deletions

View file

@ -299,14 +299,14 @@ void ScatterDraw::FitToData(bool vertical) {
maxx = maxy = maxy2 = DOUBLE_NULL;
for (int j = 0; j < series.GetCount(); j++) {
if (series[j].opacity == 0)
if (series[j].opacity == 0 || series[j].PointsData()->IsExplicit())
continue;
minx = min(minx, series[j].PointsData()->MinX());
maxx = max(maxx, series[j].PointsData()->MaxX());
}
if (vertical) {
for (int j = 0; j < series.GetCount(); j++) {
if (series[j].opacity == 0)
if (series[j].opacity == 0 || series[j].PointsData()->IsExplicit())
continue;
for (int64 i = 0; i < series[j].PointsData()->GetCount(); i++) {
if (series[j].primaryY) {
@ -1050,9 +1050,9 @@ void ScatterDraw::Zoom(double scale, bool mouseX, bool mouseY)
xRange *= scale;
if (!IsNull(maxMajorUnitsX)) {
if (xRange < 2*xMajorUnit)
xMajorUnit /= 10;
xMajorUnit /= 5;
else if (xRange/xMajorUnit > maxMajorUnitsX)
xMajorUnit *= 10;
xMajorUnit *= 5;
AdjustMinUnitX();
}
lastxRange = xRange;

View file

@ -538,7 +538,7 @@ bool ScatterDraw::PlotTexts(T& w, const Size &size, int scale)
standard6.Height(scale*GetStdFont().GetHeight());
if (drawXReticle)
for(int i = 0; xMinUnit + i*xMajorUnit <= xRange; i++){
for(int i = 0; xMinUnit + i*xMajorUnit <= xRange; i++) {
w.DrawLine(fround(plotW*xMinUnit/xRange + i*plotW/(xRange/xMajorUnit)), plotH,
fround(plotW*xMinUnit/xRange + i*plotW/(xRange/xMajorUnit)), plotH + scale*4,
fround(gridWidth*scale), axisColor);
@ -585,7 +585,7 @@ bool ScatterDraw::PlotTexts(T& w, const Size &size, int scale)
}
int borderWidth = fround(gridWidth*scale);
#ifdef flagGUI
#ifdef flagGUI // Control highlight
if (!IsNull(highlight_0)) {
double delayFactor = 4*(1000. - (GetTickCount() - highlight_0))/1000.;
if (delayFactor < 1) {