]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Spelling fixes (#3522)
authorJosh Soref <jsoref@users.noreply.github.com>
Thu, 27 Oct 2016 19:18:31 +0000 (15:18 -0400)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Thu, 27 Oct 2016 19:18:31 +0000 (21:18 +0200)
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

20 files changed:
CONTRIBUTING.md
docs/01-Chart-Configuration.md
docs/09-Advanced.md
samples/tooltips/position-modes.html
src/controllers/controller.line.js
src/core/core.controller.js
src/core/core.legend.js
src/core/core.plugin.js
src/core/core.scale.js
src/core/core.ticks.js
src/core/core.title.js
src/core/core.tooltip.js
src/scales/scale.category.js
src/scales/scale.linearbase.js
src/scales/scale.logarithmic.js
src/scales/scale.time.js
test/core.controller.tests.js
test/core.helpers.tests.js
test/core.tooltip.tests.js
test/scale.radialLinear.tests.js

index b8b96cbe23814e24d8d3149498bf66101020eb81..6ec102439069c6f96b3851a5747b2e2dbf00b87b 100644 (file)
@@ -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
index 912d826eb7349c7e9db5d7eb9aa8290c0ae8a95b..a4692208892503b87b5edd8a84eb9e06c89fd4ab 100644 (file)
@@ -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,
index 2f4a278b1e25a6f2600ba54fa2efcfb5e7ac9e5d..062bf59e8fb4b092d08f5a441be18904ab5e806d 100644 (file)
@@ -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);
 ```
 
index 03ad882145f9d406ca280e1685761ac4e7cbbd0c..696584b067751144e68d449a23940284af85ad86 100644 (file)
@@ -53,7 +53,7 @@
                                        responsive: true,
                                        title:{
                                                display: true,
-                                               text: 'Tooltip Positio: ' + position
+                                               text: 'Tooltip Position: ' + position
                                        },
                                        tooltips: {
                                                position: position,
index 7c36396bb01f63ae1cadaffb9a0aa98a2cfd1458..59d097b1be79ec54e959d791c426c1487c00c63e 100644 (file)
@@ -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),
index 3fb4ff1c9955abf1b409c0a99723e18faf7d32f4..e0ad78334d685e3d97f26ceaa4624dd8a3c0e321 100644 (file)
@@ -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
index 043b78aac6a7f2c1d5bcdf710d608d203998f75d..9ea5787db9df215b2ffa93da7c66030888d867d2 100644 (file)
@@ -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;
index b675fbe3172eaf8f643a8a9507dc6806ede01c7f..fe6ac31f170e9d2113266db711bca78208398b19 100644 (file)
@@ -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
                 */
index e2d5f56bc8d809dfd578edde3706e06c8768b193..5f35b999f05ddd4169a109695ee57ec359037423 100644 (file)
@@ -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;
index 78ec07c3b94f44ea20c17f1928092ddf9a05662b..f11f1192bdfe6dac28bee3c8805571d30e8887b9 100644 (file)
@@ -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;
                                        }
index eb9c4fc0499e4fc70f03ce05287375f88727de71..a7663258a130cae297cd1b21d487ea3713c42fa4 100644 (file)
@@ -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,
index ecf7ce646cd04cf992b2c7a7579091dbdad6150e..d99f2302ff55b1cedc49968e86e10327f99aa73c 100755 (executable)
@@ -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
index 7e1b3d409d6679b1f88ba8da5eae20291257ed6e..fb90e6333f1e9cb4afe9f79403034f500d0ae937 100644 (file)
@@ -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
                */
index b8bc5c979e1ca6bfe28ab62f4c06563037330b0e..dc700f304ee52ea4a32d25e2254854e20d5b36e1 100644 (file)
@@ -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;
                                }
                        }
index a23f2eed4136b55aa3bbe9f6ffade7b424f29c33..9d87459406a832f60e811455e5b032f6d9fca7ca 100644 (file)
@@ -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);
index 5a5638cef70bcf1636a95961d9045befa44f0b97..c69bcf21e7538b80c00b145e2b8b41a3a3ae1592 100755 (executable)
@@ -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]);
index 1700805596e482c7b82990a84f85e4956b2ce502..07e008f894f771fadf543ee2e38f498cc2ad5640 100644 (file)
@@ -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: {
index e9cbb8e4354b42efb4dccfe0e83cb6c3d7a37c74..4a7e9f555f146472eecfcba7d78a09ae427021fa 100644 (file)
@@ -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.
index 0c13707aef9db1c71433f4971e0292c39629eef9..1a2d8fb0bbcfe9272840dc03dc80d1961bc8207a 100755 (executable)
@@ -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
index a47214f4fff984f72560974c2e99744ecbb6397a..7ac95ac39a612a9c5aabb66381f3cb9c9a0714f8 100644 (file)
@@ -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: {