From: Josh Soref Date: Thu, 27 Oct 2016 19:18:31 +0000 (-0400) Subject: Spelling fixes (#3522) X-Git-Tag: v2.4.0~1^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67934920be6d4005641a19c2a75cce116917a97e;p=thirdparty%2FChart.js.git Spelling fixes (#3522) Including: actually, aspect, bottom, changes, characters, datasets, divisible, downward, guidelines, instance, instances, interrupted, item, javascript, label, lifecycle, lines, plugins, manually, milliseconds, nearest, occurring, position, predefined, recalculate, tooltip, those --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8b96cbe2..6ec102439 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ Reporting bugs Well structured, detailed bug reports are hugely valuable for the project. -Guidlines for reporting bugs: +Guidelines for reporting bugs: - Check the issue search to see if it has already been reported - Isolate the problem to a simple test case diff --git a/docs/01-Chart-Configuration.md b/docs/01-Chart-Configuration.md index 912d826eb..a46922088 100644 --- a/docs/01-Chart-Configuration.md +++ b/docs/01-Chart-Configuration.md @@ -266,7 +266,7 @@ afterTitle | `Array[tooltipItem], data` | Text to render after the title beforeBody | `Array[tooltipItem], data` | Text to render before the body section beforeLabel | `tooltipItem, data` | Text to render before an individual label label | `tooltipItem, data` | Text to render for an individual item in the tooltip -labelColor | `tooltipItem, chartInstace` | Returns the colors to render for the tooltip item. Return as an object containing two parameters: `borderColor` and `backgroundColor`. +labelColor | `tooltipItem, chartInstance` | Returns the colors to render for the tooltip item. Return as an object containing two parameters: `borderColor` and `backgroundColor`. afterLabel | `tooltipItem, data` | Text to render after an individual label afterBody | `Array[tooltipItem], data` | Text to render after the body section beforeFooter | `Array[tooltipItem], data` | Text to render before the footer section @@ -306,7 +306,7 @@ The hover configuration is passed into the `options.hover` namespace. The global Name | Type | Default | Description --- | --- | --- | --- -mode | String | 'naerest' | Sets which elements appear in the tooltip. See [Interaction Modes](#interaction-modes) for details +mode | String | 'nearest' | Sets which elements appear in the tooltip. See [Interaction Modes](#interaction-modes) for details intersect | Boolean | true | if true, the hover mode only applies when the mouse position intersects an item on the chart animationDuration | Number | 400 | Duration in milliseconds it takes to animate hover style changes onHover | Function | null | Called when any of the events fire. Called in the context of the chart and passed an array of active elements (bars, points, etc) @@ -343,7 +343,7 @@ onComplete | Function | none | Callback called at the end of an animation. Passe The `onProgress` and `onComplete` callbacks are useful for synchronizing an external draw to the chart animation. The callback is passed an object that implements the following interface. An example usage of these callbacks can be found on [Github](https://github.com/chartjs/Chart.js/blob/master/samples/AnimationCallbacks/progress-bar.html). This sample displays a progress bar showing how far along the animation is. -```javscript +```javascript { // Chart object chartInstance, diff --git a/docs/09-Advanced.md b/docs/09-Advanced.md index 2f4a278b1..062bf59e8 100644 --- a/docs/09-Advanced.md +++ b/docs/09-Advanced.md @@ -28,8 +28,8 @@ myLineChart.destroy(); Triggers an update of the chart. This can be safely called after replacing the entire data object. This will update all scales, legends, and then re-render the chart. ```javascript -// duration is the time for the animation of the redraw in miliseconds -// lazy is a boolean. if true, the animation can be interupted by other animations +// duration is the time for the animation of the redraw in milliseconds +// lazy is a boolean. if true, the animation can be interrupted by other animations myLineChart.data.datasets[0].data[2] = 50; // Would update the first dataset's value of 'March' to be 50 myLineChart.update(); // Calling update now animates the position of March from 90 to 50. ``` @@ -47,8 +47,8 @@ myLineChart.reset(); Triggers a redraw of all chart elements. Note, this does not update elements for new data. Use `.update()` in that case. ```javascript -// duration is the time for the animation of the redraw in miliseconds -// lazy is a boolean. if true, the animation can be interupted by other animations +// duration is the time for the animation of the redraw in milliseconds +// lazy is a boolean. if true, the animation can be interrupted by other animations myLineChart.render(duration, lazy); ``` diff --git a/samples/tooltips/position-modes.html b/samples/tooltips/position-modes.html index 03ad88214..696584b06 100644 --- a/samples/tooltips/position-modes.html +++ b/samples/tooltips/position-modes.html @@ -53,7 +53,7 @@ responsive: true, title:{ display: true, - text: 'Tooltip Positio: ' + position + text: 'Tooltip Position: ' + position }, tooltips: { position: position, diff --git a/src/controllers/controller.line.js b/src/controllers/controller.line.js index 7c36396bb..59d097b1b 100644 --- a/src/controllers/controller.line.js +++ b/src/controllers/controller.line.js @@ -65,7 +65,7 @@ module.exports = function(Chart) { // Appearance // The default behavior of lines is to break at null values, according // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158 - // This option gives linse the ability to span gaps + // This option gives lines the ability to span gaps spanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps, tension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.lineTension, lineElementOptions.tension), backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor), diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 3fb4ff1c9..e0ad78334 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -258,7 +258,7 @@ module.exports = function(Chart) { }, stop: function() { - // Stops any current animation loop occuring + // Stops any current animation loop occurring Chart.animationService.cancelAnimation(this); return this; }, @@ -447,7 +447,7 @@ module.exports = function(Chart) { Chart.layoutService.update(me, me.chart.width, me.chart.height); - // Apply changes to the dataets that require the scales to have been calculated i.e BorderColor chages + // Apply changes to the datasets that require the scales to have been calculated i.e BorderColor changes Chart.plugins.notify('afterScaleUpdate', [me]); // Can only reset the new controllers after the scales have been updated diff --git a/src/core/core.legend.js b/src/core/core.legend.js index 043b78aac..9ea5787db 100644 --- a/src/core/core.legend.js +++ b/src/core/core.legend.js @@ -88,7 +88,7 @@ module.exports = function(Chart) { this.doughnutMode = false; }, - // These methods are ordered by lifecyle. Utilities then follow. + // These methods are ordered by lifecycle. Utilities then follow. // Any function defined here is inherited by all legend types. // Any function can be extended by the legend type @@ -287,7 +287,7 @@ module.exports = function(Chart) { return this.options.position === 'top' || this.options.position === 'bottom'; }, - // Actualy draw the legend on the canvas + // Actually draw the legend on the canvas draw: function() { var me = this; var opts = me.options; @@ -341,7 +341,7 @@ module.exports = function(Chart) { } if (opts.labels && opts.labels.usePointStyle) { - // Recalulate x and y for drawPoint() because its expecting + // Recalculate x and y for drawPoint() because its expecting // x and y to be center of figure (instead of top left) var radius = fontSize * Math.SQRT2 / 2; var offSet = radius / Math.SQRT2; diff --git a/src/core/core.plugin.js b/src/core/core.plugin.js index b675fbe31..fe6ac31f1 100644 --- a/src/core/core.plugin.js +++ b/src/core/core.plugin.js @@ -40,7 +40,7 @@ module.exports = function(Chart) { }, /** - * Remove all registered p^lugins. + * Remove all registered plugins. * @since 2.1.5 */ clear: function() { @@ -57,7 +57,7 @@ module.exports = function(Chart) { }, /** - * Returns all registered plugin intances. + * Returns all registered plugin instances. * @returns {Array} array of plugin objects. * @since 2.1.5 */ diff --git a/src/core/core.scale.js b/src/core/core.scale.js index e2d5f56bc..5f35b999f 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -52,7 +52,7 @@ module.exports = function(Chart) { Chart.Scale = Chart.Element.extend({ - // These methods are ordered by lifecyle. Utilities then follow. + // These methods are ordered by lifecycle. Utilities then follow. // Any function defined here is inherited by all scale types. // Any function can be extended by the scale type @@ -463,7 +463,7 @@ module.exports = function(Chart) { 0); }, - // Actualy draw the scale on the canvas + // Actually draw the scale on the canvas // @param {rectangle} chartArea : the area of the chart to draw full grid lines on draw: function(chartArea) { var me = this; diff --git a/src/core/core.ticks.js b/src/core/core.ticks.js index 78ec07c3b..f11f1192b 100644 --- a/src/core/core.ticks.js +++ b/src/core/core.ticks.js @@ -67,8 +67,8 @@ module.exports = function(Chart) { // If min, max and stepSize is set and they make an evenly spaced scale use it. if (generationOptions.min && generationOptions.max && generationOptions.stepSize) { - var minMaxDeltaDivisableByStepSize = ((generationOptions.max - generationOptions.min) % generationOptions.stepSize) === 0; - if (minMaxDeltaDivisableByStepSize) { + var minMaxDeltaDivisibleByStepSize = ((generationOptions.max - generationOptions.min) % generationOptions.stepSize) === 0; + if (minMaxDeltaDivisibleByStepSize) { niceMin = generationOptions.min; niceMax = generationOptions.max; } diff --git a/src/core/core.title.js b/src/core/core.title.js index eb9c4fc04..a7663258a 100644 --- a/src/core/core.title.js +++ b/src/core/core.title.js @@ -28,7 +28,7 @@ module.exports = function(Chart) { me.legendHitBoxes = []; }, - // These methods are ordered by lifecyle. Utilities then follow. + // These methods are ordered by lifecycle. Utilities then follow. beforeUpdate: function() { var chartOpts = this.chart.options; @@ -139,7 +139,7 @@ module.exports = function(Chart) { return pos === 'top' || pos === 'bottom'; }, - // Actualy draw the title block on the canvas + // Actually draw the title block on the canvas draw: function() { var me = this, ctx = me.ctx, diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index ecf7ce646..d99f2302f 100755 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -105,7 +105,7 @@ module.exports = function(Chart) { return base; } - // Private helper to create a tooltip iteam model + // Private helper to create a tooltip item model // @param element : the chart element (point, arc, bar) to create the tooltip item for // @return : new tooltip item function createTooltipItem(element) { @@ -317,7 +317,7 @@ module.exports = function(Chart) { } /** - * @Helper to get the location a tooltiop needs to be placed at given the initial position (via the vm) and the size and alignment + * @Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment */ function getBackgroundPoint(vm, size, alignment) { // Background Position diff --git a/src/scales/scale.category.js b/src/scales/scale.category.js index 7e1b3d409..fb90e6333 100644 --- a/src/scales/scale.category.js +++ b/src/scales/scale.category.js @@ -10,7 +10,7 @@ module.exports = function(Chart) { var DatasetScale = Chart.Scale.extend({ /** - * Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use tose + * Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use those * else fall back to data.labels * @private */ diff --git a/src/scales/scale.linearbase.js b/src/scales/scale.linearbase.js index b8bc5c979..dc700f304 100644 --- a/src/scales/scale.linearbase.js +++ b/src/scales/scale.linearbase.js @@ -22,7 +22,7 @@ module.exports = function(Chart) { // move the top up to 0 me.max = 0; } else if (minSign > 0 && maxSign > 0) { - // move the botttom down to 0 + // move the bottom down to 0 me.min = 0; } } diff --git a/src/scales/scale.logarithmic.js b/src/scales/scale.logarithmic.js index a23f2eed4..9d8745940 100644 --- a/src/scales/scale.logarithmic.js +++ b/src/scales/scale.logarithmic.js @@ -178,7 +178,7 @@ module.exports = function(Chart) { pixel += paddingLeft; } } else { - // Bottom - top since pixels increase downard on a screen + // Bottom - top since pixels increase downward on a screen innerDimension = me.height - (paddingTop + paddingBottom); if (start === 0 && !tickOpts.reverse) { range = helpers.log10(me.end) - helpers.log10(me.minNotZero); diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js index 5a5638cef..c69bcf21e 100755 --- a/src/scales/scale.time.js +++ b/src/scales/scale.time.js @@ -264,7 +264,7 @@ module.exports = function(Chart) { me.unitScale = 1; if (helpers.isArray(unitDefinition.steps) && Math.ceil(me.scaleSizeInUnits / labelCapacity) < helpers.max(unitDefinition.steps)) { - // Use one of the prefedined steps + // Use one of the predefined steps for (var idx = 0; idx < unitDefinition.steps.length; ++idx) { if (unitDefinition.steps[idx] >= Math.ceil(me.scaleSizeInUnits / labelCapacity)) { me.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, unitDefinition.steps[idx]); diff --git a/test/core.controller.tests.js b/test/core.controller.tests.js index 170080559..07e008f89 100644 --- a/test/core.controller.tests.js +++ b/test/core.controller.tests.js @@ -527,7 +527,7 @@ describe('Chart.Controller', function() { }); }); - it('should resize the canvas with correct apect ratio when parent width changes', function(done) { + it('should resize the canvas with correct aspect ratio when parent width changes', function(done) { var chart = acquireChart({ type: 'line', // AR == 2 options: { diff --git a/test/core.helpers.tests.js b/test/core.helpers.tests.js index e9cbb8e43..4a7e9f555 100644 --- a/test/core.helpers.tests.js +++ b/test/core.helpers.tests.js @@ -584,7 +584,7 @@ describe('Core helper tests', function() { var arrayOfThings2D = [['FooBar_1', 'Bar_2'], 'Foo_1']; - // Regardless 'FooBar' is the longest label it should return (charcters * 10) + // Regardless 'FooBar' is the longest label it should return (characters * 10) expect(helpers.longestText(context, font, arrayOfThings1D, {})).toEqual(60); expect(helpers.longestText(context, font, arrayOfThings2D, {})).toEqual(80); // We check to make sure we made the right calls to the canvas. diff --git a/test/core.tooltip.tests.js b/test/core.tooltip.tests.js index 0c13707ae..1a2d8fb0b 100755 --- a/test/core.tooltip.tests.js +++ b/test/core.tooltip.tests.js @@ -41,7 +41,7 @@ describe('Core.Tooltip', function() { clientY: 0 }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed @@ -157,7 +157,7 @@ describe('Core.Tooltip', function() { clientY: 0 }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed @@ -245,7 +245,7 @@ describe('Core.Tooltip', function() { clientY: rect.top + point._model.y }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed @@ -388,7 +388,7 @@ describe('Core.Tooltip', function() { clientY: rect.top + point._model.y }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed @@ -505,7 +505,7 @@ describe('Core.Tooltip', function() { clientY: rect.top + point0._model.y }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed @@ -587,7 +587,7 @@ describe('Core.Tooltip', function() { clientY: rect.top + point0._model.y }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed @@ -654,7 +654,7 @@ describe('Core.Tooltip', function() { clientY: rect.top + point._model.y }); - // Manully trigger rather than having an async test + // Manually trigger rather than having an async test node.dispatchEvent(evt); // Check and see if tooltip was displayed diff --git a/test/scale.radialLinear.tests.js b/test/scale.radialLinear.tests.js index a47214f4f..7ac95ac39 100644 --- a/test/scale.radialLinear.tests.js +++ b/test/scale.radialLinear.tests.js @@ -73,7 +73,7 @@ describe('Test the radial linear scale', function() { }, { data: [150] }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { scales: {} @@ -93,7 +93,7 @@ describe('Test the radial linear scale', function() { }, { data: ['150'] }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { scales: {} @@ -116,7 +116,7 @@ describe('Test the radial linear scale', function() { data: [1000], hidden: true }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { scales: {} @@ -134,7 +134,7 @@ describe('Test the radial linear scale', function() { datasets: [{ data: [50, 60, NaN, 70, null, undefined, Infinity, -Infinity] }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6', 'label7', 'label8'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6', 'label7', 'label8'] }, options: { scales: {} @@ -176,7 +176,7 @@ describe('Test the radial linear scale', function() { datasets: [{ data: [1, 1, 1, 2, 1, 0] }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { scale: { @@ -199,7 +199,7 @@ describe('Test the radial linear scale', function() { datasets: [{ data: [1, 1, 1, 2, 1, 0] }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5', 'label6'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { scale: { @@ -223,7 +223,7 @@ describe('Test the radial linear scale', function() { datasets: [{ data: [20, 30, 40, 50] }], - labels: ['lablel1', 'label2', 'label3', 'label4'] + labels: ['label1', 'label2', 'label3', 'label4'] }, options: { scale: { @@ -259,7 +259,7 @@ describe('Test the radial linear scale', function() { datasets: [{ data: [10, 5, 0, 25, 78] }], - labels: ['lablel1', 'label2', 'label3', 'label4', 'label5'] + labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { scale: {