Permalink
Browse files

Merge remote-tracking branch 'origin/master' into test/test-template

  • Loading branch information...
sophiebremer committed Aug 16, 2018
2 parents 553edd6 + 3306051 commit b8568ccef9c9b2de02e5ed05ba2de646adb2bbf7
Showing with 4,636 additions and 3,443 deletions.
  1. +25 −25 js/modules/histogram.src.js
  2. +95 −62 js/parts/AreaSeries.js
  3. +1,208 −737 js/parts/Options.js
  4. +20 −9 js/parts/RangeSelector.js
  5. +1,098 −761 js/parts/Series.js
  6. +150 −15 js/parts/Tooltip.js
  7. +2 −2 package.json
  8. 0 .../{issues/highcharts-4.0.1/3027-axis-title-offset → highcharts/chart/height-negative}/demo.details
  9. 0 .../{issues/highcharts-4.0.1/3075-touch-pan-categories → highcharts/chart/height-negative}/demo.html
  10. +1 −1 ...s/{issues/highcharts-4.0.1/3080-negative-height-error → highcharts/chart/height-negative}/demo.js
  11. 0 ...0.1/2997-solidgauge-past-full-circle → highcharts/series-gauge/neg-yaxis-background}/demo.details
  12. 0 ...s-4.0.1/3010-gauge-neg-yaxis-background → highcharts/series-gauge/neg-yaxis-background}/demo.html
  13. +4 −0 ...rts-4.0.1/3010-gauge-neg-yaxis-background → highcharts/series-gauge/neg-yaxis-background}/demo.js
  14. 0 ...charts-4.0.1/3007-halo-invisible-point → highcharts/series-solidgauge/data-overflow}/demo.details
  15. 0 ...ts-4.0.1/2997-solidgauge-past-full-circle → highcharts/series-solidgauge/data-overflow}/demo.html
  16. +30 −0 samples/highcharts/series-solidgauge/data-overflow/demo.js
  17. 0 ...ssues/highcharts-4.0.1/3028-linked-series-update → highcharts/series-waterfall/data}/demo.details
  18. 0 ...ssues/highcharts-4.0.1/3151-waterfall-small-columns → highcharts/series-waterfall/data}/demo.html
  19. +1 −1 ...{issues/highcharts-4.0.1/3151-waterfall-small-columns → highcharts/series-waterfall/data}/demo.js
  20. 0 ...rts-4.0.1/1991-stack-missing-values → highcharts/series-waterfall/isintermediatesum}/demo.details
  21. 0 ...4.0.1/2227-waterfall-isintermediatesum → highcharts/series-waterfall/isintermediatesum}/demo.html
  22. +50 −0 samples/highcharts/series-waterfall/isintermediatesum/demo.js
  23. 0 ....1/2227-waterfall-isintermediatesum → highcharts/stacking/area-stack-missing-values}/demo.details
  24. 0 ...charts-4.0.1/1991-stack-missing-values → highcharts/stacking/area-stack-missing-values}/demo.html
  25. +22 −0 samples/highcharts/stacking/area-stack-missing-values/demo.js
  26. +0 −24 samples/issues/highcharts-4.0.1/1991-stack-missing-values/demo.js
  27. +0 −56 samples/issues/highcharts-4.0.1/2227-waterfall-isintermediatesum/demo.js
  28. +0 −29 samples/issues/highcharts-4.0.1/2997-solidgauge-past-full-circle/demo.js
  29. +0 −2 samples/issues/highcharts-4.0.1/3007-halo-invisible-point/demo.html
  30. +0 −26 samples/issues/highcharts-4.0.1/3007-halo-invisible-point/demo.js
  31. +0 −18 samples/issues/highcharts-4.0.1/3007-halo-invisible-point/test.js
  32. +0 −5 samples/issues/highcharts-4.0.1/3010-gauge-neg-yaxis-background/demo.details
  33. +0 −5 samples/issues/highcharts-4.0.1/3016-halo-sliced-pie/demo.details
  34. +0 −3 samples/issues/highcharts-4.0.1/3016-halo-sliced-pie/demo.html
  35. +0 −20 samples/issues/highcharts-4.0.1/3016-halo-sliced-pie/demo.js
  36. +0 −18 samples/issues/highcharts-4.0.1/3016-halo-sliced-pie/test.js
  37. +0 −15 samples/issues/highcharts-4.0.1/3017-columnrange-align-datalabels/demo.css
  38. +0 −5 samples/issues/highcharts-4.0.1/3017-columnrange-align-datalabels/demo.details
  39. +0 −5 samples/issues/highcharts-4.0.1/3017-columnrange-align-datalabels/demo.html
  40. +0 −83 samples/issues/highcharts-4.0.1/3017-columnrange-align-datalabels/demo.js
  41. +0 −4 samples/issues/highcharts-4.0.1/3027-axis-title-offset/demo.html
  42. +0 −36 samples/issues/highcharts-4.0.1/3027-axis-title-offset/demo.js
  43. +0 −3 samples/issues/highcharts-4.0.1/3028-linked-series-update/demo.html
  44. +0 −43 samples/issues/highcharts-4.0.1/3028-linked-series-update/demo.js
  45. +0 −10 samples/issues/highcharts-4.0.1/3028-linked-series-update/test.js
  46. +0 −5 samples/issues/highcharts-4.0.1/3040-scrolling-outside-range-1/demo.details
  47. +0 −8 samples/issues/highcharts-4.0.1/3040-scrolling-outside-range-1/demo.html
  48. +0 −67 samples/issues/highcharts-4.0.1/3040-scrolling-outside-range-1/demo.js
  49. +0 −5 samples/issues/highcharts-4.0.1/3040-scrolling-outside-range-2/demo.details
  50. +0 −8 samples/issues/highcharts-4.0.1/3040-scrolling-outside-range-2/demo.html
  51. +0 −67 samples/issues/highcharts-4.0.1/3040-scrolling-outside-range-2/demo.js
  52. +0 −5 samples/issues/highcharts-4.0.1/3053-cropping-log-axis/demo.details
  53. +0 −3 samples/issues/highcharts-4.0.1/3053-cropping-log-axis/demo.html
  54. +0 −24 samples/issues/highcharts-4.0.1/3053-cropping-log-axis/demo.js
  55. +0 −5 samples/issues/highcharts-4.0.1/3075-touch-pan-categories/demo.details
  56. +0 −21 samples/issues/highcharts-4.0.1/3075-touch-pan-categories/demo.js
  57. +0 −37 samples/issues/highcharts-4.0.1/3075-touch-pan-categories/test.js
  58. +0 −5 samples/issues/highcharts-4.0.1/3080-negative-height-error/demo.details
  59. +0 −5 samples/issues/highcharts-4.0.1/3080-negative-height-error/demo.html
  60. +0 −5 samples/issues/highcharts-4.0.1/3094-series-update-zindex/demo.details
  61. +0 −5 samples/issues/highcharts-4.0.1/3094-series-update-zindex/demo.html
  62. +0 −49 samples/issues/highcharts-4.0.1/3094-series-update-zindex/demo.js
  63. +0 −5 samples/issues/highcharts-4.0.1/3094-series-update-zindex/test.js
  64. +0 −5 samples/issues/highcharts-4.0.1/3098-plot-area-update/demo.details
  65. +0 −7 samples/issues/highcharts-4.0.1/3098-plot-area-update/demo.html
  66. +0 −161 samples/issues/highcharts-4.0.1/3098-plot-area-update/demo.js
  67. +0 −5 samples/issues/highcharts-4.0.1/3098-plot-area-update/test.js
  68. +0 −5 samples/issues/highcharts-4.0.1/3104-touch-pan-axis-extremes/demo.details
  69. +0 −5 samples/issues/highcharts-4.0.1/3104-touch-pan-axis-extremes/demo.html
  70. +0 −35 samples/issues/highcharts-4.0.1/3104-touch-pan-axis-extremes/demo.js
  71. +0 −39 samples/issues/highcharts-4.0.1/3104-touch-pan-axis-extremes/test.js
  72. +0 −5 samples/issues/highcharts-4.0.1/3132-svg-text-wrap/demo.details
  73. +0 −3 samples/issues/highcharts-4.0.1/3132-svg-text-wrap/demo.html
  74. +0 −33 samples/issues/highcharts-4.0.1/3132-svg-text-wrap/demo.js
  75. +0 −5 samples/issues/highcharts-4.0.1/3151-waterfall-small-columns/demo.details
  76. +0 −5 samples/issues/highcharts-4.0.1/3158-text-word-wrap/demo.details
  77. +0 −2 samples/issues/highcharts-4.0.1/3158-text-word-wrap/demo.html
  78. +0 −15 samples/issues/highcharts-4.0.1/3158-text-word-wrap/demo.js
  79. +0 −5 samples/issues/highcharts-4.0.1/3163-pie-labels-outside-plot/demo.details
  80. +0 −2 samples/issues/highcharts-4.0.1/3163-pie-labels-outside-plot/demo.html
  81. +0 −61 samples/issues/highcharts-4.0.1/3163-pie-labels-outside-plot/demo.js
  82. +0 −5 samples/issues/highcharts-4.0.1/3195-no-ticks-on-short-axis/demo.details
  83. +0 −2 samples/issues/highcharts-4.0.1/3195-no-ticks-on-short-axis/demo.html
  84. +0 −52 samples/issues/highcharts-4.0.1/3195-no-ticks-on-short-axis/demo.js
  85. +2 −2 samples/unit-tests/3d/column-crop/demo.js
  86. +148 −28 samples/unit-tests/axis/extremes/demo.js
  87. +44 −0 samples/unit-tests/axis/ticks/demo.js
  88. +30 −0 samples/unit-tests/axis/title/demo.js
  89. +54 −0 samples/unit-tests/axis/type-logarithmic/demo.js
  90. +83 −0 samples/unit-tests/chart/setsize/demo.js
  91. +52 −3 samples/unit-tests/navigator/navigator/demo.js
  92. +20 −39 samples/unit-tests/pointer/members/demo.js
  93. +1 −2 samples/unit-tests/pointer/touch/demo.js
  94. +128 −0 samples/unit-tests/scrollbar/extremes/demo.js
  95. +0 −8 samples/unit-tests/series-columnrange/columnrange/demo.html
  96. +0 −30 samples/unit-tests/series-columnrange/columnrange/demo.js
  97. +76 −0 samples/unit-tests/series-columnrange/datalabel/demo.js
  98. +37 −0 samples/unit-tests/series-columnrange/points/demo.js
  99. +10 −9 samples/unit-tests/series-histogram/histogram/demo.js
  100. +1 −2 samples/unit-tests/series-map/nullinteraction/demo.js
  101. 0 samples/unit-tests/{series-columnrange/columnrange → series-pie/datalabel}/demo.details
  102. 0 samples/unit-tests/series-pie/{point-datalabel-distance → datalabel}/demo.html
  103. +132 −0 samples/unit-tests/series-pie/datalabel/demo.js
  104. +257 −0 samples/unit-tests/series-pie/mouseover/demo.js
  105. +0 −6 samples/unit-tests/series-pie/point-datalabel-distance/demo.details
  106. +0 −73 samples/unit-tests/series-pie/point-datalabel-distance/demo.js
  107. +1 −1 samples/unit-tests/series-sankey/sankey/demo.js
  108. +2 −2 samples/unit-tests/series-sunburst/allowdrilltonode/demo.js
  109. +65 −1 samples/unit-tests/series/linkedto/demo.js
  110. +60 −0 samples/unit-tests/series/update/demo.js
  111. +19 −17 samples/unit-tests/svgrenderer/animate/demo.js
  112. +37 −0 samples/unit-tests/svgrenderer/label/demo.js
  113. +37 −0 samples/unit-tests/svgrenderer/text/demo.js
  114. +2 −2 samples/unit-tests/tooltip/formatter/demo.js
  115. +4 −1 test/.eslintrc
  116. +25 −0 test/templates/highcharts/scatter.js
  117. +485 −328 test/test-controller.js
  118. +80 −63 tools/jsdoc/plugins/highcharts.jsdoc.js
  119. +38 −17 tools/jsdoc/plugins/highcharts.namespace.js
