language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
src/scales/scale.radialLinear.js
@@ -222,7 +222,7 @@ module.exports = function(Chart) { for (var i = 0; i < text.length; ++i) { ctx.fillText(text[i], position.x, y); - y+= spacing; + y += spacing; } } else { ctx.fillText(text, position.x, position.y);
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
src/scales/scale.time.js
@@ -2,7 +2,7 @@ 'use strict'; var moment = require('moment'); -moment = typeof(moment) === 'function' ? moment : window.moment; +moment = typeof moment === 'function' ? moment : window.moment; var defaults = require('../core/core.defaults'); var helpers = require('../helpers/index'); @@ -45,7 +45,7 @@ function ...
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/jasmine.matchers.js
@@ -33,7 +33,7 @@ function buildPixelMatchPreview(actual, expected, diff, threshold, tolerance, co 'diff: ' + count + 'px ' + '(' + toPercent(ratio) + '%)<br/>' + 'thr: ' + toPercent(threshold) + '%, ' + - 'tol: '+ toPercent(tolerance) + '%' + 'tol: ' + toPercent(tolerance) + '%' } ].forEach(functi...
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/jasmine.utils.js
@@ -68,8 +68,8 @@ function acquireChart(config, options) { // by default, remove chart animation and auto resize config.options = config.options || {}; - config.options.animation = config.options.animation === undefined? false : config.options.animation; - config.options.responsive = config.options.responsive ===...
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/specs/controller.bubble.tests.js
@@ -162,7 +162,7 @@ describe('Bubble controller tests', function() { chart.update(); - for (var i=0; i<4; ++i) { + for (var i = 0; i < 4; ++i) { expect(meta.data[i]._model).toEqual(jasmine.objectContaining({ backgroundColor: 'rgb(98, 98, 98)', borderColor: 'rgb(8, 8, 8)',
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/specs/core.controller.tests.js
@@ -10,7 +10,7 @@ describe('Chart', function() { setTimeout(callback, 50); }; - Chart.helpers.addEvent(content, state !== 'complete'? 'load' : 'resize', handler); + Chart.helpers.addEvent(content, state !== 'complete' ? 'load' : 'resize', handler); } // https://github.com/chartjs/Chart.js/issues/2481
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/specs/global.deprecations.tests.js
@@ -104,7 +104,7 @@ describe('Deprecations', function() { var calls = ctx.getCalls(); expect(calls[0]).toEqual({name: 'beginPath', args: []}); - expect(calls[calls.length-1]).toEqual({name: 'closePath', args: []}); + expect(calls[calls.length - 1]).toEqual({name: 'closePath', args: []}); expect(C...
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/specs/helpers.core.tests.js
@@ -150,7 +150,7 @@ describe('Chart.helpers.core', function() { it('should return the value returned by fn', function() { expect(helpers.callback(helpers.noop, [41])).toBe(undefined); expect(helpers.callback(function(i) { - return i+1; + return i + 1; }, [41])).toBe(42); }); });
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/specs/helpers.easing.tests.js
@@ -45,8 +45,8 @@ describe('Chart.helpers.easing', function() { var values = []; var i; - for (i=0; i<=count; ++i) { - values.push(Math.round(accuracy * fn(i/count)) / accuracy); + for (i = 0; i <= count; ++i) { + values.push(Math.round(accuracy * fn(i / count)) / accuracy); } return value...
true
Other
chartjs
Chart.js
4c763bff44345ff5bbf2acc97cbce8918fa5b055.json
Enforce spaces around infix/unary words operators (#4547) Enable ESLint `space-infix-ops` and `space-unary-ops` (for words only) rules. Also added `samples` to the linting task to match Code Climate expectations. http://eslint.org/docs/rules/space-infix-ops http://eslint.org/docs/rules/space-unary-ops
test/specs/platform.dom.tests.js
@@ -10,7 +10,7 @@ describe('Platform.dom', function() { setTimeout(callback, 50); }; - Chart.helpers.addEvent(content, state !== 'complete'? 'load' : 'resize', handler); + Chart.helpers.addEvent(content, state !== 'complete' ? 'load' : 'resize', handler); } describe('context acquisition', function() {
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
src/chart.js
@@ -53,9 +53,9 @@ require('./charts/Chart.Scatter')(Chart); var plugins = []; plugins.push( - require('./plugins/plugin.filler')(Chart), - require('./plugins/plugin.legend')(Chart), - require('./plugins/plugin.title')(Chart) + require('./plugins/plugin.filler')(Chart), + require('./plugins/plugin.legend')(...
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
src/controllers/controller.doughnut.js
@@ -168,7 +168,7 @@ module.exports = function(Chart) { var endAngle = startAngle + circumference; var start = {x: Math.cos(startAngle), y: Math.sin(startAngle)}; var end = {x: Math.cos(endAngle), y: Math.sin(endAngle)}; - var contains0 = (startAngle <= 0 && 0 <= endAngle) || (startAngle <= Math.PI * 2...
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
src/core/core.controller.js
@@ -95,7 +95,7 @@ module.exports = function(Chart) { * @private */ me.chart = me; - me.controller = me; // chart.chart.controller #inception + me.controller = me; // chart.chart.controller #inception // Add the chart instance to the global namespace Chart.instances[me.id] = me; @@ -172,7 +1...
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
src/core/core.scale.js
@@ -509,9 +509,9 @@ module.exports = function(Chart) { var min = me.min; var max = me.max; - return me.beginAtZero ? 0: - min < 0 && max < 0? max : - min > 0 && max > 0? min : + return me.beginAtZero ? 0 : + min < 0 && max < 0 ? max : + min > 0 && max > 0 ? min : 0; },
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
src/scales/scale.logarithmic.js
@@ -235,7 +235,7 @@ module.exports = function(Chart) { if (me.isHorizontal()) { innerDimension = me.width; value = me.start * Math.pow(10, (pixel - me.left) * range / innerDimension); - } else { // todo: if start === 0 + } else { // todo: if start === 0 innerDimension = me.height; value = M...
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
src/scales/scale.radialLinear.js
@@ -460,9 +460,9 @@ module.exports = function(Chart) { var max = me.max; return me.getPointPositionForValue(0, - me.beginAtZero? 0: - min < 0 && max < 0? max : - min > 0 && max > 0? min : + me.beginAtZero ? 0 : + min < 0 && max < 0 ? max : + min > 0 && max > 0 ? min : 0); },
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
test/jasmine.utils.js
@@ -98,7 +98,7 @@ function injectCSS(css) { var head = document.getElementsByTagName('head')[0]; var style = document.createElement('style'); style.setAttribute('type', 'text/css'); - if (style.styleSheet) { // IE + if (style.styleSheet) { // IE style.styleSheet.cssText = css; } else { style.appendChild...
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
test/specs/controller.polarArea.tests.js
@@ -5,8 +5,8 @@ describe('Polar area controller tests', function() { type: 'polarArea', data: { datasets: [ - {data: []}, - {data: []} + {data: []}, + {data: []} ], labels: [] }
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
test/specs/scale.category.tests.js
@@ -42,7 +42,7 @@ describe('Category scale tests', function() { padding: 0, reverse: false, display: true, - callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below + callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below autoSk...
true
Other
chartjs
Chart.js
f6b6956a3aeb341fb3987a8ddb6c76fb9a37999c.json
Fix ESLint errors (#4485)
test/specs/scale.logarithmic.tests.js
@@ -718,20 +718,20 @@ describe('Logarithmic Scale tests', function() { }); var xScale = chart.scales.xScale; - expect(xScale.getPixelForValue(80, 0, 0)).toBeCloseToPixel(495); // right - paddingRight + expect(xScale.getPixelForValue(80, 0, 0)).toBeCloseToPixel(495); // right - paddingRight expect(xScale.g...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
docs/axes/labelling.md
@@ -10,7 +10,7 @@ The scale label configuration is nested under the scale configuration in the `sc | -----| ---- | --------| ----------- | `display` | `Boolean` | `false` | If true, display the axis title. | `labelString` | `String` | `''` | The text for the title. (i.e. "# of People" or "Response Choices"). -| `lin...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
docs/configuration/title.md
@@ -14,7 +14,7 @@ The title configuration is passed into the `options.title` namespace. The global | `fontColor` | Color | `'#666'` | Font color | `fontStyle` | `String` | `'bold'` | Font style | `padding` | `Number` | `10` | Number of pixels to add above and below the title text. -| `lineHeight` | `Number` | `undef...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
src/core/core.scale.js
@@ -28,11 +28,13 @@ defaults._set('scale', { // scale label scaleLabel: { + // display property + display: false, + // actual label labelString: '', - // display property - display: false, + lineHeight: 1.2 }, // label settings @@ -77,6 +79,12 @@ module.exports = function(Chart) { }; } +...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
src/helpers/helpers.options.js
@@ -0,0 +1,35 @@ +'use strict'; + +/** + * @namespace Chart.helpers.options + */ +module.exports = { + /** + * Converts the given line height `value` in pixels for a specific font `size`. + * @param {Number|String} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em'). + * @param {Number} size - The font...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
src/helpers/index.js
@@ -3,4 +3,5 @@ module.exports = require('./helpers.core'); module.exports.easing = require('./helpers.easing'); module.exports.canvas = require('./helpers.canvas'); +module.exports.options = require('./helpers.options'); module.exports.time = require('./helpers.time');
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
src/plugins/plugin.title.js
@@ -8,6 +8,7 @@ defaults._set('global', { display: false, fontStyle: 'bold', fullWidth: true, + lineHeight: 1.2, padding: 10, position: 'top', text: '', @@ -114,7 +115,7 @@ module.exports = function(Chart) { fontSize = valueOrDefault(opts.fontSize, defaults.global.defaultFontSize), minSize ...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/core.helpers.tests.js
@@ -128,8 +128,9 @@ describe('Core helper tests', function() { }, position: 'right', scaleLabel: { - labelString: '', display: false, + labelString: '', + lineHeight: 1.2 }, ticks: { beginAtZero: false, @@ -168,8 +169,9 @@ describe('Core helper tests', function...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/helpers.options.tests.js
@@ -0,0 +1,27 @@ +'use strict'; + +describe('Chart.helpers.options', function() { + var options = Chart.helpers.options; + + describe('toLineHeight', function() { + it ('should support keyword values', function() { + expect(options.toLineHeight('normal', 16)).toBe(16 * 1.2); + }); + it ('should support unitless va...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/plugin.title.tests.js
@@ -13,6 +13,7 @@ describe('Title block tests', function() { fullWidth: true, weight: 2000, fontStyle: 'bold', + lineHeight: 1.2, padding: 10, text: '' }); @@ -43,7 +44,7 @@ describe('Title block tests', function() { expect(minSize).toEqual({ width: 400, - height: 32 + height: 34.4...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/scale.category.tests.js
@@ -30,8 +30,9 @@ describe('Category scale tests', function() { }, position: 'bottom', scaleLabel: { + display: false, labelString: '', - display: false + lineHeight: 1.2 }, ticks: { beginAtZero: false,
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/scale.linear.tests.js
@@ -28,8 +28,9 @@ describe('Linear Scale', function() { }, position: 'left', scaleLabel: { - labelString: '', display: false, + labelString: '', + lineHeight: 1.2 }, ticks: { beginAtZero: false, @@ -772,15 +773,15 @@ describe('Linear Scale', function() { expect(xScale.paddingBo...
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/scale.logarithmic.tests.js
@@ -27,8 +27,9 @@ describe('Logarithmic Scale tests', function() { }, position: 'left', scaleLabel: { - labelString: '', display: false, + labelString: '', + lineHeight: 1.2 }, ticks: { beginAtZero: false,
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/scale.radialLinear.tests.js
@@ -40,8 +40,9 @@ describe('Test the radial linear scale', function() { }, position: 'chartArea', scaleLabel: { - labelString: '', display: false, + labelString: '', + lineHeight: 1.2 }, ticks: { backdropColor: 'rgba(255,255,255,0.75)',
true
Other
chartjs
Chart.js
090196c07c601cdaf5a91ff0ba731cc46945c101.json
Add support for line height CSS values (#4531) The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix in...
test/specs/scale.time.tests.js
@@ -81,8 +81,9 @@ describe('Time scale tests', function() { }, position: 'bottom', scaleLabel: { + display: false, labelString: '', - display: false + lineHeight: 1.2 }, ticks: { beginAtZero: false,
true
Other
chartjs
Chart.js
a0fc1c9019503e873405fe7f8e81b1e1092feb79.json
Add link to Java integration (#4527)
docs/notes/extensions.md
@@ -45,3 +45,6 @@ In addition, many plugins can be found on the [npm registry](https://www.npmjs.c ### Vue.js - <a href="https://github.com/apertureless/vue-chartjs/" target="_blank">vue-chartjs</a> + +### Java + - <a href="https://github.com/mdewilde/chart/" target="_blank">Chart.java</a>
false
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/axes/cartesian/time.md
@@ -13,9 +13,9 @@ The following options are provided by the time scale. They are all located in th | `max` | [Time](#date-formats) | | If defined, this will override the data maximum | `min` | [Time](#date-formats) | | If defined, this will override the data minimum | `parser` | `String` or `Function` | | Custom par...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/charts/bar.md
@@ -73,7 +73,7 @@ Some properties can be specified as an array. If these are set to an array value | `backgroundColor` | `Color/Color[]` | The fill color of the bar. See [Colors](../general/colors.md#colors) | `borderColor` | `Color/Color[]` | The color of the bar border. See [Colors](../general/colors.md#colors) | ...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/charts/bubble.md
@@ -53,7 +53,7 @@ All properties, except `label` can be specified as an array. If these are set to ## Config Options -The bubble chart has no unique configuration options. To configure options common to all of the bubbles, the [point element options](../configuration/elements/point.md#point-configuration) are used...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/charts/line.md
@@ -55,14 +55,14 @@ All point* properties can be specified as an array. If these are set to an array | `borderDashOffset` | `Number` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset) | `borderCapStyle` | `String` | Cap style of the line. See ...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/charts/polar.md
@@ -56,7 +56,7 @@ The following options can be included in a polar area chart dataset to configure ## Config Options -These are the customisation options specific to Polar Area charts. These options are merged with the [global chart configuration options](#global-chart-configuration), and form the options of the c...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/charts/radar.md
@@ -82,7 +82,7 @@ All point* properties can be specified as an array. If these are set to an array | `pointBorderColor` | `Color/Color[]` | The border color for points. | `pointBorderWidth` | `Number/Number[]` | The width of the point border in pixels. | `pointRadius` | `Number/Number[]` | The radius of the point sh...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/configuration/legend.md
@@ -34,8 +34,8 @@ The legend label configuration is nested below the legend configuration using th | `fontColor` | Color | `'#666'` | Color of text | `fontFamily` | `String` | `"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"` | Font family of legend text. | `padding` | `Number` | `10` | Padding between rows of ...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/configuration/tooltip.md
@@ -7,7 +7,7 @@ The tooltip configuration is passed into the `options.tooltips` namespace. The g | Name | Type | Default | Description | -----| ---- | --------| ----------- | `enabled` | `Boolean` | `true` | Are tooltips enabled -| `custom` | `Function` | `null` | See [custom tooltip](#custom-tooltips) section. +| `...
true
Other
chartjs
Chart.js
f16d8a32e2641bae8483a5194b7ddb1ec56ab5fa.json
Fix links in documentations (#4477) * Fix relative links in documentation of configurations * Fix relative link of 'Time Units' * Fix relative links for chart types documentations * Fix the release version link in developers/plugins
docs/developers/plugins.md
@@ -1,6 +1,6 @@ # Plugins -Plugins are the most efficient way to customize or change the default behavior of a chart. They have been introduced at [version 2.1.0](https://github.com/chartjs/Chart.js/releases/tag/2.1.0) (global plugins only) and extended at [version 2.5.0](https://github.com/chartjs/Chart.js/releases...
true
Other
chartjs
Chart.js
463a8dd77899cde1a2c542c6c90d0c7614285f16.json
Simplify formulas based on code review
src/helpers/helpers.easing.js
@@ -131,9 +131,9 @@ var effects = { return 1; } if (!p) { - p = 1 * 0.3; + p = 0.3; } - if (a < Math.abs(1)) { + if (a < 1) { a = 1; s = p / 4; } else { @@ -153,9 +153,9 @@ var effects = { return 1; } if (!p) { - p = 1 * 0.3; + p = 0.3; } - if (a < Math.abs(1)) { + if (a...
false
Other
chartjs
Chart.js
56050dc9b7a17130efdbdcd3b8de46b728f25b84.json
Move easing effects in separate file + unit tests
src/chart.js
@@ -4,6 +4,7 @@ var Chart = require('./core/core')(); require('./helpers/helpers.core')(Chart); +require('./helpers/helpers.easing')(Chart); require('./core/core.helpers')(Chart); require('./helpers/helpers.time')(Chart); require('./helpers/helpers.canvas')(Chart);
true
Other
chartjs
Chart.js
56050dc9b7a17130efdbdcd3b8de46b728f25b84.json
Move easing effects in separate file + unit tests
src/core/core.controller.js
@@ -484,7 +484,7 @@ module.exports = function(Chart) { easing: config.easing || animationOptions.easing, render: function(chart, animationObject) { - var easingFunction = helpers.easingEffects[animationObject.easing]; + var easingFunction = helpers.easing.effects[animationObject.easing]; ...
true
Other
chartjs
Chart.js
56050dc9b7a17130efdbdcd3b8de46b728f25b84.json
Move easing effects in separate file + unit tests
src/core/core.helpers.js
@@ -388,203 +388,6 @@ module.exports = function(Chart) { return niceFraction * Math.pow(10, exponent); }; - // Easing functions adapted from Robert Penner's easing equations - // http://www.robertpenner.com/easing/ - var easingEffects = helpers.easingEffects = { - linear: function(t) { - return t; - }, - ea...
true
Other
chartjs
Chart.js
56050dc9b7a17130efdbdcd3b8de46b728f25b84.json
Move easing effects in separate file + unit tests
src/helpers/helpers.easing.js
@@ -0,0 +1,252 @@ +'use strict'; + +/** + * Easing functions adapted from Robert Penner's easing equations. + * http://www.robertpenner.com/easing/ + */ +var effects = { + linear: function(t) { + return t; + }, + + easeInQuad: function(t) { + return t * t; + }, + + easeOutQuad: function(t) { + return -t * (t - 2); +...
true
Other
chartjs
Chart.js
56050dc9b7a17130efdbdcd3b8de46b728f25b84.json
Move easing effects in separate file + unit tests
test/specs/global.deprecations.tests.js
@@ -84,6 +84,13 @@ describe('Deprecations', function() { }); }); + describe('Chart.helpers.easingEffects', function() { + it('should be defined and an alias of Chart.helpers.easing.effects', function() { + expect(Chart.helpers.easingEffects).toBeDefined(); + expect(Chart.helpers.easingEffects).toBe(Ch...
true
Other
chartjs
Chart.js
56050dc9b7a17130efdbdcd3b8de46b728f25b84.json
Move easing effects in separate file + unit tests
test/specs/helpers.easing.tests.js
@@ -0,0 +1,61 @@ +'use strict'; + +describe('Chart.helpers.easing', function() { + var easing = Chart.helpers.easing; + + describe('effects', function() { + var expected = { + easeInOutBack: [-0, -0.03751855, -0.09255566, -0.07883348, 0.08992579, 0.5, 0.91007421, 1.07883348, 1.09255566, 1.03751855, 1], + easeInOut...
true
Other
chartjs
Chart.js
7d60857819eaab2c16aea4ac7eb527a6ce8df844.json
Use proper reverse option in radial linear scale
src/scales/scale.radialLinear.js
@@ -244,7 +244,7 @@ module.exports = function(Chart) { ctx.lineWidth = angleLineOpts.lineWidth; ctx.strokeStyle = angleLineOpts.color; - var outerDistance = scale.getDistanceFromCenterForValue(opts.reverse ? scale.min : scale.max); + var outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ?...
true
Other
chartjs
Chart.js
7d60857819eaab2c16aea4ac7eb527a6ce8df844.json
Use proper reverse option in radial linear scale
test/specs/scale.radialLinear.tests.js
@@ -401,7 +401,7 @@ describe('Test the radial linear scale', function() { y: 275, }); - chart.scale.options.reverse = true; + chart.scale.options.ticks.reverse = true; chart.update(); expect(chart.scale.getDistanceFromCenterForValue(chart.scale.min)).toBe(233);
true
Other
chartjs
Chart.js
cc9e88aebcbef79f60b560213227792d4324871c.json
Support an array for line chart pointBorderWidth
src/controllers/controller.line.js
@@ -137,7 +137,7 @@ module.exports = function(Chart) { if (!isNaN(custom.borderWidth)) { borderWidth = custom.borderWidth; - } else if (!isNaN(dataset.pointBorderWidth)) { + } else if (!isNaN(dataset.pointBorderWidth) || helpers.isArray(dataset.pointBorderWidth)) { borderWidth = helpers.valueAtIndex...
true
Other
chartjs
Chart.js
cc9e88aebcbef79f60b560213227792d4324871c.json
Support an array for line chart pointBorderWidth
test/specs/controller.line.tests.js
@@ -730,4 +730,24 @@ describe('Line controller tests', function() { expect(point._model.borderWidth).toBe(0); }); + + it('should allow an array as the point border width setting', function() { + var chart = window.acquireChart({ + type: 'line', + data: { + datasets: [{ + data: [10, 15, 0, -4], + ...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
src/core/core.helpers.js
@@ -8,19 +8,7 @@ module.exports = function(Chart) { var helpers = Chart.helpers; // -- Basic js utility methods - helpers.clone = function(obj) { - var objClone = {}; - helpers.each(obj, function(value, key) { - if (helpers.isArray(value)) { - objClone[key] = value.slice(0); - } else if (typeof value ===...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
src/core/core.scaleService.js
@@ -22,7 +22,7 @@ module.exports = function(Chart) { }, getScaleDefaults: function(type) { // Return the scale defaults merged with the global settings so that we always use the latest ones - return this.defaults.hasOwnProperty(type) ? helpers.scaleMerge(Chart.defaults.scale, this.defaults[type]) : {}; + ...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
src/helpers/helpers.core.js
@@ -147,6 +147,110 @@ module.exports = function(Chart) { } return true; + }, + + /** + * Returns a deep copy of `source` without keeping references on objects and arrays. + * @param {*} source - The value to clone. + * @returns {*} + */ + clone: function(source) { + if (helpers.isArray(source)) {...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
src/plugins/plugin.legend.js
@@ -524,7 +524,7 @@ module.exports = function(Chart) { var legend = chart.legend; if (legendOpts) { - legendOpts = helpers.configMerge(Chart.defaults.global.legend, legendOpts); + helpers.mergeIf(legendOpts, Chart.defaults.global.legend); if (legend) { layout.configure(chart, legend, legend...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
src/plugins/plugin.title.js
@@ -224,7 +224,7 @@ module.exports = function(Chart) { var titleBlock = chart.titleBlock; if (titleOpts) { - titleOpts = helpers.configMerge(Chart.defaults.global.title, titleOpts); + helpers.mergeIf(titleOpts, Chart.defaults.global.title); if (titleBlock) { layout.configure(chart, titleBlo...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
test/specs/core.helpers.tests.js
@@ -6,25 +6,6 @@ describe('Core helper tests', function() { helpers = window.Chart.helpers; }); - it('should clone an object', function() { - var testData = { - myProp1: 'abc', - myProp2: ['a', 'b'], - myProp3: { - myProp4: 5, - myProp5: [1, 2] - } - }; - - var clone = helpers.clone(testData); -...
true
Other
chartjs
Chart.js
225bfd36f3daae2cfd0e2869658144ee6bfd988b.json
Rewrite the clone and merge helpers (#4422) The `clone` method now accepts any type of input but also recursively perform a deep copy of the array items. Rewrite the `configMerge` and `scaleMerge` helpers which now rely on a new generic and customizable `merge` method, that one accepts a target object in which multipl...
test/specs/helpers.core.tests.js
@@ -236,4 +236,137 @@ describe('Chart.helpers.core', function() { expect(helpers.arrayEquals([o0, o1, o2], [o0, o1, o2])).toBeTruthy(); }); }); + + describe('clone', function() { + it('should clone primitive values', function() { + expect(helpers.clone()).toBe(undefined); + expect(helpers.clone(null)).toB...
true
Other
chartjs
Chart.js
6f317135a3b87b6ff62660adccd1ee063240d46f.json
Clamp radius when drawing rounded rectangle (#4448)
src/helpers/helpers.canvas.js
@@ -24,20 +24,22 @@ module.exports = function(Chart) { * @param {Number} width - The rectangle's width. * @param {Number} height - The rectangle's height. * @param {Number} radius - The rounded amount (in pixels) for the four corners. - * @todo handler `radius` as top-left, top-right, bottom-right, bottom...
false
Other
chartjs
Chart.js
548edc65ea96ac51ab17bde2942fd6f319f63e8c.json
Fix non-passive event listener warning in Chrome Deprecate `addEvent` and `removeEvent`, and move implementation in `platform.dom.js`. Add 'options' feature detection to register event listeners as passive and prevent warning in Chrome.
src/core/core.helpers.js
@@ -666,24 +666,6 @@ module.exports = function(Chart) { }; }; - helpers.addEvent = function(node, eventType, method) { - if (node.addEventListener) { - node.addEventListener(eventType, method); - } else if (node.attachEvent) { - node.attachEvent('on' + eventType, method); - } else { - node['on' + eventT...
true
Other
chartjs
Chart.js
548edc65ea96ac51ab17bde2942fd6f319f63e8c.json
Fix non-passive event listener warning in Chrome Deprecate `addEvent` and `removeEvent`, and move implementation in `platform.dom.js`. Add 'options' feature detection to register event listeners as passive and prevent warning in Chrome.
src/platforms/platform.dom.js
@@ -92,6 +92,38 @@ module.exports = function(Chart) { return canvas; } + /** + * Detects support for options object argument in addEventListener. + * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + * @private + */ + var supportsEventListenerOpti...
true
Other
chartjs
Chart.js
548edc65ea96ac51ab17bde2942fd6f319f63e8c.json
Fix non-passive event listener warning in Chrome Deprecate `addEvent` and `removeEvent`, and move implementation in `platform.dom.js`. Add 'options' feature detection to register event listeners as passive and prevent warning in Chrome.
test/specs/global.deprecations.tests.js
@@ -101,6 +101,33 @@ describe('Deprecations', function() { expect(Chart.helpers.canvas.roundedRect).toHaveBeenCalledWith(ctx, 10, 20, 30, 40, 5); }); }); + + describe('Chart.helpers.addEvent', function() { + it('should be defined and a function', function() { + expect(Chart.helpers.addEvent).toBeDefin...
true
Other
chartjs
Chart.js
961911065fe7ee6febb734ab91abd290086ab6ae.json
Fix arguments in plugin interface description * Fixed arguments in IPlugin#before/afterDatasetUpdate description * Fixed arguments in IPlugin#before/afterDatasetDraw description
src/core/core.plugin.js
@@ -215,8 +215,8 @@ module.exports = function(Chart) { * returns `false`, the datasets update is cancelled until another `update` is triggered. * @param {Chart} chart - The chart instance. * @param {Object} args - The call arguments. - * @param {Object} args.index - The dataset index. - * @param {Number} arg...
false
Other
chartjs
Chart.js
7a02d93db4025387adfbc91fb2bc5e250f0a0672.json
Add note regarding non-existant fonts
docs/general/fonts.md
@@ -26,3 +26,7 @@ let chart = new Chart(ctx, { | `defaultFontFamily` | `String` | `"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"` | Default font family for all text. | `defaultFontSize` | `Number` | `12` | Default font size (in px) for text. Does not apply to radialLinear scale point labels. | `defaultFontSty...
false
Other
chartjs
Chart.js
009ae4dec6db9d8b94a77cad3dffbf907e720ad4.json
Support hover animation duration during updates (#4300) See discussion in the issue for context and possible approaches. When invoking update() inside an event handler, such as onHover, `options.hover.animationDuration` was not being respected. Given that some use cases may require additional animation properties...
docs/developers/api.md
@@ -17,7 +17,7 @@ This must be called before the canvas is reused for a new chart. myLineChart.destroy(); ``` -## .update(duration, lazy) +## .update(config) Triggers an update of the chart. This can be safely called after updating the data object. This will update all scales, legends, and then re-render the cha...
true
Other
chartjs
Chart.js
009ae4dec6db9d8b94a77cad3dffbf907e720ad4.json
Support hover animation duration during updates (#4300) See discussion in the issue for context and possible approaches. When invoking update() inside an event handler, such as onHover, `options.hover.animationDuration` was not being respected. Given that some use cases may require additional animation properties...
src/core/core.controller.js
@@ -334,9 +334,17 @@ module.exports = function(Chart) { this.tooltip.initialize(); }, - update: function(animationDuration, lazy) { + update: function(config) { var me = this; + if (!config || typeof config !== 'object') { + // backwards compatibility + config = { + duration: config, + ...
true
Other
chartjs
Chart.js
009ae4dec6db9d8b94a77cad3dffbf907e720ad4.json
Support hover animation duration during updates (#4300) See discussion in the issue for context and possible approaches. When invoking update() inside an event handler, such as onHover, `options.hover.animationDuration` was not being respected. Given that some use cases may require additional animation properties...
test/specs/core.controller.tests.js
@@ -807,4 +807,46 @@ describe('Chart', function() { ]); }); }); + + describe('controller.update', function() { + beforeEach(function() { + this.chart = acquireChart({ + type: 'doughnut', + options: { + animation: { + easing: 'linear', + duration: 500 + } + } + }); + + this.add...
true
Other
chartjs
Chart.js
009ae4dec6db9d8b94a77cad3dffbf907e720ad4.json
Support hover animation duration during updates (#4300) See discussion in the issue for context and possible approaches. When invoking update() inside an event handler, such as onHover, `options.hover.animationDuration` was not being respected. Given that some use cases may require additional animation properties...
test/specs/global.deprecations.tests.js
@@ -1,4 +1,60 @@ describe('Deprecations', function() { + describe('Version 2.7.0', function() { + describe('Chart.Controller.update(duration, lazy)', function() { + beforeEach(function() { + this.chart = acquireChart({ + type: 'doughnut', + options: { + animation: { + easing: 'linear', + ...
true
Other
chartjs
Chart.js
9e6a6112a436143d353115e73c974a6f6b2f7713.json
Fix Tiny Typo in Labelling.md
docs/axes/labelling.md
@@ -9,7 +9,7 @@ The scale label configuration is nested under the scale configuration in the `sc | Name | Type | Default | Description | -----| ---- | --------| ----------- | `display` | `Boolean` | `false` | If true, display the axis title. -| `labelString` | `String` | `''` | The text for the title. (i.e. "# of Pe...
false
Other
chartjs
Chart.js
7423c48eb7af78fb05008f49964d9520c0db83a4.json
Fix round option for time scales
src/scales/scale.time.js
@@ -125,7 +125,7 @@ module.exports = function(Chart) { if (timeOpts.min) { var minMoment = timeHelpers.parseTime(me, timeOpts.min); if (timeOpts.round) { - minMoment.round(timeOpts.round); + minMoment.startOf(timeOpts.round); } minTimestamp = minMoment.valueOf(); }
false
Other
chartjs
Chart.js
7ee8da9c7f5b6d48115c5b4afa30344ce9399e15.json
Fix broken link on animations page #4324
docs/configuration/animations.md
@@ -93,4 +93,4 @@ var chart = new Chart(ctx, { }); ``` -Another example usage of these callbacks can be found on [Github](https://github.com/chartjs/Chart.js/blob/master/samples/animation/progress-bar.html): this sample displays a progress bar showing how far along the animation is. +Another example usage of these ...
false
Other
chartjs
Chart.js
a9308301e34d3fb39462a8ed24e0fd09c7f388ef.json
Fix vertical alignment of legend labels (#4318) Ensure that disabled legend style is drawn in the center of the text and that the text is correctly centered in the box.
src/plugins/plugin.legend.js
@@ -320,7 +320,7 @@ module.exports = function(Chart) { // Canvas setup ctx.textAlign = 'left'; - ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle'; ctx.lineWidth = 0.5; ctx.strokeStyle = fontColor; // for strikethrough effect ctx.fillStyle = fontColor; // render in correct colour ...
false
Other
chartjs
Chart.js
55e7b462da1cd8e3fd37eb38c95b3a65ed7d79af.json
Update bower.json to include correct homepage URL
bower.json
@@ -2,7 +2,7 @@ "name": "Chart.js", "version": "2.1.0", "description": "Simple HTML5 Charts using the canvas element", - "homepage": "https://github.com/nnnick/Chart.js", + "homepage": "https://github.com/chartjs/Chart.js", "author": "nnnick", "license": "MIT", "main": [
false
Other
chartjs
Chart.js
38373300eef9fe31204e8421cae1263a5f3b94d0.json
Improve time scale for zoom and pan * Improve time scale for zoom and pan Improve category scale when zoomed * Fix CI test
src/scales/scale.category.js
@@ -12,7 +12,7 @@ module.exports = function(Chart) { // Implement this so that determineDataLimits: function() { this.minIndex = 0; - this.maxIndex = this.chart.data.labels.length; + this.maxIndex = this.chart.data.labels.length - 1; var findIndex; if (this.options.ticks.min !== undefined) { @@...
true
Other
chartjs
Chart.js
38373300eef9fe31204e8421cae1263a5f3b94d0.json
Improve time scale for zoom and pan * Improve time scale for zoom and pan Improve category scale when zoomed * Fix CI test
src/scales/scale.time.js
@@ -208,8 +208,9 @@ module.exports = function(Chart) { unitDefinition = time.units[unitDefinitionIndex]; this.tickUnit = unitDefinition.name; - this.leadingUnitBuffer = this.firstTick.diff(this.firstTick.clone().startOf(this.tickUnit), this.tickUnit, true); - this.scaleSizeInUnits = this.lastT...
true
Other
chartjs
Chart.js
38373300eef9fe31204e8421cae1263a5f3b94d0.json
Improve time scale for zoom and pan * Improve time scale for zoom and pan Improve category scale when zoomed * Fix CI test
test/scale.time.tests.js
@@ -13,7 +13,7 @@ describe('Time scale tests', function() { var result = false; var diff = actual.diff(expected.value, expected.unit, true); - result = Math.abs(diff) < 0.5; + result = Math.abs(diff) < (expected.threshold !== undefined ? expected.threshold : 0.5); return { pas...
true
Other
chartjs
Chart.js
cb54f30c970672488a239a2d371d55dfe3fb8864.json
Implement getValueForPixel for category scale
src/scales/scale.category.js
@@ -69,6 +69,27 @@ module.exports = function(Chart) { }, getPixelForTick: function(index, includeOffset) { return this.getPixelForValue(this.ticks[index], index + this.minIndex, null, includeOffset); + }, + getValueForPixel: function(pixel) + { + var value +; var offsetAmt = Math.max((this.ticks.length...
true
Other
chartjs
Chart.js
cb54f30c970672488a239a2d371d55dfe3fb8864.json
Implement getValueForPixel for category scale
test/scale.category.tests.js
@@ -146,17 +146,23 @@ describe('Category scale tests', function() { expect(scale.getPixelForValue(0, 0, 0, false)).toBe(33); expect(scale.getPixelForValue(0, 0, 0, true)).toBe(85); + expect(scale.getValueForPixel(33)).toBe(0); + expect(scale.getValueForPixel(85)).toBe(0); expect(scale.getPixelForValue(0,...
true
Other
chartjs
Chart.js
56411bdcd48e9814c1a2d768e8c4eb0b449bd24a.json
Increase tolerance for CI
test/scale.time.tests.js
@@ -13,7 +13,7 @@ describe('Time scale tests', function() { var result = false; var diff = actual.diff(expected.value, expected.unit, true); - result = Math.abs(diff) < 0.3; + result = Math.abs(diff) < 0.5; return { pass: result
false
Other
chartjs
Chart.js
314f398887d0858802c37a29d4866873e7b7de82.json
Fix tooltip body
src/core/core.controller.js
@@ -575,7 +575,7 @@ module.exports = function(Chart) { // The usual updates this.tooltip.initialize(); this.tooltip._active = this.tooltipActive; - this.tooltip.update(); + this.tooltip.update(true); } // Hover animations
false
Other
chartjs
Chart.js
7cbc08aed7698e82f041dd4464384a1b1b1ea816.json
Add license field to package files
bower.json
@@ -4,6 +4,7 @@ "description": "Simple HTML5 Charts using the canvas element", "homepage": "https://github.com/nnnick/Chart.js", "author": "nnnick", + "license": "MIT", "main": [ "dist/Chart.js" ],
true
Other
chartjs
Chart.js
7cbc08aed7698e82f041dd4464384a1b1b1ea816.json
Add license field to package files
package.json
@@ -3,6 +3,7 @@ "homepage": "http://www.chartjs.org", "description": "Simple HTML5 charts using the canvas element.", "version": "2.0.2", + "license": "MIT", "main": "src/chart.js", "repository": { "type": "git",
true
Other
chartjs
Chart.js
73bc52f196062f1998b7b5461f76eeb9a0fb4432.json
Update radial linear tests
gulpfile.js
@@ -47,8 +47,6 @@ var testFiles = [ '!./test/controller.line.tests.js', '!./test/core.layoutService.tests.js', '!./test/defaultConfig.tests.js', - '!./test/scale.radialLinear.tests.js', - //'!./test/scale.time.tests.js' ]; gulp.task('build', buildTask);
true
Other
chartjs
Chart.js
73bc52f196062f1998b7b5461f76eeb9a0fb4432.json
Update radial linear tests
test/scale.radialLinear.tests.js
@@ -1,5 +1,17 @@ // Tests for the radial linear scale used by the polar area and radar charts describe('Test the radial linear scale', function() { + var chartInstance; + + beforeEach(function() { + window.addDefaultMatchers(jasmine); + }); + + afterEach(function() { + if (chartInstance) { + releaseChart(chartIns...
true
Other
chartjs
Chart.js
7aa1463c1570507b337a14faa9166f78ddfa4f25.json
Remove bad tests from linear scale
test/scale.linear.tests.js
@@ -658,18 +658,18 @@ describe('Linear Scale', function() { }); var xScale = chartInstance.scales.xScale0; - expect(xScale.paddingTop).toBe(0); - expect(xScale.paddingBottom).toBe(0); - expect(xScale.paddingLeft).toBe(0); - expect(xScale.paddingRight).toBe(13.5); + expect(xScale.paddingTop).toBeCloseToPixe...
false
Other
chartjs
Chart.js
34992bc4cbe53a7ca6f90912c406c52778ef86b0.json
Fix doughnut test
test/controller.doughnut.tests.js
@@ -65,7 +65,7 @@ describe('Doughnut controller tests', function() { }, options: { animation: { - animateRotate: true, + animateRotate: false, animateScale: false }, cutoutPercentage: 50, @@ -88,19 +88,19 @@ describe('Doughnut controller tests', function() { expect(meta.data.le...
false
Other
chartjs
Chart.js
200abc184ba8a9ff1a5ac091e10fd024690392fb.json
update isDatasetVisible call
src/scales/scale.time.js
@@ -104,7 +104,7 @@ module.exports = function(Chart) { helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { var momentsForDataset = []; - var datasetVisible = helpers.isDatasetVisible(dataset); + var datasetVisible = this.chart.isDatasetVisible(datasetIndex); if (typeof datas...
false
Other
chartjs
Chart.js
0447fda26d4276a92f01b13c341f0b785c346ea3.json
Update readme to link to previous versions Note - this removed now not required mention of liquid tags in docs.
README.md
@@ -20,7 +20,7 @@ CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.0.0/Chart.js ## Documentation -You can find documentation at [www.chartjs.org/docs](http://www.chartjs.org/docs). The markdown files that build the site are available under `/docs`. Please note - in some of the json examples of configuration ...
false
Other
chartjs
Chart.js
eb14481d02b42a35836306af6ff95baf022df360.json
Fix legend tests and disable other failing tests
gulpfile.js
@@ -40,7 +40,16 @@ var preTestFiles = [ var testFiles = [ './test/mockContext.js', - './test/*.js' + './test/*.js', + + // Disable tests which need to be rewritten based on changes introduced by + // the following changes: https://github.com/chartjs/Chart.js/pull/2346 + '!./test/controller.line.tests.js', + ...
true
Other
chartjs
Chart.js
eb14481d02b42a35836306af6ff95baf022df360.json
Fix legend tests and disable other failing tests
test/controller.bar.tests.js
@@ -265,10 +265,10 @@ describe('Bar controller tests', function() { { b: 290, w: 91, x: 322, y: 161 }, { b: 290, w: 91, x: 436, y: 419 } ].forEach(function(values, i) { - expect(meta0.data[i]._model.base).toBeCloseToPixel(values.b); - expect(meta0.data[i]._model.width).toBeCloseToPixel(values.w); - ...
true
Other
chartjs
Chart.js
eb14481d02b42a35836306af6ff95baf022df360.json
Fix legend tests and disable other failing tests
test/core.layoutService.tests.js
@@ -228,7 +228,7 @@ describe('Test the layout service', function() { expect(chart.scales.xScale1.bottom).toBeCloseToPixel(512); expect(chart.scales.xScale1.left).toBeCloseToPixel(45); expect(chart.scales.xScale1.right).toBeCloseToPixel(512); - expect(chart.scales.x1.top).toBeCloseToPixel(484); + expect(chart...
true
Other
chartjs
Chart.js
eb14481d02b42a35836306af6ff95baf022df360.json
Fix legend tests and disable other failing tests
test/core.legend.tests.js
@@ -1,6 +1,14 @@ // Test the rectangle element - describe('Legend block tests', function() { + + beforeEach(function() { + window.addDefaultMatchers(jasmine); + }); + + afterEach(function() { + window.releaseAllCharts(); + }); + it('Should be constructed', function() { var legend = new Chart.Legend({}); exp...
true
Other
chartjs
Chart.js
a93b3f45ac0e25bdda01d558acbffbe1d1e36e24.json
Fix helpers, layoutService and logarithmic tests
test/core.helpers.tests.js
@@ -6,7 +6,7 @@ describe('Core helper tests', function() { helpers = window.Chart.helpers; }); - it('Should iterate over an array and pass the extra data to that function', function() { + it('should iterate over an array and pass the extra data to that function', function() { var testData = [0, 9, "abc"]; ...
true
Other
chartjs
Chart.js
a93b3f45ac0e25bdda01d558acbffbe1d1e36e24.json
Fix helpers, layoutService and logarithmic tests
test/core.layoutService.tests.js
@@ -1,360 +1,244 @@ // Tests of the scale service describe('Test the layout service', function() { - it('should fit a simple chart with 2 scales', function() { - var chartInstance = { - boxes: [], - }; - - var xScaleID = 'xScale'; - var yScaleID = 'yScale'; - var mockData = { - datasets: [{ - yAxisID: ySc...
true
Other
chartjs
Chart.js
a93b3f45ac0e25bdda01d558acbffbe1d1e36e24.json
Fix helpers, layoutService and logarithmic tests
test/scale.logarithmic.tests.js
@@ -1,12 +1,20 @@ describe('Logarithmic Scale tests', function() { - it('Should register the constructor with the scale service', function() { + beforeEach(function() { + window.addDefaultMatchers(jasmine); + }); + + afterEach(function() { + window.releaseAllCharts(); + }); + + it('should register the constructor ...
true
Other
chartjs
Chart.js
aa0933e040b456e23557a999408f6047578e631c.json
Avoid meta data access in calculateCircumference Fix access of uninitialized meta data while calculating circumference in the polar area chart by caching the number of visible elements in the update() method. Also make the calculateTotal() of the doughnut chart tolerant of uninitialized meta data.
src/controllers/controller.doughnut.js
@@ -265,11 +265,14 @@ module.exports = function(Chart) { }, calculateTotal: function() { + var dataset = this.getDataset(); var meta = this.getMeta(); var total = 0; + var value; - this.getDataset().data.forEach(function(value, index) { - if (!isNaN(value) && !meta.data[index].hidden) { + h...
true