Skip to content

Commit

Permalink
Minor fixes after regression testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TorsteinHonsi committed Jun 30, 2014
1 parent 716b337 commit 095c876
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 12 deletions.
13 changes: 10 additions & 3 deletions js/highcharts.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -7254,7 +7254,7 @@ Axis.prototype = {
singlePad;

// Prevent all ticks from being removed (#3195)
if (!startOnTick && !endOnTick && tickPositions.length === 2) {
if (!startOnTick && !endOnTick && !categories && tickPositions.length === 2) {
tickPositions.splice(1, 0, (roundedMax + roundedMin) / 2);
}

Expand Down Expand Up @@ -15349,7 +15349,7 @@ var ColumnSeries = extendClass(Series, {
minPointLength = pick(options.minPointLength, 5),
metrics = series.getColumnMetrics(),
pointWidth = metrics.width,
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // rounded and postprocessed for border width
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
Expand All @@ -15358,9 +15358,16 @@ var ColumnSeries = extendClass(Series, {
yCrisp += 1;
}

// When the pointPadding is 0, we want the columns to be packed tightly, so we allow individual
// columns to have individual sizes. When pointPadding is greater, we strive for equal-width
// columns (#2694).
if (options.pointPadding) {
seriesBarW = mathCeil(seriesBarW);
}

Series.prototype.translate.apply(series);

// record the new values
// Record the new values
each(series.points, function (point) {
var yBottom = pick(point.yBottom, translatedThreshold),
plotY = mathMin(mathMax(-999 - yBottom, point.plotY), yAxis.len + 999 + yBottom), // Don't draw too far outside plot area (#1303, #2241)
Expand Down
13 changes: 10 additions & 3 deletions js/highmaps.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -6989,7 +6989,7 @@ Axis.prototype = {
singlePad;

// Prevent all ticks from being removed (#3195)
if (!startOnTick && !endOnTick && tickPositions.length === 2) {
if (!startOnTick && !endOnTick && !categories && tickPositions.length === 2) {
tickPositions.splice(1, 0, (roundedMax + roundedMin) / 2);
}

Expand Down Expand Up @@ -14201,7 +14201,7 @@ var ColumnSeries = extendClass(Series, {
minPointLength = pick(options.minPointLength, 5),
metrics = series.getColumnMetrics(),
pointWidth = metrics.width,
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // rounded and postprocessed for border width
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
Expand All @@ -14210,9 +14210,16 @@ var ColumnSeries = extendClass(Series, {
yCrisp += 1;
}

// When the pointPadding is 0, we want the columns to be packed tightly, so we allow individual
// columns to have individual sizes. When pointPadding is greater, we strive for equal-width
// columns (#2694).
if (options.pointPadding) {
seriesBarW = mathCeil(seriesBarW);
}

Series.prototype.translate.apply(series);

// record the new values
// Record the new values
each(series.points, function (point) {
var yBottom = pick(point.yBottom, translatedThreshold),
plotY = mathMin(mathMax(-999 - yBottom, point.plotY), yAxis.len + 999 + yBottom), // Don't draw too far outside plot area (#1303, #2241)
Expand Down
13 changes: 10 additions & 3 deletions js/highstock.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -7254,7 +7254,7 @@ Axis.prototype = {
singlePad;

// Prevent all ticks from being removed (#3195)
if (!startOnTick && !endOnTick && tickPositions.length === 2) {
if (!startOnTick && !endOnTick && !categories && tickPositions.length === 2) {
tickPositions.splice(1, 0, (roundedMax + roundedMin) / 2);
}

Expand Down Expand Up @@ -15349,7 +15349,7 @@ var ColumnSeries = extendClass(Series, {
minPointLength = pick(options.minPointLength, 5),
metrics = series.getColumnMetrics(),
pointWidth = metrics.width,
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // rounded and postprocessed for border width
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
Expand All @@ -15358,9 +15358,16 @@ var ColumnSeries = extendClass(Series, {
yCrisp += 1;
}

// When the pointPadding is 0, we want the columns to be packed tightly, so we allow individual
// columns to have individual sizes. When pointPadding is greater, we strive for equal-width
// columns (#2694).
if (options.pointPadding) {
seriesBarW = mathCeil(seriesBarW);
}

Series.prototype.translate.apply(series);

// record the new values
// Record the new values
each(series.points, function (point) {
var yBottom = pick(point.yBottom, translatedThreshold),
plotY = mathMin(mathMax(-999 - yBottom, point.plotY), yAxis.len + 999 + yBottom), // Don't draw too far outside plot area (#1303, #2241)
Expand Down
2 changes: 1 addition & 1 deletion js/parts/Axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ Axis.prototype = {
singlePad;

// Prevent all ticks from being removed (#3195)
if (!startOnTick && !endOnTick && tickPositions.length === 2) {
if (!startOnTick && !endOnTick && !categories && tickPositions.length === 2) {
tickPositions.splice(1, 0, (roundedMax + roundedMin) / 2);
}

Expand Down
11 changes: 9 additions & 2 deletions js/parts/ColumnSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var ColumnSeries = extendClass(Series, {
minPointLength = pick(options.minPointLength, 5),
metrics = series.getColumnMetrics(),
pointWidth = metrics.width,
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // rounded and postprocessed for border width
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
Expand All @@ -166,9 +166,16 @@ var ColumnSeries = extendClass(Series, {
yCrisp += 1;
}

// When the pointPadding is 0, we want the columns to be packed tightly, so we allow individual
// columns to have individual sizes. When pointPadding is greater, we strive for equal-width
// columns (#2694).
if (options.pointPadding) {
seriesBarW = mathCeil(seriesBarW);
}

Series.prototype.translate.apply(series);

// record the new values
// Record the new values
each(series.points, function (point) {
var yBottom = pick(point.yBottom, translatedThreshold),
plotY = mathMin(mathMax(-999 - yBottom, point.plotY), yAxis.len + 999 + yBottom), // Don't draw too far outside plot area (#1303, #2241)
Expand Down
1 change: 1 addition & 0 deletions samples/highcharts/studies/faster-scatter/demo.details
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
name: Highcharts Demo
authors:
- Torstein Hønsi
requiresManualTesting: true
...

0 comments on commit 095c876

Please sign in to comment.