Skip to content

Commit

Permalink
v11.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
TorsteinHonsi committed Aug 14, 2024
1 parent ea5e931 commit 8c9d698
Show file tree
Hide file tree
Showing 488 changed files with 7,219 additions and 2,451 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "highcharts",
"version": "11.4.6",
"version": "11.4.7",
"main": "highcharts.js",
"license": "https://www.highcharts.com/license",
"types": "highcharts.d.ts"
Expand Down
13 changes: 12 additions & 1 deletion es-modules/Accessibility/Components/InfoRegionsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ class InfoRegionsComponent extends AccessibilityComponent {
.setAttribute('aria-expanded', 'false');
}
});
if (chart.exporting) {
// Needed when print logic in exporting does not trigger
// rerendering thus repositioning of screen reader DOM elements
// (#21554)
this.addEvent(chart, 'afterPrint', function () {
component.updateAllScreenReaderSections();
});
}
this.announcer = new Announcer(chart, 'assertive');
}
/**
Expand Down Expand Up @@ -211,9 +219,12 @@ class InfoRegionsComponent extends AccessibilityComponent {
* to get a11y info from series.
*/
onChartRender() {
const component = this;
this.linkedDescriptionElement = this.getLinkedDescriptionElement();
this.setLinkedDescriptionAttrs();
this.updateAllScreenReaderSections();
}
updateAllScreenReaderSections() {
const component = this;
Object.keys(this.screenReaderSections).forEach(function (regionKey) {
component.updateScreenReaderSection(regionKey);
});
Expand Down
6 changes: 1 addition & 5 deletions es-modules/Core/Chart/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -1015,11 +1015,7 @@ class Chart {
let chartWidth = chart.chartWidth;
// Allow table cells and flex-boxes to shrink without the chart blocking
// them out (#6427)
css(renderTo, {
overflow: 'hidden',
// #21144, retest and remove in future version of Chrome
pointerEvents: H.isChrome ? 'fill' : 'auto'
});
css(renderTo, { overflow: 'hidden' });
// Create the inner container
if (!chart.styledMode) {
containerStyle = extend({
Expand Down
8 changes: 3 additions & 5 deletions es-modules/Core/Chart/StockChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,11 @@ addEvent(Chart, 'update', function (e) {
// Get the related axes based options.*Axis setting #2810
axes2 = (axis.isXAxis ? chart.yAxis : chart.xAxis);
for (const A of axes2) {
if (defined(A.options.id) ?
A.options.id.indexOf('navigator') === -1 :
true) {
const a = (A.isXAxis ? 'yAxis' : 'xAxis'), rax = (defined(A.options[a]) ?
if (!A.options.isInternal) {
const a = (A.isXAxis ? 'yAxis' : 'xAxis'), relatedAxis = (defined(A.options[a]) ?
chart[a][A.options[a]] :
chart[a][0]);
if (axis === rax) {
if (axis === relatedAxis) {
axes.push(A);
}
}
Expand Down
2 changes: 1 addition & 1 deletion es-modules/Core/Defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ const defaultOptions = {
* can be prevented by returning `false` or calling
* `event.preventDefault()`.
*
* @sample {highcharts} highcharts/legend/series-legend-itemclick/
* @sample {highcharts} highcharts/legend/itemclick/
* Confirm hiding and showing
* @sample {highcharts} highcharts/legend/pie-legend-itemclick/
* Confirm toggle visibility of pie slices
Expand Down
5 changes: 3 additions & 2 deletions es-modules/Core/Pointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Pointer {
this.eventsToUnbind = [];
if (!H.chartCount) {
if (Pointer.unbindDocumentMouseUp) {
Pointer.unbindDocumentMouseUp = Pointer.unbindDocumentMouseUp();
Pointer.unbindDocumentMouseUp.forEach((e) => e());
}
if (Pointer.unbindDocumentTouchEnd) {
Pointer.unbindDocumentTouchEnd = (Pointer.unbindDocumentTouchEnd());
Expand Down Expand Up @@ -1284,8 +1284,9 @@ class Pointer {
container.onclick = this.onContainerClick.bind(this);
this.eventsToUnbind.push(addEvent(container, 'mouseenter', this.onContainerMouseEnter.bind(this)), addEvent(container, 'mouseleave', this.onContainerMouseLeave.bind(this)));
if (!Pointer.unbindDocumentMouseUp) {
Pointer.unbindDocumentMouseUp = addEvent(ownerDoc, 'mouseup', this.onDocumentMouseUp.bind(this));
Pointer.unbindDocumentMouseUp = [];
}
Pointer.unbindDocumentMouseUp.push(addEvent(ownerDoc, 'mouseup', this.onDocumentMouseUp.bind(this)));
// In case we are dealing with overflow, reset the chart position when
// scrolling parent elements
let parent = this.chart.renderTo.parentElement;
Expand Down
4 changes: 2 additions & 2 deletions es-modules/Core/Renderer/SVG/Symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function arc(cx, cy, w, h, options) {
// proximity is too small, the arc disappears. If it is too great, a
// gap appears. This can be seen in the animation of the official
// bubble demo (#20586).
proximity = 0.0002 / Math.max(rx, 1), fullCircle = (Math.abs((options.end || 0) - start - 2 * Math.PI) <
proximity), end = (options.end || 0) - proximity, innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = Math.sin(end),
proximity = 0.0002 / (options.borderRadius ? 1 : Math.max(rx, 1)), fullCircle = (Math.abs((options.end || 0) - start - 2 * Math.PI) <
proximity), end = (options.end || 0) - (fullCircle ? proximity : 0), innerRadius = options.innerR, open = pick(options.open, fullCircle), cosStart = Math.cos(start), sinStart = Math.sin(start), cosEnd = Math.cos(end), sinEnd = Math.sin(end),
// Proximity takes care of rounding errors around PI (#6971)
longArc = pick(options.longArc, end - start - Math.PI < proximity ? 0 : 1);
let arcSegment = [
Expand Down
9 changes: 5 additions & 4 deletions es-modules/Core/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class Tooltip {
* @return {Highcharts.SVGElement}
* Tooltip label
*/
getLabel() {
getLabel({ anchorX, anchorY } = { anchorX: 0, anchorY: 0 }) {
const tooltip = this, styledMode = this.chart.styledMode, options = this.options, doSplit = this.split && this.allowShared;
let container = this.container, renderer = this.chart.renderer;
// If changing from a split tooltip to a non-split tooltip, we must
Expand Down Expand Up @@ -287,7 +287,7 @@ class Tooltip {
}
else {
this.label = renderer
.label('', 0, 0, options.shape, void 0, void 0, options.useHTML, void 0, 'tooltip')
.label('', anchorX, anchorY, options.shape, void 0, void 0, options.useHTML, void 0, 'tooltip')
.attr({
padding: options.padding,
r: options.borderRadius
Expand Down Expand Up @@ -654,7 +654,7 @@ class Tooltip {
*/
refresh(pointOrPoints, mouseEvent) {
const tooltip = this, { chart, options, pointer, shared } = this, points = splat(pointOrPoints), point = points[0], pointConfig = [], formatString = options.format, formatter = options.formatter || tooltip.defaultFormatter, styledMode = chart.styledMode;
let formatterContext = {};
let formatterContext = {}, wasShared = tooltip.allowShared;
if (!options.enabled || !point.series) { // #16820
return;
}
Expand All @@ -664,6 +664,7 @@ class Tooltip {
tooltip.allowShared = !(!isArray(pointOrPoints) &&
pointOrPoints.series &&
pointOrPoints.series.noSharedTooltip);
wasShared = wasShared && !tooltip.allowShared;
// Get the reference point coordinates (pie charts use tooltipPos)
tooltip.followPointer = (!tooltip.split && point.series.tooltipOptions.followPointer);
const anchor = tooltip.getAnchor(pointOrPoints, mouseEvent), x = anchor[0], y = anchor[1];
Expand Down Expand Up @@ -711,7 +712,7 @@ class Tooltip {
points.some((p) => // #16004
pointer.isDirectTouch || // ##17929
p.series.shouldShowTooltip(checkX, checkY))) {
const label = tooltip.getLabel();
const label = tooltip.getLabel(wasShared && tooltip.tt || {});
// Prevent the tooltip from flowing over the chart box
// (#6659)
if (!options.style.width || styledMode) {
Expand Down
31 changes: 18 additions & 13 deletions es-modules/Data/Connectors/GoogleSheetsConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* - Gøran Slettemark
* - Wojciech Chmiel
* - Sophie Bremer
* - Jomar Hønsi
*
* */
'use strict';
Expand Down Expand Up @@ -83,6 +84,9 @@ class GoogleSheetsConnector extends DataConnector {
table,
url
});
if (!URL.canParse(url)) {
throw new Error('Invalid URL: ' + url);
}
return fetch(url)
.then((response) => (response.json()))
.then((json) => {
Expand Down Expand Up @@ -129,7 +133,6 @@ class GoogleSheetsConnector extends DataConnector {
GoogleSheetsConnector.defaultOptions = {
googleAPIKey: '',
googleSpreadsheetKey: '',
worksheet: 1,
enablePolling: false,
dataRefreshRate: 2,
firstRowAsNames: true
Expand Down Expand Up @@ -161,18 +164,20 @@ GoogleSheetsConnector.defaultOptions = {
* @private
*/
function buildFetchURL(apiKey, sheetKey, options = {}) {
return (`https://sheets.googleapis.com/v4/spreadsheets/${sheetKey}/values/` +
(options.onlyColumnNames ?
'A1:Z1' :
buildQueryRange(options)) +
'?alt=json' +
(options.onlyColumnNames ?
'' :
'&dateTimeRenderOption=FORMATTED_STRING' +
'&majorDimension=COLUMNS' +
'&valueRenderOption=UNFORMATTED_VALUE') +
'&prettyPrint=false' +
`&key=${apiKey}`);
const url = new URL(`https://sheets.googleapis.com/v4/spreadsheets/${sheetKey}/values/`);
const range = options.onlyColumnNames ?
'A1:Z1' : buildQueryRange(options);
url.pathname += range;
const searchParams = url.searchParams;
searchParams.set('alt', 'json');
if (!options.onlyColumnNames) {
searchParams.set('dateTimeRenderOption', 'FORMATTED_STRING');
searchParams.set('majorDimension', 'COLUMNS');
searchParams.set('valueRenderOption', 'UNFORMATTED_VALUE');
}
searchParams.set('prettyPrint', 'false');
searchParams.set('key', apiKey);
return url.href;
}
GoogleSheetsConnector.buildFetchURL = buildFetchURL;
/**
Expand Down
1 change: 0 additions & 1 deletion es-modules/Data/Connectors/JSONConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class JSONConnector extends DataConnector {
table.deleteColumns();
converter.parse({ data });
table.setColumns(converter.getTable().getColumns());
table.setRowKeysColumn(data.length);
}
return connector.setModifierOptions(dataModifier).then(() => data);
})
Expand Down
2 changes: 0 additions & 2 deletions es-modules/Data/Converters/DataConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ class DataConverter {
/**
* Parse a date and return it as a number.
*
* @function Highcharts.Data#parseDate
*
* @param {string} value
* Value to parse.
*
Expand Down
Loading

0 comments on commit 8c9d698

Please sign in to comment.