@@ -18,7 +18,9 @@ var each = H.each,
isNumber = H.isNumber,
arrayMax = H.arrayMax,
arrayMin = H.arrayMin,
merge = H.merge;
merge = H.merge,
keys = H.keys,
map = H.map;
/* ***************************************************************************
*
@@ -50,23 +52,16 @@ var binsNumberFormulas = {
* @param {number} binWidth - width of the bin
* @returns {function}
**/
function fitToBinLeftClosed(binWidth) {
function fitToBinLeftClosed(bins) {
return function (y) {
return Math.floor(y / binWidth) * binWidth;
var i = 1;
while (bins[i] <= y) {
i++;
}
return bins[--i];
};
}
/**
* Identity function - takes a param and returns that param
* It is used to grouping data with the same values
*
* @param {number} y - value
* @returns {number}
**/
function identity(y) {
return y;
}
/**
* Histogram class
*
@@ -139,22 +134,27 @@ seriesType('histogram', 'column', {
x,
fitToBin;
binWidth = this.binWidth = isNumber(binWidth) ?
binWidth :
(max - min) / binsNumber;
fitToBin = binWidth ? fitToBinLeftClosed(binWidth) : identity;
binWidth = this.binWidth = correctFloat(
isNumber(binWidth) ?
(binWidth || 1) :
(max - min) / binsNumber
);
// If binWidth is 0 then max and min are equaled,
// increment the x with some positive value to quit the loop
for (
x = fitToBin(min);
x <= max;
x = correctFloat(x + (binWidth || 1))
) {
frequencies[correctFloat(fitToBin((x)))] = 0;
for (x = min; x < max; x = correctFloat(x + binWidth)) {
frequencies[x] = 0;
}
if (frequencies[min] !== 0) {
frequencies[correctFloat(min)] = 0;
}
fitToBin = fitToBinLeftClosed(
map(keys(frequencies), function (elem) {
return parseFloat(elem);
}));
each(baseData, function (y) {
var x = correctFloat(fitToBin(y));
frequencies[x]++;
View
@@ -21,37 +21,41 @@ var color = H.color,
/**
* Area series type.
*
* @constructor seriesTypes.area
* @extends {Series}
*/
/**
* The area series type.
*
* @extends {plotOptions.line}
* @product highcharts highstock
* @sample {highcharts} highcharts/demo/area-basic/
* Area chart
* @sample {highstock} stock/demo/area/
* Area chart
* @optionparent plotOptions.area
* @ignore
* @constructor Highcharts.seriesTypes.area
* @implements {Highcharts.Series}
*/
seriesType('area', 'line', {
/**
* The area series type.
*
* @sample {highcharts} highcharts/demo/area-basic/
* Area chart
* @sample {highstock} stock/demo/area/
* Area chart
*
* @type {*}
* @extends plotOptions.line
* @product highcharts highstock
* @optionparent plotOptions.area
*/
/**
* Fill color or gradient for the area. When `null`, the series' `color`
* is used with the series' `fillOpacity`.
*
* In styled mode, the fill color can be set with the `.highcharts-area`
* class name.
*
* @type {Color}
* @sample {highcharts} highcharts/plotoptions/area-fillcolor-default/
* Null by default
* @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/
* Gradient
* @default null
* @product highcharts highstock
* @apioption plotOptions.area.fillColor
* @sample {highcharts} highcharts/plotoptions/area-fillcolor-default/
* Null by default
* @sample {highcharts} highcharts/plotoptions/area-fillcolor-gradient/
* Gradient
*
* @type {Highcharts.ColorString}
* @product highcharts highstock
* @apioption plotOptions.area.fillColor
*/
/**
@@ -64,13 +68,14 @@ seriesType('area', 'line', {
* In styled mode, the fill opacity can be set with the `.highcharts-area`
* class name.
*
* @type {Number}
* @sample {highcharts} highcharts/plotoptions/area-fillopacity/
* Automatic fill color and fill opacity of 0.1
* @default {highcharts} 0.75
* @default {highstock} .75
* @product highcharts highstock
* @apioption plotOptions.area.fillOpacity
* @sample {highcharts} highcharts/plotoptions/area-fillopacity/
* Automatic fill color and fill opacity of 0.1
*
* @type {number}
* @default {highcharts} 0.75
* @default {highstock} .75
* @product highcharts highstock
* @apioption plotOptions.area.fillOpacity
*/
/**
@@ -81,12 +86,12 @@ seriesType('area', 'line', {
* In styled mode, the line stroke can be set with the `.highcharts-graph`
* class name.
*
* @type {Color}
* @sample {highcharts} highcharts/plotoptions/area-linecolor/
* Dark gray line
* @default null
* @product highcharts highstock
* @apioption plotOptions.area.lineColor
* @sample {highcharts} highcharts/plotoptions/area-linecolor/
* Dark gray line
*
* @type {Highcharts.ColorString}
* @product highcharts highstock
* @apioption plotOptions.area.lineColor
*/
/**
@@ -95,27 +100,29 @@ seriesType('area', 'line', {
* In styled mode, a negative color is set with the `.highcharts-negative`
* class name.
*
* @type {Color}
* @see [negativeColor](#plotOptions.area.negativeColor).
* @sample {highcharts} highcharts/css/series-negative-color/
* Negative color in styled mode
* @since 3.0
* @product highcharts
* @apioption plotOptions.area.negativeFillColor
* @see [negativeColor](#plotOptions.area.negativeColor)
*
* @sample {highcharts} highcharts/css/series-negative-color/
* Negative color in styled mode
*
* @type {Highcharts.ColorString}
* @since 3.0
* @product highcharts
* @apioption plotOptions.area.negativeFillColor
*/
/**
* Whether the whole area or just the line should respond to mouseover
* tooltips and other mouse or touch events.
*
* @type {Boolean}
* @sample {highcharts|highstock}
* highcharts/plotoptions/area-trackbyarea/
* Display the tooltip when the area is hovered
* @default false
* @since 1.1.6
* @product highcharts highstock
* @apioption plotOptions.area.trackByArea
* @sample {highcharts|highstock} highcharts/plotoptions/area-trackbyarea/
* Display the tooltip when the area is hovered
*
* @type {boolean}
* @default false
* @since 1.1.6
* @product highcharts highstock
* @apioption plotOptions.area.trackByArea
*/
/**
@@ -127,8 +134,10 @@ seriesType('area', 'line', {
* 3 will make the Y axis show negative values according to the `minPadding`
* option. If `softThreshold` is `true`, the Y axis starts at 0.
*
* @since 4.1.9
* @product highcharts highstock
* @type {boolean}
* @since 4.1.9
* @product highcharts highstock
* @apioption plotOptions.area.softThreshold
*/
softThreshold: false,
@@ -147,8 +156,11 @@ seriesType('area', 'line', {
* A threshold of 100
* @sample {highcharts} highcharts/plotoptions/area-threshold-infinity/
* A threshold of Infinity
* @since 2.0
* @product highcharts highstock
*
* @type {number}
* @since 2.0
* @product highcharts highstock
* @apioption plotOptions.area.threshold
*/
threshold: 0
@@ -159,6 +171,13 @@ seriesType('area', 'line', {
* Return an array of stacked points, where null and missing points are
* replaced by dummy points in order for gaps to be drawn correctly
* in stacks.
*
* @ignore
* @function Highcharts.seriesTypes.area#getStackPoints
*
* @param {Array<Highcharts.Point>} points
*
* @return {Array<*>}
*/
getStackPoints: function (points) {
var series = this,
@@ -295,6 +314,14 @@ seriesType('area', 'line', {
return segment;
},
/**
* @ignore
* @function Highcharts.seriesTypes.area#getGraphPath
*
* @param {Array<Highcharts.Points>} points
*
* @return {Array<number|string>}
*/
getGraphPath: function (points) {
var getGraphPath = Series.prototype.getGraphPath,
graphPath,
@@ -420,6 +447,11 @@ seriesType('area', 'line', {
* Draw the graph and the underlying area. This method calls the Series base
* function and adds the area. The areaPath is calculated in the
* getSegmentPath method called from Series.prototype.drawGraph.
*
* @ignore
* @function Highcharts.seriesTypes.area#drawGraph
*
* @return {void}
*/
drawGraph: function () {
@@ -492,11 +524,11 @@ seriesType('area', 'line', {
* A `area` series. If the [type](#series.area.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @type {Object}
* @extends series,plotOptions.area
* @excluding dataParser,dataURL
* @product highcharts highstock
* @apioption series.area
* @type {*}
* @extends series,plotOptions.area
* @excluding dataParser,dataURL
* @product highcharts highstock
* @apioption series.area
*/
/**
@@ -544,8 +576,6 @@ seriesType('area', 'line', {
* }]
* ```
*
* @type {Array<Object|Array|Number>}
* @extends series.line.data
* @sample {highcharts} highcharts/chart/reflow-true/
* Numerical values
* @sample {highcharts} highcharts/series/data-array-of-arrays/
@@ -556,6 +586,9 @@ seriesType('area', 'line', {
* Arrays of point.name and y
* @sample {highcharts} highcharts/series/data-array-of-objects/
* Config objects
* @product highcharts highstock
* @apioption series.area.data
*
* @type {Array<number|Array<number>|*>}
* @extends series.line.data
* @product highcharts highstock
* @apioption series.area.data
*/
Oops, something went wrong.

0 comments on commit b8568cc

Please sign in to comment.