app/assets/javascripts/highcharts/modules/drilldown.js in highcharts-rails-5.0.14 vs app/assets/javascripts/highcharts/modules/drilldown.js in highcharts-rails-6.0.0

- old
+ new

@@ -1,7 +1,7 @@ /** - * @license Highcharts JS v5.0.14 (2017-07-28) + * @license Highcharts JS v6.0.0 (2017-10-04) * Highcharts Drilldown module * * Author: Torstein Honsi * License: www.highcharts.com/license * @@ -42,10 +42,21 @@ inArray = H.inArray, ddSeriesId = 1; // Add language extend(defaultOptions.lang, { + /** + * The text for the button that appears when drilling down, linking + * back to the parent series. The parent series' name is inserted for + * `{series.name}`. + * + * @type {String} + * @default Back to {series.name} + * @since 3.0.8 + * @product highcharts highmaps + * @apioption lang.drillUpText + */ drillUpText: '◁ Back to {series.name}' }); /** * Options for drill down, the concept of inspecting increasingly high @@ -58,74 +69,62 @@ * @type {Object} * @optionparent drilldown */ defaultOptions.drilldown = { + /** + * When this option is false, clicking a single point will drill down + * all points in the same category, equivalent to clicking the X axis + * label. + * + * @type {Boolean} + * @sample {highcharts} highcharts/drilldown/allowpointdrilldown-false/ + * Don't allow point drilldown + * @default true + * @since 4.1.7 + * @product highcharts + * @apioption drilldown.allowPointDrilldown + */ + + /** * Additional styles to apply to the X axis label for a point that * has drilldown data. By default it is underlined and blue to invite * to interaction. * * @type {CSSObject} - * @see In [styled mode](http://www.highcharts.com/docs/chart-design-and- - * style/style-by-css), active label styles can be set with the `.highcharts- - * drilldown-axis-label` class. + * @see In styled mode, active label styles can be set with the `.highcharts-drilldown-axis-label` class. * @sample {highcharts} highcharts/drilldown/labels/ Label styles * @default { "cursor": "pointer", "color": "#003399", "fontWeight": "bold", "textDecoration": "underline" } * @since 3.0.8 * @product highcharts highmaps */ activeAxisLabelStyle: { - - /** - */ cursor: 'pointer', - - /** - */ color: '#003399', - - /** - */ fontWeight: 'bold', - - /** - */ textDecoration: 'underline' }, /** * Additional styles to apply to the data label of a point that has * drilldown data. By default it is underlined and blue to invite to * interaction. * * @type {CSSObject} - * @see In [styled mode](http://www.highcharts.com/docs/chart-design-and- - * style/style-by-css), active data label styles can be applied with + * @see In styled mode, active data label styles can be applied with * the `.highcharts-drilldown-data-label` class. * @sample {highcharts} highcharts/drilldown/labels/ Label styles * @default { "cursor": "pointer", "color": "#003399", "fontWeight": "bold", "textDecoration": "underline" } * @since 3.0.8 * @product highcharts highmaps */ activeDataLabelStyle: { - - /** - */ cursor: 'pointer', - - /** - */ color: '#003399', - - /** - */ fontWeight: 'bold', - - /** - */ textDecoration: 'underline' }, /** @@ -159,10 +158,12 @@ * @product highcharts highmaps */ animation: { /** + * Duration for the drilldown animation. + * @default 500 */ duration: 500 }, /** @@ -187,24 +188,80 @@ * @product highcharts highmaps */ position: { /** + * Horizontal alignment. + * @type {String} */ align: 'right', /** + * The X offset of the button. + * @type {Number} */ x: -10, /** + * The Y offset of the button. + * @type {Number} */ y: 10 + + /** + * Vertical alignment of the button. + * + * @type {String} + * @default top + * @validvalue ["top", "middle", "bottom"] + * @product highcharts highmaps + * @apioption drilldown.drillUpButton.position.verticalAlign + */ } - // relativeTo: 'plotBox' - // theme + /** + * What box to align the button to. Can be either `plotBox` or + * `spacingBox. + * + * @type {String} + * @default plotBox + * @validvalue ["plotBox", "spacingBox"] + * @since 3.0.8 + * @product highcharts highmaps + * @apioption drilldown.drillUpButton.relativeTo + */ + + /** + * A collection of attributes for the button. The object takes SVG attributes + * like `fill`, `stroke`, `stroke-width` or `r`, the border radius. + * The theme also supports `style`, a collection of CSS properties for + * the text. Equivalent attributes for the hover state are given in + * `theme.states.hover`. + * + * @type {Object} + * @see In styled mode, drill-up button styles can be applied with the + * `.highcharts-drillup-button` class. + * @sample {highcharts} highcharts/drilldown/drillupbutton/ + * Button theming + * @sample {highmaps} highcharts/drilldown/drillupbutton/ + * Button theming + * @since 3.0.8 + * @product highcharts highmaps + * @apioption drilldown.drillUpButton.theme + */ } + + /** + * An array of series configurations for the drill down. Each series + * configuration uses the same syntax as the [series](#series) option + * set. These drilldown series are hidden by default. The drilldown + * series is linked to the parent series' point by its `id`. + * + * @type {Array<Object>} + * @since 3.0.8 + * @product highcharts highmaps + * @apioption drilldown.series + */ }; /** @@ -270,10 +327,21 @@ * @product highcharts highmaps * @apioption chart.events.drillupall */ /** + * The `id` of a series in the [drilldown.series](#drilldown.series) + * array to use for a drilldown for this point. + * + * @type {String} + * @sample {highcharts} highcharts/drilldown/basic/ Basic drilldown + * @since 3.0.8 + * @product highcharts + * @apioption series.line.data.drilldown + */ + + /** * A general fadeIn method */ H.SVGRenderer.prototype.Element.prototype.fadeIn = function(animation) { this .attr({ @@ -420,11 +488,11 @@ } }); } }); } - + this.pointer.reset(); this.redraw(); this.showDrillUpButton(); }; Chart.prototype.getDrilldownBackText = function() { @@ -693,11 +761,11 @@ ColumnSeries.prototype.animateDrillupFrom = function(level) { var animationOptions = this.chart.options.drilldown.animation, group = this.group, // For 3d column series all columns are added to one group // so we should not delete the whole group. #5297 - removeGroup = group !== this.chart.seriesGroup, + removeGroup = group !== this.chart.columnGroup, series = this; // Cancel mouse events on the series group (#2787) each(series.trackerGroups, function(key) { if (series[key]) { // we don't always have dataLabelsGroup @@ -923,17 +991,19 @@ series.xAxis.drilldownCategory(point.x, e); // #5822, x changed } else { point.doDrilldown(undefined, undefined, e); } }); - /*wrap(point, 'importEvents', function (proceed) { // wrapping importEvents makes point.click event work + /* + wrap(point, 'importEvents', function (proceed) { // wrapping importEvents makes point.click event work if (!this.hasImportedEvents) { proceed.call(this); H.addEvent(this, 'click', function () { this.doDrilldown(); }); } - });*/ + }); + */ } // Add or remove click handler and style on the tick label if (tick) {