app/assets/javascripts/highcharts.js in highcharts-rails-4.0.0 vs app/assets/javascripts/highcharts.js in highcharts-rails-4.0.1
- old
+ new
@@ -1,10 +1,10 @@
// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
/**
- * @license Highcharts JS v4.0.0 (2014-04-22)
+ * @license Highcharts JS v4.0.1 (2014-04-24)
*
* (c) 2009-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
@@ -54,11 +54,11 @@
timeUnits,
noop = function () {},
charts = [],
chartCount = 0,
PRODUCT = 'Highcharts',
- VERSION = '4.0.0',
+ VERSION = '4.0.1',
// some constants for frequently used strings
DIV = 'div',
ABSOLUTE = 'absolute',
RELATIVE = 'relative',
@@ -1313,12 +1313,12 @@
thousandsSep: ','
},
global: {
useUTC: true,
//timezoneOffset: 0,
- canvasToolsURL: 'http://code.highcharts.com/4.0.0/modules/canvas-tools.js',
- VMLRadialGradientURL: 'http://code.highcharts.com/4.0.0/gfx/vml-radial-gradient.png'
+ canvasToolsURL: 'http://code.highcharts.com/4.0.1/modules/canvas-tools.js',
+ VMLRadialGradientURL: 'http://code.highcharts.com/4.0.1/gfx/vml-radial-gradient.png'
},
chart: {
//animation: true,
//alignTicks: false,
//reflow: true,
@@ -2811,10 +2811,11 @@
SVGElement.prototype.rotationSetter = SVGElement.prototype.verticalAlignSetter =
SVGElement.prototype.scaleXSetter = SVGElement.prototype.scaleYSetter = function (value, key) {
this[key] = value;
this.doTransform = true;
};
+SVGElement.prototype.strokeSetter = SVGElement.prototype.fillSetter;
// In Chrome/Win < 6 as well as Batik, the stroke attribute can't be set when the stroke-
// width is 0. #1369
@@ -6354,11 +6355,11 @@
align: 'middle', // low, middle or high
//margin: 0 for horizontal, 10 for vertical axes,
//rotation: 0,
//side: 'outside',
style: {
- color: '#707070' // docs
+ color: '#707070'
}
//x: 0,
//y: 0
},
type: 'linear' // linear, logarithmic or datetime
@@ -6669,11 +6670,11 @@
}
}
}
if (ret === UNDEFINED) {
- if (value >= 10000) { // add thousands separators
+ if (mathAbs(value) >= 10000) { // add thousands separators
ret = numberFormat(value, 0);
} else { // small numbers
ret = numberFormat(value, -1, UNDEFINED, ''); // #2466
}
@@ -9559,35 +9560,20 @@
onContainerClick: function (e) {
var chart = this.chart,
hoverPoint = chart.hoverPoint,
plotLeft = chart.plotLeft,
- plotTop = chart.plotTop,
- inverted = chart.inverted,
- chartPosition,
- plotX,
- plotY;
+ plotTop = chart.plotTop;
e = this.normalize(e);
e.cancelBubble = true; // IE specific
if (!chart.cancelClick) {
// On tracker click, fire the series and point events. #783, #1583
if (hoverPoint && this.inClass(e.target, PREFIX + 'tracker')) {
- chartPosition = this.chartPosition;
- plotX = hoverPoint.plotX;
- plotY = hoverPoint.plotY;
- // add page position info
- extend(hoverPoint, {
- pageX: chartPosition.left + plotLeft +
- (inverted ? chart.plotWidth - plotY : plotX),
- pageY: chartPosition.top + plotTop +
- (inverted ? chart.plotHeight - plotX : plotY)
- });
-
// the series click event
fireEvent(hoverPoint.series, 'click', extend(e, {
point: hoverPoint
}));
@@ -10142,11 +10128,11 @@
top;
if (checkbox) {
top = (translateY + checkbox.y + (scrollOffset || 0) + 3);
css(checkbox, {
- left: (alignAttr.translateX + item.legendItemWidth + checkbox.x - 20) + PX,
+ left: (alignAttr.translateX + item.checkboxOffset + checkbox.x - 20) + PX,
top: top + PX,
display: top > translateY - 6 && top < translateY + clipHeight - 6 ? '' : NONE
});
}
});
@@ -10247,13 +10233,14 @@
}
// calculate the positions for the next line
bBox = li.getBBox();
- itemWidth = item.legendItemWidth =
- options.itemWidth || item.legendItemWidth || symbolWidth + symbolPadding + bBox.width + itemDistance +
- (showCheckbox ? 20 : 0);
+ itemWidth = item.checkboxOffset =
+ options.itemWidth ||
+ item.legendItemWidth ||
+ symbolWidth + symbolPadding + bBox.width + itemDistance + (showCheckbox ? 20 : 0);
legend.itemHeight = itemHeight = mathRound(item.legendItemHeight || bBox.height);
// if the item exceeds the width, start a new line
if (horizontal && legend.itemX - initialItemX + itemWidth >
(widthOption || (chart.chartWidth - 2 * padding - initialItemX - options.x))) {
@@ -13225,11 +13212,10 @@
// some API data
point.category = categories && categories[point.x] !== UNDEFINED ?
categories[point.x] : point.x;
-
}
// now that we have the cropped data, build the segments
series.getSegments();
},
@@ -15616,11 +15602,13 @@
// connectorWidth: 1,
// connectorColor: point.color,
// connectorPadding: 5,
distance: 30,
enabled: true,
- format: '{point.name}'
+ formatter: function () {
+ return this.point.name;
+ }
// softConnector: true,
//y: 0
},
ignoreHiddenPoint: true,
//innerSize: 0,
@@ -16939,14 +16927,10 @@
if (seriesTypes.scatter) {
ScatterSeries.prototype.drawTracker = TrackerMixin.drawTrackerPoint;
}
-if (seriesTypes.gauge) {
- seriesTypes.gauge.prototype.drawTracker = TrackerMixin.drawTrackerPoint;
-}
-
/*
* Extend Legend for item events
*/
extend(Legend.prototype, {
@@ -17354,14 +17338,19 @@
halo.attr({ d: [] });
}
point.state = state;
},
+
haloPath: function (size) {
- var chart = this.series.chart;
+ var series = this.series,
+ chart = series.chart,
+ plotBox = series.getPlotBox(),
+ inverted = chart.inverted;
+
return chart.renderer.symbols.circle(
- chart.plotLeft + this.plotX - size,
- chart.plotTop + this.plotY - size,
+ plotBox.translateX + (inverted ? series.yAxis.len - this.plotY : this.plotX) - size,
+ plotBox.translateY + (inverted ? series.xAxis.len - this.plotX : this.plotY) - size,
size * 2,
size * 2
);
}
});