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
c81a55fed1d9da9f97cc26391083876e5471e84f.json
Add jsDelivr as CDN install option (#4881)
docs/getting-started/installation.md
@@ -3,6 +3,7 @@ Chart.js can be installed via npm or bower. It is recommended to get Chart.js th ## npm [![npm](https://img.shields.io/npm/v/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js) +[![npm](https://img.shields.io/npm/dm/chart.js.svg?style=flat-square&maxAge=600)](https://npmj...
false
Other
chartjs
Chart.js
3fe198c86098ae50d5d5e9b74d111d5f8fa74bf0.json
Fix responsive issue when the chart is recreated (#4774) Chrome specific issue that happens when destroying a chart and re-creating it immediately (same animation frame?). The CSS animation used to detect when the canvas become visible is not re-evaluated, breaking responsiveness. Accessing the `offsetParent` property...
src/platforms/platform.dom.js
@@ -236,6 +236,13 @@ function watchForRender(node, handler) { addEventListener(node, type, proxy); }); + // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class + // is removed then added back immediately (same animation frame?). Accessing the + // `offsetParent` property will force a ref...
true
Other
chartjs
Chart.js
3fe198c86098ae50d5d5e9b74d111d5f8fa74bf0.json
Fix responsive issue when the chart is recreated (#4774) Chrome specific issue that happens when destroying a chart and re-creating it immediately (same animation frame?). The CSS animation used to detect when the canvas become visible is not re-evaluated, breaking responsiveness. Accessing the `offsetParent` property...
test/jasmine.utils.js
@@ -75,7 +75,13 @@ function acquireChart(config, options) { wrapper.appendChild(canvas); window.document.body.appendChild(wrapper); - chart = new Chart(canvas.getContext('2d'), config); + try { + chart = new Chart(canvas.getContext('2d'), config); + } catch (e) { + window.document.body.removeChild(wrapper); + ...
true
Other
chartjs
Chart.js
3fe198c86098ae50d5d5e9b74d111d5f8fa74bf0.json
Fix responsive issue when the chart is recreated (#4774) Chrome specific issue that happens when destroying a chart and re-creating it immediately (same animation frame?). The CSS animation used to detect when the canvas become visible is not re-evaluated, breaking responsiveness. Accessing the `offsetParent` property...
test/specs/core.controller.tests.js
@@ -495,6 +495,45 @@ describe('Chart', function() { }); }); }); + + // https://github.com/chartjs/Chart.js/issues/4737 + it('should resize the canvas when re-creating the chart', function(done) { + var chart = acquireChart({ + options: { + responsive: true + } + }, { + wrapper: { + st...
true
Other
chartjs
Chart.js
0bd0654efb4a19f192a485d88daadbe8ee2f44c0.json
fix colour settings of BeforeLabel and BeforeBody (#4783) * fix colour settings of BeforeLabel and BeforeBody * delete redundant variable declaration * collect label colour setting.
src/core/core.tooltip.js
@@ -677,13 +677,16 @@ module.exports = function(Chart) { }; // Before body lines + ctx.fillStyle = mergeOpacity(vm.bodyFontColor, opacity); helpers.each(vm.beforeBody, fillLineOfText); var drawColorBoxes = vm.displayColors; xLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0; // Draw ...
false
Other
chartjs
Chart.js
52145de5db5dc3bae093880429b35954f0034993.json
Fix regression in x-axis interaction mode (#4762)
src/core/core.interaction.js
@@ -215,7 +215,7 @@ module.exports = { * @private */ 'x-axis': function(chart, e) { - return indexMode(chart, e, {intersect: true}); + return indexMode(chart, e, {intersect: false}); }, /**
true
Other
chartjs
Chart.js
52145de5db5dc3bae093880429b35954f0034993.json
Fix regression in x-axis interaction mode (#4762)
test/specs/global.deprecations.tests.js
@@ -325,6 +325,45 @@ describe('Deprecations', function() { }); }); + describe('Version 2.4.0', function() { + describe('x-axis mode', function() { + it ('behaves like index mode with intersect: false', function() { + var data = { + datasets: [{ + label: 'Dataset 1', + data: [10, 20, 30], + ...
true
Other
chartjs
Chart.js
4396a5304172820ed33b0cc2f90458f76796c432.json
Expand scale jsdocs (#4736)
src/core/core.scale.js
@@ -538,17 +538,33 @@ module.exports = function(Chart) { return rawValue; }, - // Used to get the value to display in the tooltip for the data at the given index - // function getLabelForIndex(index, datasetIndex) + /** + * Used to get the value to display in the tooltip for the data at the given index + ...
false
Other
chartjs
Chart.js
543c31d5496526a47123a923fef95c22f6980f4d.json
Add Google Analytics to samples and update badges (#4734) Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.
README.md
@@ -1,8 +1,6 @@ # Chart.js -[![Build Status](https://travis-ci.org/chartjs/Chart.js.svg?branch=master)](https://travis-ci.org/chartjs/Chart.js) [![Code Climate](https://codeclimate.com/github/chartjs/Chart.js/badges/gpa.svg)](https://codeclimate.com/github/chartjs/Chart.js) [![Coverage Status](https://coveralls.io/r...
true
Other
chartjs
Chart.js
543c31d5496526a47123a923fef95c22f6980f4d.json
Add Google Analytics to samples and update badges (#4734) Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.
docs/README.md
@@ -1,6 +1,6 @@ # Chart.js -[![Chart.js on Slack](https://img.shields.io/badge/slack-Chart.js-blue.svg)](https://chart-js-automation.herokuapp.com/) +[![slack](https://img.shields.io/badge/slack-Chart.js-blue.svg?style=flat-square&maxAge=600)](https://chart-js-automation.herokuapp.com/) ## Installation
true
Other
chartjs
Chart.js
543c31d5496526a47123a923fef95c22f6980f4d.json
Add Google Analytics to samples and update badges (#4734) Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.
docs/getting-started/installation.md
@@ -2,22 +2,27 @@ Chart.js can be installed via npm or bower. It is recommended to get Chart.js this way. ## npm +[![npm](https://img.shields.io/npm/v/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js) ```bash npm install chart.js --save ``` ## Bower +[![bower](https://img.shiel...
true
Other
chartjs
Chart.js
543c31d5496526a47123a923fef95c22f6980f4d.json
Add Google Analytics to samples and update badges (#4734) Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.
samples/charts/area/line-boundaries.html
@@ -35,11 +35,11 @@ }; function generateData(config) { - return utils.numbers(utils.merge(inputs, config || {})); + return utils.numbers(Chart.helpers.merge(inputs, config || {})); } function generateLabels(config) { - return utils.months(utils.merge({ + return utils.months(Chart.helpers.merge({...
true
Other
chartjs
Chart.js
543c31d5496526a47123a923fef95c22f6980f4d.json
Add Google Analytics to samples and update badges (#4734) Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.
samples/index.html
@@ -7,6 +7,7 @@ <link rel="stylesheet" type="text/css" href="style.css"> <link rel="icon" href="favicon.ico"> <script src="samples.js"></script> + <script src="utils.js"></script> <title>Chart.js samples</title> </head> <body>
true
Other
chartjs
Chart.js
543c31d5496526a47123a923fef95c22f6980f4d.json
Add Google Analytics to samples and update badges (#4734) Inject the GA tracking snippet for all samples, including the index page. Also update README.md badges using the shields.io service for consistency with flat-square style and cache, and add release badges to the installation documentation page.
samples/utils.js
@@ -1,5 +1,3 @@ -/* global Chart */ - 'use strict'; window.chartColors = { @@ -41,6 +39,8 @@ window.chartColors = { ]; var Samples = global.Samples || (global.Samples = {}); + var Color = global.Color; + Samples.utils = { // Adapted from http://indiegamr.com/generate-repeatable-random-numbers-in-js/ s...
true
Other
chartjs
Chart.js
c7464ebf91af37482912b434a9e5dc25cf46666e.json
Add platform basic implementation (fallback) (#4708) If `window` or `document` are `undefined`, a minimal platform implementation is used instead, which one only returns a context2d read from the given canvas/context.
src/platforms/platform.basic.js
@@ -0,0 +1,15 @@ +/** + * Platform fallback implementation (minimal). + * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939 + */ + +module.exports = { + acquireContext: function(item) { + if (item && item.canvas) { + // Support for any object associated to a canvas (including a context2d) + ...
true
Other
chartjs
Chart.js
c7464ebf91af37482912b434a9e5dc25cf46666e.json
Add platform basic implementation (fallback) (#4708) If `window` or `document` are `undefined`, a minimal platform implementation is used instead, which one only returns a context2d read from the given canvas/context.
src/platforms/platform.dom.js
@@ -305,6 +305,13 @@ function injectCSS(platform, css) { } module.exports = { + /** + * This property holds whether this platform is enabled for the current environment. + * Currently used by platform.js to select the proper implementation. + * @private + */ + _enabled: typeof window !== 'undefined' && typeof d...
true
Other
chartjs
Chart.js
c7464ebf91af37482912b434a9e5dc25cf46666e.json
Add platform basic implementation (fallback) (#4708) If `window` or `document` are `undefined`, a minimal platform implementation is used instead, which one only returns a context2d read from the given canvas/context.
src/platforms/platform.js
@@ -1,10 +1,11 @@ 'use strict'; var helpers = require('../helpers/index'); +var basic = require('./platform.basic'); +var dom = require('./platform.dom'); -// By default, select the browser (DOM) platform. // @TODO Make possible to select another platform at build time. -var implementation = require('./platform....
true
Other
chartjs
Chart.js
459c81d9316e3fa7c02e8670467e7727096c3875.json
Remove trailing `.js` in plugin names (docs)
docs/notes/extensions.md
@@ -13,12 +13,12 @@ In addition, many charts can be found on the [npm registry](https://www.npmjs.co ## Plugins - - <a href="https://github.com/chartjs/chartjs-plugin-annotation" target="_blank">chartjs-plugin-annotation.js</a> - Draws lines and boxes on chart area. - - <a href="https://github.com/chartjs/chartjs-...
false
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
docs/SUMMARY.md
@@ -10,6 +10,7 @@ * [Interactions](general/interactions/README.md) * [Events](general/interactions/events.md) * [Modes](general/interactions/modes.md) + * [Options](general/options.md) * [Colors](general/colors.md) * [Fonts](general/fonts.md) * [Configuration](configuration/README.md) @@ -34,7 +35,...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
docs/charts/bubble.md
@@ -1,6 +1,6 @@ # Bubble Chart -A bubble chart is used to display three dimensions of data at the same time. The location of the bubble is determined by the first two dimensions and the corresponding horizontal and vertical axes. The third dimension is represented by the size of the individual bubbles. +A bubble ch...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
docs/charts/line.md
@@ -6,11 +6,11 @@ A line chart is a way of plotting data points on a line. Often, it is used to sh "type": "line", "data": { "labels": [ - "January", - "February", - "March", - "April", - "May", + "January", + "February...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
docs/configuration/elements.md
@@ -18,14 +18,30 @@ Global point options: `Chart.defaults.global.elements.point` | Name | Type | Default | Description | -----| ---- | --------| ----------- | `radius` | `Number` | `3` | Point radius. -| `pointStyle` | `String` | `circle` | Point style. +| [`pointStyle`](#point-styles) | `String` | `circle` | Point ...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
docs/general/README.md
@@ -1,9 +1,10 @@ -# General Chart.js Configuration +# General Configuration -These sections describe general configuration options that can apply elsewhere in the documentation. +These sections describe general configuration options that can apply elsewhere in the documentation. -* [Colors](./colors.md) defines ac...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
docs/general/options.md
@@ -0,0 +1,45 @@ +# Options + +## Scriptable Options + +Scriptable options also accept a function which is called for each data and that takes the unique argument `context` representing contextual information (see [option context](options.md#option-context)). + +Example: + +```javascript +color: function(context) { + ...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
samples/samples.js
@@ -167,6 +167,12 @@ title: 'HTML tooltips (points)', path: 'tooltips/custom-points.html' }] + }, { + title: 'Scriptable', + items: [{ + title: 'Bubble Chart', + path: 'scriptable/bubble.html' + }] }, { title: 'Advanced', items: [{
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
samples/scriptable/bubble.html
@@ -0,0 +1,129 @@ +<!DOCTYPE html> +<html lang="en-US"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=Edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Scriptable > Bubble | Chart.js sample</title> + <link rel="stylesheet" type="text/css" href=".....
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
samples/utils.js
@@ -12,10 +12,6 @@ window.chartColors = { grey: 'rgb(201, 203, 207)' }; -window.randomScalingFactor = function() { - return (Math.random() > 0.5 ? 1.0 : -1.0) * Math.round(Math.random() * 100); -}; - (function(global) { var Months = [ 'January', @@ -32,6 +28,18 @@ window.randomScalingFactor = function() { ...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
src/controllers/controller.bubble.js
@@ -41,9 +41,14 @@ defaults._set('bubble', { module.exports = function(Chart) { Chart.controllers.bubble = Chart.DatasetController.extend({ - + /** + * @protected + */ dataElementType: elements.Point, + /** + * @protected + */ update: function(reset) { var me = this; var meta = me.getMeta...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
src/helpers/helpers.options.js
@@ -3,7 +3,8 @@ var helpers = require('./helpers.core'); /** - * @namespace Chart.helpers.options + * @alias Chart.helpers.options + * @namespace */ module.exports = { /** @@ -62,5 +63,34 @@ module.exports = { height: t + b, width: l + r }; + }, + + /** + * Evaluates the given `inputs` sequentially...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
test/jasmine.index.js
@@ -43,6 +43,7 @@ var utils = require('./jasmine.utils'); '}'); jasmine.specsFromFixtures = utils.specsFromFixtures; + jasmine.triggerMouseEvent = utils.triggerMouseEvent; beforeEach(function() { jasmine.addMatchers(matchers);
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
test/jasmine.utils.js
@@ -158,11 +158,26 @@ function waitForResize(chart, callback) { }; } +function triggerMouseEvent(chart, type, el) { + var node = chart.canvas; + var rect = node.getBoundingClientRect(); + var event = new MouseEvent(type, { + clientX: rect.left + el._model.x, + clientY: rect.top + el._model.y, + cancelable: true...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
test/specs/controller.bubble.tests.js
@@ -273,160 +273,138 @@ describe('Bubble controller tests', function() { expect(meta.data[4] instanceof Chart.elements.Point).toBe(true); }); - it('should set hover styles', function() { - var chart = window.acquireChart({ - type: 'bubble', - data: { - datasets: [{ - data: [{ - x: 10, - y: ...
true
Other
chartjs
Chart.js
872dfec0f3a99bfbf3dbc84e4b07bde1c986e93d.json
Introduce scriptable options (bubble chart) (#4671) New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details. Add scriptable options document...
test/specs/helpers.options.tests.js
@@ -61,4 +61,65 @@ describe('Chart.helpers.options', function() { {top: 0, right: 0, bottom: 0, left: 0, height: 0, width: 0}); }); }); + + describe('resolve', function() { + it ('should fallback to the first defined input', function() { + expect(options.resolve([42])).toBe(42); + expect(options.resolve(...
true
Other
chartjs
Chart.js
b9afeaf973999516cd3fdfdf4ec7c86b223d9263.json
remove redundant tooltip initialize (#4655)
src/core/core.controller.js
@@ -718,7 +718,6 @@ module.exports = function(Chart) { _data: me.data, _options: me.options.tooltips }, me); - me.tooltip.initialize(); }, /**
false
Other
chartjs
Chart.js
8dca88c7d52f9ec153e920eb2a89254f98b1d44d.json
Fix tests on OSX with retina screen * Fix retina unit test failures * Honor config file formatting * Prevent gulp error on non-zero karma result
.editorconfig
@@ -8,3 +8,11 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = false + +[gulpfile.js] +indent_style = space +indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2
true
Other
chartjs
Chart.js
8dca88c7d52f9ec153e920eb2a89254f98b1d44d.json
Fix tests on OSX with retina screen * Fix retina unit test failures * Honor config file formatting * Prevent gulp error on non-zero karma result
gulpfile.js
@@ -188,7 +188,12 @@ function unittestTask(done) { args: { coverage: !!argv.coverage } - }, done).start(); + }, + // https://github.com/karma-runner/gulp-karma/issues/18 + function(error) { + error = error ? new Error('Karma returned with the error code: ' + error) : undefined; + done(error);...
true
Other
chartjs
Chart.js
8dca88c7d52f9ec153e920eb2a89254f98b1d44d.json
Fix tests on OSX with retina screen * Fix retina unit test failures * Honor config file formatting * Prevent gulp error on non-zero karma result
test/jasmine.index.js
@@ -22,6 +22,10 @@ var utils = require('./jasmine.utils'); return new Context(); } + // force ratio=1 for tests on high-res/retina devices + // fixes https://github.com/chartjs/Chart.js/issues/4515 + window.devicePixelRatio = 1; + window.acquireChart = acquireChart; window.releaseChart = releaseChart; wind...
true
Other
chartjs
Chart.js
8dca88c7d52f9ec153e920eb2a89254f98b1d44d.json
Fix tests on OSX with retina screen * Fix retina unit test failures * Honor config file formatting * Prevent gulp error on non-zero karma result
test/specs/platform.dom.tests.js
@@ -394,8 +394,8 @@ describe('Platform.dom', function() { expect(notifiedEvent.type).toBe(evt.type); // Relative Position - expect(notifiedEvent.x).toBe(chart.width / 2); - expect(notifiedEvent.y).toBe(chart.height / 2); + expect(notifiedEvent.x).toBeCloseToPixel(chart.width / 2); + expect(notifiedEve...
true
Other
chartjs
Chart.js
2c52209ba73cc9b190608319dbba0593f3df455e.json
Replace the IFRAME resizer by DIVs (#4596) Resize detection is now based on scroll events from two divs nested under a main one. Implementation inspired from https://github.com/marcj/css-element-queries.
src/core/core.controller.js
@@ -731,9 +731,7 @@ module.exports = function(Chart) { listeners[type] = listener; }); - // Responsiveness is currently based on the use of an iframe, however this method causes - // performance issues and could be troublesome when used with ad blockers. So make sure - // that the user is still able to...
true
Other
chartjs
Chart.js
2c52209ba73cc9b190608319dbba0593f3df455e.json
Replace the IFRAME resizer by DIVs (#4596) Resize detection is now based on scroll events from two divs nested under a main one. Implementation inspired from https://github.com/marcj/css-element-queries.
src/platforms/platform.dom.js
@@ -165,43 +165,62 @@ function throttled(fn, thisArg) { }; } +// Implementation based on https://github.com/marcj/css-element-queries function createResizer(handler) { - var iframe = document.createElement('iframe'); - iframe.className = 'chartjs-hidden-iframe'; - iframe.style.cssText = - 'display:block;' + - '...
true
Other
chartjs
Chart.js
2c52209ba73cc9b190608319dbba0593f3df455e.json
Replace the IFRAME resizer by DIVs (#4596) Resize detection is now based on scroll events from two divs nested under a main one. Implementation inspired from https://github.com/marcj/css-element-queries.
test/specs/core.controller.tests.js
@@ -420,7 +420,8 @@ describe('Chart', function() { waitForResize(chart, function() { var resizer = wrapper.firstChild; - expect(resizer.tagName).toBe('IFRAME'); + expect(resizer.className).toBe('chartjs-size-monitor'); + expect(resizer.tagName).toBe('DIV'); expect(chart).toBeChartOfSize({ ...
true
Other
chartjs
Chart.js
f90ee8c786c24e44a252964c74970382d9c39016.json
Add support for detached canvas element (#4591) Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes fro...
src/chart.js
@@ -60,6 +60,8 @@ plugins.push( Chart.plugins.register(plugins); +Chart.platform.initialize(); + module.exports = Chart; if (typeof window !== 'undefined') { window.Chart = Chart;
true
Other
chartjs
Chart.js
f90ee8c786c24e44a252964c74970382d9c39016.json
Add support for detached canvas element (#4591) Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes fro...
src/core/core.helpers.js
@@ -500,6 +500,10 @@ module.exports = function(Chart) { }; helpers.getMaximumWidth = function(domNode) { var container = domNode.parentNode; + if (!container) { + return domNode.clientWidth; + } + var paddingLeft = parseInt(helpers.getStyle(container, 'padding-left'), 10); var paddingRight = parseInt(h...
true
Other
chartjs
Chart.js
f90ee8c786c24e44a252964c74970382d9c39016.json
Add support for detached canvas element (#4591) Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes fro...
src/platforms/platform.dom.js
@@ -6,19 +6,21 @@ var helpers = require('../helpers/index'); +var EXPANDO_KEY = '$chartjs'; +var CSS_PREFIX = 'chartjs-'; +var CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor'; +var CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation'; +var ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart']; +...
true
Other
chartjs
Chart.js
f90ee8c786c24e44a252964c74970382d9c39016.json
Add support for detached canvas element (#4591) Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes fro...
src/platforms/platform.js
@@ -12,6 +12,11 @@ var implementation = require('./platform.dom'); * @since 2.4.0 */ module.exports = helpers.extend({ + /** + * @since 2.7.0 + */ + initialize: function() {}, + /** * Called at chart construction time, returns a context2d instance implementing * the [W3C Canvas 2D Context API standard]{@...
true
Other
chartjs
Chart.js
f90ee8c786c24e44a252964c74970382d9c39016.json
Add support for detached canvas element (#4591) Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes fro...
test/jasmine.matchers.js
@@ -123,8 +123,8 @@ function toBeChartOfSize() { var canvas = actual.ctx.canvas; var style = getComputedStyle(canvas); var pixelRatio = actual.options.devicePixelRatio || window.devicePixelRatio; - var dh = parseInt(style.height, 10); - var dw = parseInt(style.width, 10); + var dh = parseInt(style.hei...
true
Other
chartjs
Chart.js
f90ee8c786c24e44a252964c74970382d9c39016.json
Add support for detached canvas element (#4591) Allow to create a chart on a canvas not yet attached to the DOM (detection based on CSS animations described in https://davidwalsh.name/detect-node-insertion). The resize element (IFRAME) is added only when the canvas receives a parent or when `style.display` changes fro...
test/specs/core.controller.tests.js
@@ -363,6 +363,90 @@ describe('Chart', function() { }); }); + // https://github.com/chartjs/Chart.js/issues/3790 + it('should resize the canvas if attached to the DOM after construction', function(done) { + var canvas = document.createElement('canvas'); + var wrapper = document.createElement('div'); + ...
true
Other
chartjs
Chart.js
d480e11ea09681d3d95dd827688ff1a3819117ba.json
Render charts only once in time scale tests (#6347)
test/specs/scale.time.tests.js
@@ -1,6 +1,6 @@ // Time scale tests describe('Time scale tests', function() { - function createScale(data, options) { + function createScale(data, options, dimensions) { var scaleID = 'myScale'; var mockContext = window.createMockContext(); var Constructor = Chart.scaleService.getScaleConstructor('time'); @@...
false
Other
chartjs
Chart.js
d81914ea29aa8fd26a6aef286b37922a267b2252.json
Adjust virtical alignment of tooptip items (#6292)
src/core/core.tooltip.js
@@ -748,25 +748,26 @@ var exports = Element.extend({ drawTitle: function(pt, vm, ctx) { var title = vm.title; + var length = title.length; + var titleFontSize, titleSpacing, i; - if (title.length) { + if (length) { pt.x = getAlignedX(vm, vm._titleAlign); ctx.textAlign = vm._titleAlign; - ctx.te...
true
Other
chartjs
Chart.js
d81914ea29aa8fd26a6aef286b37922a267b2252.json
Adjust virtical alignment of tooptip items (#6292)
src/plugins/plugin.legend.js
@@ -256,7 +256,7 @@ var Legend = Element.extend({ var totalHeight = 0; ctx.textAlign = 'left'; - ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle'; helpers.each(me.legendItems, function(legendItem, i) { var boxWidth = getBoxWidth(labelOpts, fontSize);
true
Other
chartjs
Chart.js
d81914ea29aa8fd26a6aef286b37922a267b2252.json
Adjust virtical alignment of tooptip items (#6292)
test/specs/core.tooltip.tests.js
@@ -1208,14 +1208,14 @@ describe('Core.Tooltip', function() { expect(mockContext.getCalls()).toEqual(Array.prototype.concat(drawBody, [ {name: 'setTextAlign', args: ['left']}, {name: 'setFillStyle', args: ['#fff']}, - {name: 'fillText', args: ['title', 105, 105]}, + {name: 'fillText', args: ['title'...
true
Other
chartjs
Chart.js
bb5f12ad2abea9b92d1d2d1bae991a26a95c3cfb.json
Support object values for bar charts (#6323) * Support object values for bar charts * Check if null or undefined * Refactor category scale code * Make isNullOrUndef global
src/scales/scale.category.js
@@ -1,7 +1,10 @@ 'use strict'; +var helpers = require('../helpers/index'); var Scale = require('../core/core.scale'); +var isNullOrUndef = helpers.isNullOrUndef; + var defaultConfig = { position: 'bottom' }; @@ -10,31 +13,43 @@ module.exports = Scale.extend({ determineDataLimits: function() { var me = th...
true
Other
chartjs
Chart.js
bb5f12ad2abea9b92d1d2d1bae991a26a95c3cfb.json
Support object values for bar charts (#6323) * Support object values for bar charts * Check if null or undefined * Refactor category scale code * Make isNullOrUndef global
test/specs/scale.category.tests.js
@@ -390,4 +390,157 @@ describe('Category scale tests', function() { expect(yScale.getPixelForValue(0, 1, 0)).toBeCloseToPixel(107); expect(yScale.getPixelForValue(0, 3, 0)).toBeCloseToPixel(407); }); + + it('Should get the correct pixel for an object value when horizontal', function() { + var chart = window.ac...
true
Other
chartjs
Chart.js
9eecdf4da1bf79169642edd93275236d1aa9851b.json
Update dataset metadata when axisID changes (#6321)
src/core/core.datasetController.js
@@ -139,13 +139,16 @@ helpers.extend(DatasetController.prototype, { linkScales: function() { var me = this; var meta = me.getMeta(); + var chart = me.chart; + var scales = chart.scales; var dataset = me.getDataset(); + var scalesOpts = chart.options.scales; - if (meta.xAxisID === null || !(meta.xAxisID...
true
Other
chartjs
Chart.js
9eecdf4da1bf79169642edd93275236d1aa9851b.json
Update dataset metadata when axisID changes (#6321)
test/specs/core.datasetController.tests.js
@@ -221,6 +221,45 @@ describe('Chart.DatasetController', function() { expect(meta.data.length).toBe(42); }); + it('should re-synchronize metadata when scaleID changes', function() { + var chart = acquireChart({ + type: 'line', + data: { + datasets: [{ + data: [], + xAxisID: 'firstXScaleID', + ...
true
Other
chartjs
Chart.js
b02a3a8175152d5e6d2bed54d5f0348ee9b3d840.json
Fix regression with lineTension (#6288)
docs/charts/radar.md
@@ -75,7 +75,7 @@ The radar chart allows a number of properties to be specified for each dataset. | [`borderWidth`](#line-styling) | `number` | Yes | - | `3` | [`fill`](#line-styling) | <code>boolean&#124;string</code> | Yes | - | `true` | [`label`](#general) | `string` | - | - | `''` -| [`lineTension`](#line-stylin...
true
Other
chartjs
Chart.js
b02a3a8175152d5e6d2bed54d5f0348ee9b3d840.json
Fix regression with lineTension (#6288)
src/controllers/controller.line.js
@@ -73,8 +73,8 @@ module.exports = DatasetController.extend({ var line = meta.dataset; var points = meta.data || []; var options = me.chart.options; - var dataset = me.getDataset(); - var showLine = me._showLine = valueOrDefault(me._config.showLine, options.showLines); + var config = me._config; + var show...
true
Other
chartjs
Chart.js
b02a3a8175152d5e6d2bed54d5f0348ee9b3d840.json
Fix regression with lineTension (#6288)
src/controllers/controller.radar.js
@@ -69,12 +69,12 @@ module.exports = DatasetController.extend({ var line = meta.dataset; var points = meta.data || []; var scale = me.chart.scale; - var dataset = me.getDataset(); + var config = me._config; var i, ilen; // Compatibility: If the properties are defined with only the old name, use those...
true
Other
chartjs
Chart.js
abbddd1298c6dee2e294bf6689b4e62160087347.json
Allow specifying labels in time scale options (#6257)
docs/axes/cartesian/time.md
@@ -149,7 +149,7 @@ The `ticks.source` property controls the ticks generation. * `'auto'`: generates "optimal" ticks based on scale size and time options * `'data'`: generates ticks from data (including labels from data `{t|x|y}` objects) -* `'labels'`: generates ticks from user given `data.labels` values ONLY +* `...
true
Other
chartjs
Chart.js
abbddd1298c6dee2e294bf6689b4e62160087347.json
Allow specifying labels in time scale options (#6257)
src/core/core.scale.js
@@ -214,6 +214,14 @@ var Scale = Element.extend({ return this._ticks; }, + /** + * @private + */ + _getLabels: function() { + var data = this.chart.data; + return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels; + }, + // These methods are ordered by lifecyle. Utilit...
true
Other
chartjs
Chart.js
abbddd1298c6dee2e294bf6689b4e62160087347.json
Allow specifying labels in time scale options (#6257)
src/scales/scale.category.js
@@ -7,19 +7,9 @@ var defaultConfig = { }; module.exports = Scale.extend({ - /** - * Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use those - * else fall back to data.labels - * @private - */ - getLabels: function() { - var data = this.chart.data; - return this.options....
true
Other
chartjs
Chart.js
abbddd1298c6dee2e294bf6689b4e62160087347.json
Allow specifying labels in time scale options (#6257)
src/scales/scale.time.js
@@ -519,7 +519,7 @@ module.exports = Scale.extend({ var datasets = []; var labels = []; var i, j, ilen, jlen, data, timestamp; - var dataLabels = chart.data.labels || []; + var dataLabels = me._getLabels(); // Convert labels to timestamps for (i = 0, ilen = dataLabels.length; i < ilen; ++i) {
true
Other
chartjs
Chart.js
abbddd1298c6dee2e294bf6689b4e62160087347.json
Allow specifying labels in time scale options (#6257)
test/specs/scale.time.tests.js
@@ -1682,6 +1682,57 @@ describe('Time scale tests', function() { }); }); + describe('labels', function() { + it('should read labels from scale / xLabels / yLabels', function() { + var timeOpts = { + parser: 'YYYY', + unit: 'year', + displayFormats: { + year: 'YYYY' + } + }; + var chart = w...
true
Other
chartjs
Chart.js
e35b8891ce2144f3ca9a842a316d3dd6ff791027.json
Treat 0 as a valid point label for radial scale (#6279)
src/scales/scale.radialLinear.js
@@ -156,7 +156,7 @@ function fitWithPointLabels(scale) { var valueCount = getValueCount(scale); for (i = 0; i < valueCount; i++) { pointPosition = scale.getPointPosition(i, scale.drawingArea + 5); - textSize = measureLabelSize(scale.ctx, plFont.lineHeight, scale.pointLabels[i] || ''); + textSize = measureLabel...
true
Other
chartjs
Chart.js
e35b8891ce2144f3ca9a842a316d3dd6ff791027.json
Treat 0 as a valid point label for radial scale (#6279)
test/specs/scale.radialLinear.tests.js
@@ -366,6 +366,20 @@ describe('Test the radial linear scale', function() { expect(chart.scale.pointLabels).toEqual(['0', '1', '2', '3', '4']); }); + it('Should build point labels from falsy values', function() { + var chart = window.acquireChart({ + type: 'radar', + data: { + datasets: [{ + data: [10...
true
Other
chartjs
Chart.js
e5c68e2c82cb112af0d71860736ba76cf864701d.json
Fix data in financial sample (#6244)
samples/scales/time/financial.html
@@ -17,6 +17,7 @@ <body> <div style="width:1000px"> + <p>This example demonstrates a time series scale by drawing a financial line chart using just the core library. For more specific functionality for financial charts, please see <a href="https://github.com/chartjs/chartjs-chart-financial">chartjs-chart-financia...
false
Other
chartjs
Chart.js
196274defcd206c7581bd20dd005f650aa63c4f5.json
Use tick.major rather than recomputing (#6265)
src/scales/scale.time.js
@@ -672,10 +672,10 @@ module.exports = Scale.extend({ var minorFormat = formats[me._unit]; var majorUnit = me._majorUnit; var majorFormat = formats[majorUnit]; - var majorTime = +adapter.startOf(time, majorUnit); + var tick = ticks[index]; var tickOpts = options.ticks; var majorTickOpts = tickOpts.majo...
false
Other
chartjs
Chart.js
89f2e04ff057848ae43885089fc0060e375746a2.json
Fix ticks generation for vertical time scale (#6258)
src/scales/scale.time.js
@@ -753,10 +753,9 @@ module.exports = Scale.extend({ }, /** - * Crude approximation of what the label width might be * @private */ - getLabelWidth: function(label) { + _getLabelSize: function(label) { var me = this; var ticksOpts = me.options.ticks; var tickLabelWidth = me.ctx.measureText(label).w...
false
Other
chartjs
Chart.js
a9d4ebf8810b30c5681ae41ce380522aa7248d40.json
Remove the old slack token used for notifications. (#6245)
.travis.yml
@@ -15,9 +15,6 @@ script: - gulp bower - cat ./coverage/lcov.info | ./node_modules/.bin/coveralls || true -notifications: - slack: chartjs:pcfCZR6ugg5TEcaLtmIfQYuA - sudo: required dist: trusty
false
Other
chartjs
Chart.js
ddee91eb9f7f68d64b1634c103ebbc8421b23c7a.json
Fix tooltip title in radar charts (#6238)
src/controllers/controller.radar.js
@@ -27,13 +27,6 @@ module.exports = DatasetController.extend({ return this.chart.scale.id; }, - /** - * @private - */ - _getIndexScaleId: function() { - return this.chart.scale.id; - }, - datasetElementType: elements.Line, dataElementType: elements.Point,
true
Other
chartjs
Chart.js
ddee91eb9f7f68d64b1634c103ebbc8421b23c7a.json
Fix tooltip title in radar charts (#6238)
test/specs/controller.radar.tests.js
@@ -444,7 +444,7 @@ describe('Chart.controllers.radar', function() { expect(meta1.data[0]._model.radius).toBe(20); }); - it('should return same id for index and value scale', function() { + it('should return id for value scale', function() { var chart = window.acquireChart({ type: 'radar', data: { @@ ...
true
Other
chartjs
Chart.js
89af7b1383fffd477e0f6245770920e36450ac58.json
Fix missing tooltip value in radar charts (#6209)
src/controllers/controller.radar.js
@@ -20,6 +20,19 @@ defaults._set('radar', { }); module.exports = DatasetController.extend({ + /** + * @private + */ + _getValueScaleId: function() { + return this.chart.scale.id; + }, + + /** + * @private + */ + _getIndexScaleId: function() { + return this.chart.scale.id; + }, datasetElementType: elements...
true
Other
chartjs
Chart.js
89af7b1383fffd477e0f6245770920e36450ac58.json
Fix missing tooltip value in radar charts (#6209)
test/specs/controller.radar.tests.js
@@ -443,4 +443,24 @@ describe('Chart.controllers.radar', function() { expect(meta0.data[0]._model.radius).toBe(10); expect(meta1.data[0]._model.radius).toBe(20); }); + + it('should return same id for index and value scale', function() { + var chart = window.acquireChart({ + type: 'radar', + data: { + da...
true
Other
chartjs
Chart.js
faad02331393b5ae4f07eafc119002fa21966118.json
Fix typo in doughnut documentation (#6186)
docs/charts/doughnut.md
@@ -84,7 +84,7 @@ The following values are supported for `borderAlign`. * `'center'` (default) * `'inner'` -When `'center'` is set, the borders of arcs next to each other will overlap. When `'inner'` is set, it is guaranteed that all the borders are not overlap. +When `'center'` is set, the borders of arcs next to ...
false
Other
chartjs
Chart.js
86ed35446d394ec505d879e79fd29e6ecb199b87.json
Fix hover animations and optimize pivot() (#6129)
src/core/core.element.js
@@ -66,7 +66,7 @@ helpers.extend(Element.prototype, { pivot: function() { var me = this; if (!me._view) { - me._view = helpers.clone(me._model); + me._view = helpers.extend({}, me._model); } me._start = {}; return me; @@ -80,7 +80,7 @@ helpers.extend(Element.prototype, { // No animation -> No ...
true
Other
chartjs
Chart.js
86ed35446d394ec505d879e79fd29e6ecb199b87.json
Fix hover animations and optimize pivot() (#6129)
test/specs/core.element.tests.js
@@ -18,6 +18,7 @@ describe('Core element tests', function() { element.transition(0.25); expect(element._view).toEqual(element._model); + expect(element._view).not.toBe(element._model); expect(element._view.objectProp).toBe(element._model.objectProp); // not cloned element._model.numberProp = 100; @@ -4...
true
Other
chartjs
Chart.js
86ed35446d394ec505d879e79fd29e6ecb199b87.json
Fix hover animations and optimize pivot() (#6129)
test/specs/core.tooltip.tests.js
@@ -137,11 +137,11 @@ describe('Core.Tooltip', function() { footer: [], caretPadding: 2, labelColors: [{ - borderColor: 'rgb(255, 0, 0)', - backgroundColor: 'rgb(0, 255, 0)' + borderColor: globalDefaults.defaultColor, + backgroundColor: globalDefaults.defaultColor }, { - borderCo...
true
Other
chartjs
Chart.js
87a74f99a1e73fef3ebd314a11c322829c3d7cd1.json
Fix missing Chart.Chart (deprecated) alias (#6112)
src/index.js
@@ -51,6 +51,15 @@ if (typeof window !== 'undefined') { // DEPRECATIONS +/** + * Provided for backward compatibility, not available anymore + * @namespace Chart.Chart + * @deprecated since version 2.8.0 + * @todo remove at version 3 + * @private + */ +Chart.Chart = Chart; + /** * Provided for backward compatibi...
true
Other
chartjs
Chart.js
87a74f99a1e73fef3ebd314a11c322829c3d7cd1.json
Fix missing Chart.Chart (deprecated) alias (#6112)
test/specs/global.deprecations.tests.js
@@ -24,6 +24,12 @@ describe('Deprecations', function() { }); }); + describe('Chart.Chart', function() { + it('should be defined as an alias to Chart', function() { + expect(Chart.Chart).toBe(Chart); + }); + }); + describe('Chart.helpers.aliasPixel', function() { it('should be defined as a funct...
true
Other
chartjs
Chart.js
31aebf3bab8a6a45edce853360bc469ed42d386e.json
Include generated CSS in the GitHub releases
.travis.yml
@@ -42,13 +42,12 @@ deploy: branch: release - provider: releases api_key: $GITHUB_AUTH_TOKEN - file: - - "./dist/Chart.bundle.js" - - "./dist/Chart.bundle.min.js" - - "./dist/Chart.js" - - "./dist/Chart.min.js" - - "./dist/Chart.js.zip" skip_cleanup: true + file_glob: true + file: + - ./dist/*.css ...
false
Other
chartjs
Chart.js
344628ba9c5fc95a1edbc9cf94488461d24a4b32.json
Fix animation regression introduced by #5331 (#6108)
src/core/core.animations.js
@@ -93,20 +93,24 @@ module.exports = { */ advance: function() { var animations = this.animations; - var animation, chart; + var animation, chart, numSteps, nextStep; var i = 0; + // 1 animation per chart, so we are looping charts here while (i < animations.length) { animation = animations[i]; ...
false
Other
chartjs
Chart.js
946c6d0617bfa0eb21e86f6f75d7f34b2bb1dc85.json
Fix document errors related to ticks (#6099)
docs/axes/cartesian/README.md
@@ -29,10 +29,10 @@ The following options are common to all cartesian axes but do not apply to other | `autoSkip` | `boolean` | `true` | If true, automatically calculates how many labels can be shown and hides labels accordingly. Labels will be rotated up to `maxRotation` before skipping any. Turn `autoSkip` off to sh...
true
Other
chartjs
Chart.js
946c6d0617bfa0eb21e86f6f75d7f34b2bb1dc85.json
Fix document errors related to ticks (#6099)
docs/axes/styling.md
@@ -54,10 +54,11 @@ The minorTick configuration is nested under the ticks configuration in the `mino | `lineHeight` | <code>number&#124;string</code> | `1.2` | Height of an individual line of text (see [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height)). ## Major Tick Configuration -The majorTick c...
true
Other
chartjs
Chart.js
48f10196f627f75aa75a7ae5b4d674ae9b334277.json
Use null checking for which points to draw/bezier
src/Chart.Line.js
@@ -250,40 +250,47 @@ var ctx = this.chart.ctx; + // Some helper methods for getting the next/prev points + var hasValue = function(item){ + return item.value !== null; + }, + nextPoint = function(point, collection, index){ + return helpers.findNextWhere(collection, hasValue, index) || point; + ...
false
Other
chartjs
Chart.js
55a115179e4717f10f25301a1b86fbc6cfd21de2.json
Fix reference error when tagging a release
gulpfile.js
@@ -81,7 +81,7 @@ gulp.task('bump', function(complete){ }); gulp.task('release', ['build'], function(){ - exec('git tag -a v' + newVersion); + exec('git tag -a v' + package.version); }); gulp.task('jshint', function(){
false
Other
chartjs
Chart.js
adf6f3abb2ee4f7a3bb770cfefcd804e38b90af7.json
Create a task to bump + write version numbers Also run `gulp release` to tag the latest release.
bower.json
@@ -4,7 +4,8 @@ "description": "Simple HTML5 Charts using the canvas element", "homepage": "https://github.com/nnnick/Chart.js", "author": "nnnick", - "main": ["Chart.min.js"], - "dependencies": { - } + "main": [ + "Chart.min.js" + ], + "dependencies": {} } \ No newline at end of file
true
Other
chartjs
Chart.js
adf6f3abb2ee4f7a3bb770cfefcd804e38b90af7.json
Create a task to bump + write version numbers Also run `gulp release` to tag the latest release.
gulpfile.js
@@ -5,7 +5,13 @@ var gulp = require('gulp'), jshint = require('gulp-jshint'), size = require('gulp-size'), connect = require('gulp-connect'), - exec = require('child_process').exec; + replace = require('gulp-replace'), + inquirer = require('inquirer'), + semver = require('semver'), + exec = require('child_process...
true
Other
chartjs
Chart.js
adf6f3abb2ee4f7a3bb770cfefcd804e38b90af7.json
Create a task to bump + write version numbers Also run `gulp release` to tag the latest release.
package.json
@@ -12,10 +12,13 @@ "devDependencies": { "gulp": "3.5.x", "gulp-concat": "~2.1.x", - "gulp-uglify": "~0.2.x", - "gulp-util": "~2.2.x", + "gulp-connect": "~2.0.5", "gulp-jshint": "~1.5.1", + "gulp-replace": "^0.4.0", "gulp-size": "~0.4.0", - "gulp-connect": "~2.0.5" + "gulp-uglif...
true
Other
chartjs
Chart.js
adf6f3abb2ee4f7a3bb770cfefcd804e38b90af7.json
Create a task to bump + write version numbers Also run `gulp release` to tag the latest release.
src/Chart.Core.js
@@ -1,6 +1,7 @@ /*! * Chart.js * http://chartjs.org/ + * Version: {{ version }} * * Copyright 2014 Nick Downie * Released under the MIT license
true
Other
chartjs
Chart.js
edb245b649049671fe4983161dbc55d694c23c89.json
Add main file
package.json
@@ -3,6 +3,7 @@ "homepage": "http://www.chartjs.org", "description": "Simple HTML5 charts using the canvas element.", "version": "1.0.1-beta.2", + "main": "Chart.js", "repository": { "type": "git", "url": "https://github.com/nnnick/Chart.js.git"
false
Other
chartjs
Chart.js
16cf465575325bf21a94d2a345d8bf4d9d097f11.json
Add a small amount to docs.
Chart.js
@@ -91,7 +91,7 @@ // Boolean - whether or not the chart should be responsive and resize when the browser does. responsive: false, - // Boolean - whether to maintain the starting aspect ratio or not when responsive + // Boolean - whether to maintain the starting as...
true
Other
chartjs
Chart.js
16cf465575325bf21a94d2a345d8bf4d9d097f11.json
Add a small amount to docs.
src/Chart.Core.js
@@ -91,7 +91,7 @@ // Boolean - whether or not the chart should be responsive and resize when the browser does. responsive: false, - // Boolean - whether to maintain the starting aspect ratio or not when responsive + // Boolean - whether to maintain the starting as...
true
Other
chartjs
Chart.js
2f59921f7adf40f957f7316ab0dc783f6688608f.json
Make a start on sparse data for line charts
src/Chart.Line.js
@@ -98,19 +98,16 @@ helpers.each(dataset.data,function(dataPoint,index){ - //Best way to do this? or in draw sequence...? - if (helpers.isNumber(dataPoint)){ //Add a new point for each piece of data, passing any required data to draw. - datasetObject.points.push(new this.PointClass({ - ...
false
Other
chartjs
Chart.js
e25fd5e37cbfe62fe5d7ff6adf108b800b205662.json
Create null value bars, and hide if not numeric
src/Chart.Bar.js
@@ -104,18 +104,16 @@ this.datasets.push(datasetObject); helpers.each(dataset.data,function(dataPoint,index){ - if (helpers.isNumber(dataPoint)){ - //Add a new point for each piece of data, passing any required data to draw. - datasetObject.bars.push(new this.BarClass({ - value : dataPoi...
false
Other
chartjs
Chart.js
55fc0cfd49749c6dded5964bb7356325021f25bc.json
Change package.json name to lowercase
package.json
@@ -1,5 +1,5 @@ { - "name": "Chart.js", + "name": "chart.js", "homepage": "http://www.chartjs.org", "description": "Simple HTML5 charts using the canvas element.", "version": "1.0.1-beta.2",
false
Other
chartjs
Chart.js
3e1b120cbeff4caa90ff15880a9e0075e70b50f2.json
Build latest output files for new version
Chart.js
@@ -873,7 +873,9 @@ yMin; helpers.each(this.datasets, function(dataset){ dataCollection = dataset.points || dataset.bars || dataset.segments; - Elements.push(dataCollection[dataIndex]); + if (dataCollection[dataIndex]){ + Elements.push(dataCollection[dataIndex]); + ...
true
Other
chartjs
Chart.js
3e1b120cbeff4caa90ff15880a9e0075e70b50f2.json
Build latest output files for new version
Chart.min.js
@@ -6,5 +6,5 @@ * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ -(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;this.width=t.canvas.width,this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retina...
true
Other
chartjs
Chart.js
ea9d144c71819cbb3499d0640102689e10e25a02.json
Reflow the Radar before updating to update scale
src/Chart.Radar.js
@@ -275,6 +275,7 @@ this.eachPoints(function(point){ point.save(); }); + this.reflow(); this.render(); }, reflow: function(){
false
Other
chartjs
Chart.js
7a231313668f3b3dfe949dabd2c8da69f9088c55.json
Add datasetLabel to elements for tooltip templates
src/Chart.Bar.js
@@ -109,6 +109,7 @@ datasetObject.bars.push(new this.BarClass({ value : dataPoint, label : data.labels[index], + datasetLabel: dataset.label, strokeColor : dataset.strokeColor, fillColor : dataset.fillColor, highlightFill : dataset.highlightFill || dataset.fillColor,
true
Other
chartjs
Chart.js
7a231313668f3b3dfe949dabd2c8da69f9088c55.json
Add datasetLabel to elements for tooltip templates
src/Chart.Line.js
@@ -104,8 +104,7 @@ datasetObject.points.push(new this.PointClass({ value : dataPoint, label : data.labels[index], - // x: this.scale.calculateX(index), - // y: this.scale.endPoint, + datasetLabel: dataset.label, strokeColor : dataset.pointStrokeColor, fillColor ...
true