Merge branch 'MDL-87135' of https://github.com/paulholden/moodle
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Chart.js v4.5.0
|
||||
* Chart.js v4.5.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2024 Chart.js Contributors
|
||||
* (c) 2025 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/
|
||||
|
||||
@@ -1986,10 +1986,10 @@ function getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {
|
||||
* @returns True if the canvas context size or transformation has changed.
|
||||
*/ function retinaScale(chart, forceRatio, forceStyle) {
|
||||
const pixelRatio = forceRatio || 1;
|
||||
const deviceHeight = Math.floor(chart.height * pixelRatio);
|
||||
const deviceWidth = Math.floor(chart.width * pixelRatio);
|
||||
chart.height = Math.floor(chart.height);
|
||||
chart.width = Math.floor(chart.width);
|
||||
const deviceHeight = round1(chart.height * pixelRatio);
|
||||
const deviceWidth = round1(chart.width * pixelRatio);
|
||||
chart.height = round1(chart.height);
|
||||
chart.width = round1(chart.width);
|
||||
const canvas = chart.canvas;
|
||||
// If no style has been set on the canvas, the render size is used as display size,
|
||||
// making the chart visually bigger, so let's enforce it to the "correct" values.
|
||||
@@ -7155,18 +7155,22 @@ var registry = /* #__PURE__ */ new Registry();
|
||||
|
||||
class PluginService {
|
||||
constructor(){
|
||||
this._init = [];
|
||||
this._init = undefined;
|
||||
}
|
||||
notify(chart, hook, args, filter) {
|
||||
if (hook === 'beforeInit') {
|
||||
this._init = this._createDescriptors(chart, true);
|
||||
this._notify(this._init, chart, 'install');
|
||||
}
|
||||
if (this._init === undefined) {
|
||||
return;
|
||||
}
|
||||
const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);
|
||||
const result = this._notify(descriptors, chart, hook, args);
|
||||
if (hook === 'afterDestroy') {
|
||||
this._notify(descriptors, chart, 'stop');
|
||||
this._notify(this._init, chart, 'uninstall');
|
||||
this._init = undefined;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -7609,7 +7613,7 @@ function needContext(proxy, names) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var version = "4.5.0";
|
||||
var version = "4.5.1";
|
||||
|
||||
const KNOWN_POSITIONS = [
|
||||
'top',
|
||||
@@ -9247,19 +9251,24 @@ class DoughnutController extends DatasetController {
|
||||
labels: {
|
||||
generateLabels (chart) {
|
||||
const data = chart.data;
|
||||
const { labels: { pointStyle , textAlign , color , useBorderRadius , borderRadius } } = chart.legend.options;
|
||||
if (data.labels.length && data.datasets.length) {
|
||||
const { labels: { pointStyle , color } } = chart.legend.options;
|
||||
return data.labels.map((label, i)=>{
|
||||
const meta = chart.getDatasetMeta(0);
|
||||
const style = meta.controller.getStyle(i);
|
||||
return {
|
||||
text: label,
|
||||
fillStyle: style.backgroundColor,
|
||||
strokeStyle: style.borderColor,
|
||||
fontColor: color,
|
||||
lineWidth: style.borderWidth,
|
||||
pointStyle: pointStyle,
|
||||
hidden: !chart.getDataVisibility(i),
|
||||
lineDash: style.borderDash,
|
||||
lineDashOffset: style.borderDashOffset,
|
||||
lineJoin: style.borderJoinStyle,
|
||||
lineWidth: style.borderWidth,
|
||||
strokeStyle: style.borderColor,
|
||||
textAlign: textAlign,
|
||||
pointStyle: pointStyle,
|
||||
borderRadius: useBorderRadius && (borderRadius || style.borderRadius),
|
||||
index: i
|
||||
};
|
||||
});
|
||||
|
||||
@@ -403,11 +403,11 @@ All rights reserved.</copyright>
|
||||
<location>amd/src/chartjs-lazy.js</location>
|
||||
<name>Chart.js</name>
|
||||
<description>Simple yet flexible JavaScript charting for designers & developers.</description>
|
||||
<version>4.5.0</version>
|
||||
<version>4.5.1</version>
|
||||
<license>MIT</license>
|
||||
<repository>https://github.com/chartjs/Chart.js</repository>
|
||||
<copyrights>
|
||||
<copyright>2014-2022 Chart.js Contributors</copyright>
|
||||
<copyright>2014-2025 Chart.js Contributors</copyright>
|
||||
</copyrights>
|
||||
<customised/>
|
||||
</library>
|
||||
|
||||
Reference in New Issue
Block a user