]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
fix some typos (#7914)
authorpaul cheung <paul-cheung@users.noreply.github.com>
Sun, 18 Oct 2020 13:52:56 +0000 (21:52 +0800)
committerGitHub <noreply@github.com>
Sun, 18 Oct 2020 13:52:56 +0000 (16:52 +0300)
docs/docs/configuration/legend.md
docs/docs/general/performance.md
docs/docs/general/responsive.md
src/core/core.animations.js
src/core/core.plugins.js
src/scales/scale.category.js

index 02e2d1a23673d998369689d0d8dea6ca832565c6..c9532a5bf9b25dca2946b7c90224437653669006 100644 (file)
@@ -57,7 +57,7 @@ The legend label configuration is nested below the legend configuration using th
 | `generateLabels` | `function` | | Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box. See [Legend Item](#legend-item-interface) for details.
 | `filter` | `function` | `null` | Filters legend items out of the legend. Receives 2 parameters, a [Legend Item](#legend-item-interface) and the chart data.
 | `sort` | `function` | `null` | Sorts legend items. Receives 3 parameters, two [Legend Items](#legend-item-interface) and the chart data.
-| `usePointStyle` | `boolean` | `false` | Label style will match corresponding point style (size is based on the mimimum value between boxWidth and font.size).
+| `usePointStyle` | `boolean` | `false` | Label style will match corresponding point style (size is based on the minimum value between boxWidth and font.size).
 
 ## Legend Title Configuration
 
index 499b29110c5f17e58ef3c7b0d7b8fa83581b74b6..d244534a57b2f8bbc6727f75a5ddf313c37741cc 100644 (file)
@@ -75,7 +75,7 @@ new Chart(ctx, {
 
 ## Parallel rendering with web workers (Chrome only)
 
-Chome (in version 69) added the ability to [transfer rendering control of a canvas](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen) to a web worker. Web workers can use the [OffscreenCanvas API](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) to render from a web worker onto canvases in the DOM. Chart.js is a canvas-based library and supports rendering in a web worker - just pass an OffscreenCanvas into the Chart constructor instead of a Canvas element. Note that as of today, this API is only supported in Chrome.
+Chrome (in version 69) added the ability to [transfer rendering control of a canvas](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen) to a web worker. Web workers can use the [OffscreenCanvas API](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) to render from a web worker onto canvases in the DOM. Chart.js is a canvas-based library and supports rendering in a web worker - just pass an OffscreenCanvas into the Chart constructor instead of a Canvas element. Note that as of today, this API is only supported in Chrome.
 
 By moving all Chart.js calculations onto a separate thread, the main thread can be freed up for other uses. Some tips and tricks when using Chart.js in a web worker:
 * Transferring data between threads can be expensive, so ensure that your config and data objects are as small as possible. Try generating them on the worker side if you can (workers can make HTTP requests!) or passing them to your worker as ArrayBuffers, which can be transferred quickly from one thread to another.
@@ -222,7 +222,7 @@ new Chart(ctx, {
 });
 ```
 
-## When transpiling with Babel, cosider using `loose` mode
+## When transpiling with Babel, consider using `loose` mode
 
 Babel 7.9 changed the way classes are constructed. It is slow, unless used with `loose` mode.
 [More information](https://github.com/babel/babel/issues/11356)
index 8c91263b8f6dd4d5caa5c472ad2418e42017dafe..eab8bf963296d918cabc625466dd2b2335e8f6df 100644 (file)
@@ -39,7 +39,7 @@ chart.canvas.parentNode.style.width = '128px';
 
 Note that in order for the above code to correctly resize the chart height, the [`maintainAspectRatio`](#configuration-options) option must also be set to `false`.
 
-## Printing Resizeable Charts
+## Printing Resizable Charts
 
 CSS media queries allow changing styles when printing a page. The CSS applied from these media queries may cause charts to need to resize. However, the resize won't happen automatically. To support resizing charts when printing, one needs to hook the [onbeforeprint](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeprint) event and manually trigger resizing of each chart.
 
index 1a4e9b0ca50829469155690dc1f6500305688d16..b51463373ea8856b7dbfc2cf32f8a3c44b71b6fe 100644 (file)
@@ -127,7 +127,7 @@ export default class Animations {
                const animations = this._createAnimations(options, newOptions);
                if (newOptions.$shared && !options.$shared) {
                        // Going from distinct options to shared options:
-                       // After all animations are done, assing the shared options object to the element
+                       // After all animations are done, assign the shared options object to the element
                        // So any new updates to the shared options are observed
                        awaitAll(target.options.$animations, newOptions).then(() => {
                                target.options = newOptions;
index d24b4d56a4ae2c09d711053a5a3370a130d0ee22..359738342f2e37f935f06eaa4989623d6976499c 100644 (file)
@@ -214,7 +214,7 @@ function createDescriptors(plugins, options) {
 /**
  * @method IPlugin#beforeDraw
  * @desc Called before drawing `chart` at every animation frame. If any plugin returns `false`,
- * the frame drawing is cancelled untilanother `render` is triggered.
+ * the frame drawing is cancelled until another `render` is triggered.
  * @param {Chart} chart - The chart instance.
  * @param {object} options - The plugin options.
  * @returns {boolean} `false` to cancel the chart drawing.
index e3347bd7c86299e3da5bc067f128bdec53e6a641..1c8c933284a3ca9c10a44cc045ddb81522a06f1b 100644 (file)
@@ -83,7 +83,7 @@ export default class CategoryScale extends Scale {
                return me.getPixelForDecimal((value - me._startValue) / me._valueRange);
        }
 
-       // Must override base implementation becuase it calls getPixelForValue
+       // Must override base implementation because it calls getPixelForValue
        // and category scale can have duplicate values
        getPixelForTick(index) {
                const me = this;