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 | 88308c600cbbd38458bc94549ca6139698508c58.json | Enhance the rounded rectangle implementation (#5597)
Use `arcTo` instead of `quadraticCurveTo` (both methods have the same compatibility level) because it generates better results when the final rect is a circle but also when it's actually a rectangle and not a square. This change is needed by the datalabels plugin wh... | src/helpers/helpers.canvas.js | @@ -27,18 +27,20 @@ var exports = module.exports = {
*/
roundedRect: function(ctx, x, y, width, height, radius) {
if (radius) {
- var rx = Math.min(radius, width / 2);
- var ry = Math.min(radius, height / 2);
-
- ctx.moveTo(x + rx, y);
- ctx.lineTo(x + width - rx, y);
- ctx.quadraticCurveTo(x + width,... | true |
Other | chartjs | Chart.js | 88308c600cbbd38458bc94549ca6139698508c58.json | Enhance the rounded rectangle implementation (#5597)
Use `arcTo` instead of `quadraticCurveTo` (both methods have the same compatibility level) because it generates better results when the final rect is a circle but also when it's actually a rectangle and not a square. This change is needed by the datalabels plugin wh... | test/jasmine.context.js | @@ -75,6 +75,7 @@ Context.prototype._initMethods = function() {
var me = this;
var methods = {
arc: function() {},
+ arcTo: function() {},
beginPath: function() {},
bezierCurveTo: function() {},
clearRect: function() {}, | true |
Other | chartjs | Chart.js | 88308c600cbbd38458bc94549ca6139698508c58.json | Enhance the rounded rectangle implementation (#5597)
Use `arcTo` instead of `quadraticCurveTo` (both methods have the same compatibility level) because it generates better results when the final rect is a circle but also when it's actually a rectangle and not a square. This change is needed by the datalabels plugin wh... | test/specs/element.point.tests.js | @@ -222,7 +222,7 @@ describe('Point element tests', function() {
15 - offset,
Math.SQRT2 * 2,
Math.SQRT2 * 2,
- 2 / 2
+ 2 * 0.425
);
expect(mockContext.getCalls()).toContain(
jasmine.objectContaining({ | true |
Other | chartjs | Chart.js | 88308c600cbbd38458bc94549ca6139698508c58.json | Enhance the rounded rectangle implementation (#5597)
Use `arcTo` instead of `quadraticCurveTo` (both methods have the same compatibility level) because it generates better results when the final rect is a circle but also when it's actually a rectangle and not a square. This change is needed by the datalabels plugin wh... | test/specs/helpers.canvas.tests.js | @@ -30,13 +30,13 @@ describe('Chart.helpers.canvas', function() {
expect(context.getCalls()).toEqual([
{name: 'moveTo', args: [15, 20]},
{name: 'lineTo', args: [35, 20]},
- {name: 'quadraticCurveTo', args: [40, 20, 40, 25]},
+ {name: 'arcTo', args: [40, 20, 40, 25, 5]},
{name: 'lineTo', args: [... | true |
Other | chartjs | Chart.js | 6f90e0799e7a8a080f5ecc76928bebb76c672946.json | Use comment for pull request template (#5595) | .github/PULL_REQUEST_TEMPLATE.md | @@ -1,3 +1,4 @@
+<!--
Please consider the following before submitting a pull request:
Guidelines for contributing: https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md
@@ -6,4 +7,5 @@ Example of changes on an interactive website such as the following:
- http://jsbin.com/
- http://jsfidd... | false |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | karma.conf.js | @@ -19,7 +19,6 @@ module.exports = function(karma) {
// These settings deal with browser disconnects. We had seen test flakiness from Firefox
// [Firefox 56.0.0 (Linux 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
// https://github.com/jasmine/jasmine/issues/1327#issuecomment-332939551
- br... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/controllers/controller.bar.js | @@ -461,29 +461,6 @@ module.exports = function(Chart) {
helpers.canvas.unclipArea(chart.ctx);
},
-
- setHoverStyle: function(rectangle) {
- var dataset = this.chart.data.datasets[rectangle._datasetIndex];
- var index = rectangle._index;
- var custom = rectangle.custom || {};
- var model = rectangle._m... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/controllers/controller.bubble.js | @@ -102,26 +102,18 @@ module.exports = function(Chart) {
setHoverStyle: function(point) {
var model = point._model;
var options = point._options;
-
+ point.$previousStyle = {
+ backgroundColor: model.backgroundColor,
+ borderColor: model.borderColor,
+ borderWidth: model.borderWidth,
+ radius: ... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/controllers/controller.doughnut.js | @@ -229,8 +229,14 @@ module.exports = function(Chart) {
});
var model = arc._model;
+
// Resets the visual styles
- this.removeHoverStyle(arc);
+ var custom = arc.custom || {};
+ var valueOrDefault = helpers.valueAtIndexOrDefault;
+ var elementOpts = this.chart.options.elements.arc;
+ model.back... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/controllers/controller.line.js | @@ -307,35 +307,24 @@ module.exports = function(Chart) {
}
},
- setHoverStyle: function(point) {
+ setHoverStyle: function(element) {
// Point
- var dataset = this.chart.data.datasets[point._datasetIndex];
- var index = point._index;
- var custom = point.custom || {};
- var model = point._model;
... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/controllers/controller.polarArea.js | @@ -199,13 +199,16 @@ module.exports = function(Chart) {
});
// Apply border and fill style
- me.removeHoverStyle(arc);
+ var elementOpts = this.chart.options.elements.arc;
+ var custom = arc.custom || {};
+ var valueOrDefault = helpers.valueAtIndexOrDefault;
+ var model = arc._model;
- arc.pivo... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/controllers/controller.radar.js | @@ -146,23 +146,17 @@ module.exports = function(Chart) {
var index = point._index;
var model = point._model;
+ point.$previousStyle = {
+ backgroundColor: model.backgroundColor,
+ borderColor: model.borderColor,
+ borderWidth: model.borderWidth,
+ radius: model.radius
+ };
+
model.radius =... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | src/core/core.datasetController.js | @@ -238,16 +238,9 @@ module.exports = function(Chart) {
}
},
- removeHoverStyle: function(element, elementOpts) {
- var dataset = this.chart.data.datasets[element._datasetIndex];
- var index = element._index;
- var custom = element.custom || {};
- var valueOrDefault = helpers.valueAtIndexOrDefault;
- ... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | test/specs/controller.bar.tests.js | @@ -1372,13 +1372,21 @@ describe('Chart.controllers.bar', function() {
var meta = chart.getDatasetMeta(1);
var bar = meta.data[0];
+ var helpers = window.Chart.helpers;
// Change default
chart.options.elements.rectangle.backgroundColor = 'rgb(128, 128, 128)';
chart.options.elements.rectangle.borderC... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | test/specs/controller.doughnut.tests.js | @@ -355,6 +355,8 @@ describe('Chart.controllers.doughnut', function() {
var meta = chart.getDatasetMeta(0);
var arc = meta.data[0];
+ chart.update();
+ meta.controller.setHoverStyle(arc);
meta.controller.removeHoverStyle(arc);
expect(arc._model.backgroundColor).toBe('rgb(255, 0, 0)');
expect(arc._mod... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | test/specs/controller.line.tests.js | @@ -703,6 +703,7 @@ describe('Chart.controllers.line', function() {
chart.options.elements.point.radius = 1.01;
meta.controller.removeHoverStyle(point);
+ chart.update();
expect(point._model.backgroundColor).toBe('rgb(45, 46, 47)');
expect(point._model.borderColor).toBe('rgb(50, 51, 52)');
expect(poin... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | test/specs/controller.polarArea.tests.js | @@ -332,7 +332,14 @@ describe('Chart.controllers.polarArea', function() {
chart.options.elements.arc.borderColor = 'rgb(50, 51, 52)';
chart.options.elements.arc.borderWidth = 10.1;
+ meta.controller.setHoverStyle(arc);
+ chart.update();
+ expect(arc._model.backgroundColor).toBe('rgb(45, 46, 47)');
+ expect(... | true |
Other | chartjs | Chart.js | da3aa68f38b9db25156c3b32c56098f9ca70f4d8.json | Restore original styles when removing hover (#5570)
Refactor `updateElement` and `removeHoverStyle` and fix tests. | test/specs/controller.radar.tests.js | @@ -410,6 +410,7 @@ describe('Chart.controllers.radar', function() {
chart.options.elements.point.radius = 1.01;
meta.controller.removeHoverStyle(point);
+ chart.update();
expect(point._model.backgroundColor).toBe('rgb(45, 46, 47)');
expect(point._model.borderColor).toBe('rgb(50, 51, 52)');
expect(poi... | true |
Other | chartjs | Chart.js | ca9d3175c5fa9da69434cf7ed40b299fd221b667.json | Fix time documentation (#5507) | docs/axes/cartesian/time.md | @@ -6,7 +6,7 @@ The time scale is used to display times and dates. When building its ticks, it w
### Input Data
-The x-axis data points may additionally be specified via the `t` attribute when using the time scale.
+The x-axis data points may additionally be specified via the `t` or `x` attribute when using the ti... | false |
Other | chartjs | Chart.js | 1072ed9238ac48b6be5a7db8546103ec50a92c0d.json | Fix typo in README.md (#5504) | README.md | @@ -35,7 +35,7 @@ Files:
* `dist/Chart.bundle.js`
* `dist/Chart.bundle.min.js`
-The bundled build includes Moment.js in a single file. You should use this version if you require time axes and want to include a single file. You should not use this build if your application already included Moment.js. Otherwise, Mome... | false |
Other | chartjs | Chart.js | 14399ffe372ebabcb66bab20827b45594e7fc204.json | Update gulpfile.js to use in strict mode (#5478) | gulpfile.js | @@ -20,7 +20,7 @@ var yargs = require('yargs');
var path = require('path');
var fs = require('fs');
var htmllint = require('gulp-htmllint');
-var package = require('./package.json');
+var pkg = require('./package.json');
var argv = yargs
.option('force-output', {default: false})
@@ -69,11 +69,11 @@ gulp.task('... | false |
Other | chartjs | Chart.js | 9fbac8893865fc6f7efdab7f49d480e6a730c669.json | Add `ticks.precision` option to linear scale. (#4841)
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places. | docs/axes/cartesian/linear.md | @@ -12,6 +12,7 @@ The following options are provided by the linear scale. They are all located in
| `min` | `Number` | | User defined minimum number for the scale, overrides minimum value from data. [more...](#axis-range-settings)
| `max` | `Number` | | User defined maximum number for the scale, overrides maximum val... | true |
Other | chartjs | Chart.js | 9fbac8893865fc6f7efdab7f49d480e6a730c669.json | Add `ticks.precision` option to linear scale. (#4841)
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places. | docs/axes/radial/linear.md | @@ -27,6 +27,7 @@ The following options are provided by the linear scale. They are all located in
| `min` | `Number` | | User defined minimum number for the scale, overrides minimum value from data. [more...](#axis-range-settings)
| `max` | `Number` | | User defined maximum number for the scale, overrides maximum val... | true |
Other | chartjs | Chart.js | 9fbac8893865fc6f7efdab7f49d480e6a730c669.json | Add `ticks.precision` option to linear scale. (#4841)
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places. | src/scales/scale.linearbase.js | @@ -14,12 +14,22 @@ function generateTicks(generationOptions, dataRange) {
// "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
// for details.
+ var factor;
+ var precision;
var spacing;
+
if (generationOptions.stepSize && generationOpt... | true |
Other | chartjs | Chart.js | 9fbac8893865fc6f7efdab7f49d480e6a730c669.json | Add `ticks.precision` option to linear scale. (#4841)
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places. | test/specs/scale.linear.tests.js | @@ -548,6 +548,66 @@ describe('Linear Scale', function() {
expect(chart.scales.yScale0.ticks).toEqual(['11', '9', '7', '5', '3', '1']);
});
+ describe('precision', function() {
+ it('Should create integer steps if precision is 0', function() {
+ var chart = window.acquireChart({
+ type: 'bar',
+ data: {... | true |
Other | chartjs | Chart.js | a191921b1553d0af05dbb6ee621f171aeabf9baa.json | Fix typo in the legend documentation (#5348) | docs/configuration/legend.md | @@ -1,6 +1,6 @@
# Legend Configuration
-The chart legend displays data about the datasets that area appearing on the chart.
+The chart legend displays data about the datasets that are appearing on the chart.
## Configuration options
The legend configuration is passed into the `options.legend` namespace. The glob... | false |
Other | chartjs | Chart.js | 7f4b1d9715f3da507893cf145009c729fad3606b.json | Add undefined guard for window.devicePixelRatio (#5324) | src/core/core.helpers.js | @@ -502,7 +502,7 @@ module.exports = function(Chart) {
document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
};
helpers.retinaScale = function(chart, forceRatio) {
- var pixelRatio = chart.currentDevicePixelRatio = forceRatio || window.devicePixelRatio || 1;
+ var pixelRatio = chart.curr... | false |
Other | chartjs | Chart.js | be6660c63d10b54f4972170c4f3364b61bb9b9b3.json | Improve title of generated documentation (#5256) | book.json | @@ -1,5 +1,6 @@
{
"root": "./docs",
+ "title": "Chart.js documentation",
"author": "chartjs",
"gitbook": "3.2.2",
"plugins": ["-lunr", "-search", "search-plus", "anchorjs", "chartjs", "ga"], | false |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/axes/README.md | @@ -26,18 +26,18 @@ There are a number of config callbacks that can be used to change parameters in
| Name | Arguments | Description
| ---- | --------- | -----------
| `beforeUpdate` | `axis` | Callback called before the update process starts.
-| `beforeSetDimensions` | `axis` | Callback that runs before dimensions ... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/axes/cartesian/time.md | @@ -147,6 +147,6 @@ The `ticks.source` property controls the ticks generation
* `'labels'`: generates ticks from user given `data.labels` values ONLY
### Parser
-If this property is defined as a string, it is interpreted as a custom format to be used by moment to parse the date.
+If this property is defined as a s... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/charts/bar.md | @@ -6,12 +6,12 @@ A bar chart provides a way of showing data values represented as vertical bars.
"type": "bar",
"data": {
"labels": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
+ "January",
+ ... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/charts/mixed.md | @@ -41,9 +41,9 @@ At this point we have a chart rendering how we'd like. It's important to note th
"type": "bar",
"data": {
"labels": [
- "January",
- "February",
- "March",
+ "January",
+ "February",
+ "March",
"April"
],
"datasets": [{ | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/charts/radar.md | @@ -8,9 +8,9 @@ They are often useful for comparing the points of two or more different data set
"type": "radar",
"data": {
"labels": [
- "Eating",
- "Drinking",
- "Sleeping",
+ "Eating",
+ "Drinking",
+ "Sleeping",
"De... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/configuration/legend.md | @@ -10,7 +10,7 @@ The legend configuration is passed into the `options.legend` namespace. The glob
| `display` | `Boolean` | `true` | is the legend shown
| `position` | `String` | `'top'` | Position of the legend. [more...](#position)
| `fullWidth` | `Boolean` | `true` | Marks that this box should take the full widt... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/configuration/tooltip.md | @@ -63,9 +63,9 @@ Example:
Chart.Tooltip.positioners.custom = function(elements, eventPosition) {
/** @type {Chart.Tooltip} */
var tooltip = this;
-
+
/* ... */
-
+
return {
x: 0,
y: 0 | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/developers/charts.md | @@ -75,7 +75,7 @@ The built in controller types are:
For example, to derive a new chart type that extends from a bubble chart, you would do the following.
```javascript
-// Sets the default config for 'derivedBubble' to be the same as the bubble defaults.
+// Sets the default config for 'derivedBubble' to be the s... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/general/colors.md | @@ -6,7 +6,7 @@ You can also pass a [CanvasGradient](https://developer.mozilla.org/en-US/docs/We
## Patterns and Gradients
-An alternative option is to pass a [CanvasPattern](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern) or [CanvasGradient](https://developer.mozilla.org/en/docs/Web/API/CanvasGrad... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/general/interactions/README.md | @@ -1,6 +1,6 @@
# Interactions
-The hover configuration is passed into the `options.hover` namespace. The global hover configuration is at `Chart.defaults.global.hover`. To configure which events trigger chart interactions, see [events](./events.md#events).
+The hover configuration is passed into the `options.hover... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/general/interactions/events.md | @@ -7,7 +7,7 @@ The following properties define how the chart interacts with events.
| `onHover` | `Function` | `null` | Called when any of the events fire. Called in the context of the chart and passed the event and an array of active elements (bars, points, etc).
| `onClick` | `Function` | `null` | Called if the ev... | true |
Other | chartjs | Chart.js | bba29e591604fed8c1e3bc4cf911273d4c5e0f42.json | Remove trailing spaces from docs (#5227) | docs/general/interactions/modes.md | @@ -41,7 +41,7 @@ Finds the first item that intersects the point and returns it. Behaves like 'nea
See `'index'` mode
## index
-Finds item at the same index. If the `intersect` setting is true, the first intersecting item is used to determine the index in the data. If `intersect` false the nearest item, in the x di... | true |
Other | chartjs | Chart.js | c2681859531977fb83fee782f8aec6b50196d644.json | Fix Slack invitation link (#5217)
Setup a new Heroku app based on rauchg/slackin, using Slack legacy token from the Chart.js (chartjs.slack@...) user and reCAPTCHA from the same Google account. | README.md | @@ -1,6 +1,6 @@
# Chart.js
-[](https://travis-ci.org/chartjs/Chart.js) [](https://coveralls.io/github/chartjs/Chart.js?branch=master... | true |
Other | chartjs | Chart.js | c2681859531977fb83fee782f8aec6b50196d644.json | Fix Slack invitation link (#5217)
Setup a new Heroku app based on rauchg/slackin, using Slack legacy token from the Chart.js (chartjs.slack@...) user and reCAPTCHA from the same Google account. | docs/README.md | @@ -1,6 +1,6 @@
# Chart.js
-[](https://chart-js-automation.herokuapp.com/)
+[](https://chartjs-slack.herokuapp.com/)
## Installation... | true |
Other | chartjs | Chart.js | c2681859531977fb83fee782f8aec6b50196d644.json | Fix Slack invitation link (#5217)
Setup a new Heroku app based on rauchg/slackin, using Slack legacy token from the Chart.js (chartjs.slack@...) user and reCAPTCHA from the same Google account. | docs/developers/contributing.md | @@ -12,7 +12,7 @@ New contributions to the library are welcome, but we ask that you please follow
# Joining the project
- Active committers and contributors are invited to introduce yourself and request commit access to this project. We have a very active Slack community that you can join [here](https://chart-js-a... | true |
Other | chartjs | Chart.js | 33c7d941f7caa5363f68ac2135a66d7c2328e196.json | Add back Chart.Ticks.formatters (#5088) | src/chart.js | @@ -13,6 +13,7 @@ Chart.Element = require('./core/core.element');
Chart.elements = require('./elements/index');
Chart.Interaction = require('./core/core.interaction');
Chart.platform = require('./platforms/platform');
+Chart.Ticks = require('./core/core.ticks');
require('./core/core.plugin')(Chart);
require('./c... | true |
Other | chartjs | Chart.js | 33c7d941f7caa5363f68ac2135a66d7c2328e196.json | Add back Chart.Ticks.formatters (#5088) | src/core/core.ticks.js | @@ -7,147 +7,6 @@ var helpers = require('../helpers/index');
* @namespace Chart.Ticks
*/
module.exports = {
- /**
- * Namespace to hold generators for different types of ticks
- * @namespace Chart.Ticks.generators
- */
- generators: {
- /**
- * Interface for the options provided to the numeric tick generator... | true |
Other | chartjs | Chart.js | 33c7d941f7caa5363f68ac2135a66d7c2328e196.json | Add back Chart.Ticks.formatters (#5088) | src/scales/scale.linearbase.js | @@ -1,7 +1,61 @@
'use strict';
var helpers = require('../helpers/index');
-var Ticks = require('../core/core.ticks');
+
+/**
+ * Generate a set of linear ticks
+ * @param generationOptions the options used to generate the ticks
+ * @param dataRange the range of the data
+ * @returns {Array<Number>} array of tick va... | true |
Other | chartjs | Chart.js | 33c7d941f7caa5363f68ac2135a66d7c2328e196.json | Add back Chart.Ticks.formatters (#5088) | src/scales/scale.logarithmic.js | @@ -3,6 +3,58 @@
var helpers = require('../helpers/index');
var Ticks = require('../core/core.ticks');
+/**
+ * Generate a set of logarithmic ticks
+ * @param generationOptions the options used to generate the ticks
+ * @param dataRange the range of the data
+ * @returns {Array<Number>} array of tick values
+ */
+f... | true |
Other | chartjs | Chart.js | 33c7d941f7caa5363f68ac2135a66d7c2328e196.json | Add back Chart.Ticks.formatters (#5088) | test/specs/core.ticks.tests.js | @@ -1,4 +1,13 @@
describe('Test tick generators', function() {
+ // formatters are used as default config values so users want to be able to reference them
+ it('Should expose formatters api', function() {
+ expect(typeof Chart.Ticks).toBeDefined();
+ expect(typeof Chart.Ticks.formatters).toBeDefined();
+ expect(ty... | true |
Other | chartjs | Chart.js | f0bf3954fe363eda86a3db170063aba34f1be08e.json | Fix issues #4572 and #4703 (#4959)
- issue #4572: logarithmic type if all numbers are zero browser crashes "Out of memory"
- issue #4703: [BUG] Browser unresponsive on bubble chart with logarithmic axes | src/scales/scale.logarithmic.js | @@ -18,11 +18,9 @@ module.exports = function(Chart) {
determineDataLimits: function() {
var me = this;
var opts = me.options;
- var tickOpts = opts.ticks;
var chart = me.chart;
var data = chart.data;
var datasets = data.datasets;
- var valueOrDefault = helpers.valueOrDefault;
var isHorizo... | true |
Other | chartjs | Chart.js | f0bf3954fe363eda86a3db170063aba34f1be08e.json | Fix issues #4572 and #4703 (#4959)
- issue #4572: logarithmic type if all numbers are zero browser crashes "Out of memory"
- issue #4703: [BUG] Browser unresponsive on bubble chart with logarithmic axes | test/specs/scale.logarithmic.tests.js | @@ -690,142 +690,433 @@ describe('Logarithmic Scale tests', function() {
expect(chart.scales.yScale1.getLabelForIndex(0, 2)).toBe(150);
});
- it('should get the correct pixel value for a point', function() {
- var chart = window.acquireChart({
- type: 'line',
- data: {
- datasets: [{
- xAxisID: 'xSca... | true |
Other | chartjs | Chart.js | b835df02cd05830fb734806f3af27fa43cc5674c.json | Add Angular2+ libraries for Chart.js in docs (#5006) | docs/notes/extensions.md | @@ -25,7 +25,12 @@ In addition, many plugins can be found on the [npm registry](https://www.npmjs.c
## Integrations
-### Angular
+### Angular (v2+)
+
+ - <a href="https://github.com/emn178/angular2-chartjs" target="_blank">emn178/angular2-chartjs</a>
+ - <a href="https://github.com/valor-software/ng2-charts" targe... | false |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/SUMMARY.md | @@ -7,6 +7,7 @@
* [Usage](getting-started/usage.md)
* [General](general/README.md)
* [Responsive](general/responsive.md)
+ * [Pixel Ratio](general/device-pixel-ratio.md)
* [Interactions](general/interactions/README.md)
* [Events](general/interactions/events.md)
* [Modes](general/interactions/modes.... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/axes/cartesian/README.md | @@ -75,13 +75,13 @@ var myChart = new Chart(ctx, {
data: {
datasets: [{
data: [20, 50, 100, 75, 25, 0],
- label: 'Left dataset'
+ label: 'Left dataset',
// This binds the dataset to the left y axis
yAxisID: 'left-y-axis'
}, {
- ... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/axes/cartesian/linear.md | @@ -20,7 +20,7 @@ The following options are provided by the linear scale. They are all located in
Given the number of axis range settings, it is important to understand how they all interact with each other.
-The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/axes/radial/linear.md | @@ -36,7 +36,7 @@ The following options are provided by the linear scale. They are all located in
Given the number of axis range settings, it is important to understand how they all interact with each other.
-The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/axes/styling.md | @@ -35,8 +35,8 @@ The tick configuration is nested under the scale configuration in the `ticks` ke
| `fontSize` | `Number` | `12` | Font size for the tick labels.
| `fontStyle` | `String` | `'normal'` | Font style for the tick labels, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
|... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/charts/line.md | @@ -119,7 +119,7 @@ The `data` property of a dataset for a line chart can be passed in two formats.
data: [20, 10]
```
-When the `data` array is an array of numbers, the x axis is generally a [category](../axes/cartesian/category.md#Category Axis). The points are placed onto the axis using their position in the arr... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/configuration/tooltip.md | @@ -30,7 +30,7 @@ The tooltip configuration is passed into the `options.tooltips` namespace. The g
| `footerFontSize` | `Number` | `12` | Footer font size
| `footerFontStyle` | `String` | `'bold'` | Footer font style
| `footerFontColor` | `Color` | `'#fff'` | Footer font color
-| `footerSpacing` | `Number` | `2` | S... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/developers/axes.md | @@ -78,14 +78,14 @@ To work with Chart.js, custom scale types must implement the following interface
// Get the pixel (x coordinate for horizontal axis, y coordinate for vertical axis) for a given value
// @param index: index into the ticks array
- // @param includeOffset: if true, get the pixel halway b... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/getting-started/README.md | @@ -40,4 +40,4 @@ var chart = new Chart(ctx, {
It's that easy to get started using Chart.js! From here you can explore the many options that can help you customise your charts with scales, tooltips, labels, colors, custom actions, and much more.
-There are many examples of Chart.js that are available in the `/samp... | true |
Other | chartjs | Chart.js | 9a7182ba36d3a9f1e73f2d2cdc0011ae7837d672.json | Fix typos and broken links in the docs (#5010) | docs/getting-started/installation.md | @@ -36,7 +36,7 @@ https://www.jsdelivr.com/package/npm/chart.js?path=dist
You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest).
-If you download or clone the repository, you must [build](../developers/contributing.md#building-chartjs) Chart.js to generate... | true |
Other | chartjs | Chart.js | 73729877546e9bb0445e72a97978860685ccb0aa.json | Add scaleLabel to core.scale | src/core/core.scale.js | @@ -20,6 +20,20 @@
offsetGridLines: false,
},
+ // scale label
+ scaleLabel: {
+ fontColor: '#666',
+ fontFamily: 'Helvetica Neue',
+ fontSize: 12,
+ fontStyle: 'normal',
+
+ // actual label
+ labelString: '',
+
+ // display property
+ show: false,
+ },
+
// label settings
ticks: {
... | false |
Other | chartjs | Chart.js | 407eb846d0459bb3cdd4383716a256f882951761.json | Update v1.x readme to reflect release status | README.md | @@ -5,6 +5,27 @@
*Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org)
+## v2.0 Development
+The next generation and release of Chart.js has been well under way this year and we are very close to releasing some amazing new features including, but not limited to:
+- Rewritten, optimiz... | false |
Other | chartjs | Chart.js | 8c94ae0441205eb90d493b728893bca7f491712f.json | Ensure bar width at least 1px | src/scales/scale.category.js | @@ -87,9 +87,9 @@
var baseWidth = Math.max(this.calculateBaseWidth() - (this.options.stacked ? 0 : (barDatasetCount - 1) * this.options.spacing), 1);
if (this.options.stacked) {
- return baseWidth;
+ return Math.max(baseWidth, 1);
}
- ret... | true |
Other | chartjs | Chart.js | 8c94ae0441205eb90d493b728893bca7f491712f.json | Ensure bar width at least 1px | src/scales/scale.time.js | @@ -229,9 +229,9 @@
var baseWidth = this.calculateBaseWidth() - ((barDatasetCount - 1) * this.options.spacing);
if (this.options.stacked) {
- return baseWidth;
+ return Math.max(baseWidth, 1);
}
- return (baseWidth / barDatasetCount);
+ return Math.max((baseWidth / barDatasetCount), 1);
},
... | true |
Other | chartjs | Chart.js | 814c2d7ffa5581804687976be9047e231fd6350a.json | Remove responsive file since it is not necessary | src/core/core.responsive.js | @@ -1,29 +0,0 @@
-(function() {
-
- "use strict";
-
- //Declare root variable - window in the browser, global on the server
- var root = this,
- previous = root.Chart,
- helpers = Chart.helpers;
-
-
- // Attach global event to resize each chart instance when the browser resizes
- helpers.addEvent(window, "resize", (f... | false |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | docs/01-Scales.md | @@ -41,7 +41,7 @@ afterUpdate | Function | undefined | Callback that runs at the end of the update
*gridLines*.zeroLineColor | Color | "rgba(0, 0, 0, 0.25)" | Stroke color of the grid line for the first index (index 0).
*gridLines*.offsetGridLines | Boolean | false | If true, offset labels from grid lines.
**scaleLa... | true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | src/core/core.scale.js | @@ -41,6 +41,7 @@ module.exports = function(Chart) {
display: true,
autoSkip: true,
autoSkipPadding: 0,
+ labelOffset: 0,
callback: function(value) {
return '' + value;
}
@@ -557,7 +558,7 @@ module.exports = function(Chart) {
if (this.options.ticks.display) {
this.ctx.save();... | true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | test/core.helpers.tests.js | @@ -239,7 +239,8 @@ describe('Core helper tests', function() {
display: true,
callback: merged.scales.yAxes[1].ticks.callback, // make it nicer, then check explicitly below
autoSkip: true,
- autoSkipPadding: 0
+ autoSkipPadding: 0,
+ labelOffset: 0,
},
type: 'linear'
... | true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | test/scale.category.tests.js | @@ -38,7 +38,8 @@ describe('Category scale tests', function() {
display: true,
callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
autoSkip: true,
- autoSkipPadding: 0
+ autoSkipPadding: 0,
+ labelOffset: 0
}
});
| true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | test/scale.linear.tests.js | @@ -49,7 +49,8 @@ describe('Linear Scale', function() {
display: true,
callback: defaultConfig.ticks.callback, // make this work nicer, then check below
autoSkip: true,
- autoSkipPadding: 0
+ autoSkipPadding: 0,
+ labelOffset: 0
}
});
| true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | test/scale.logarithmic.tests.js | @@ -44,7 +44,8 @@ describe('Logarithmic Scale tests', function() {
display: true,
callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
autoSkip: true,
- autoSkipPadding: 0
+ autoSkipPadding: 0,
+ labelOffset: 0
},
});
| true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | test/scale.radialLinear.tests.js | @@ -63,7 +63,8 @@ describe('Test the radial linear scale', function() {
display: true,
callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
autoSkip: true,
- autoSkipPadding: 0
+ autoSkipPadding: 0,
+ labelOffset: 0
},
});
| true |
Other | chartjs | Chart.js | 7ee5af81af59e66a2f6e11c04cdb054c8cef934e.json | Add labelOffset option to scales | test/scale.time.tests.js | @@ -71,7 +71,8 @@ describe('Time scale tests', function() {
display: true,
callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below,
autoSkip: false,
- autoSkipPadding: 0
+ autoSkipPadding: 0,
+ labelOffset: 0
},
time: {
parser: false, | true |
Other | chartjs | Chart.js | 5a79b42a460e95e6adbd27f03d333183f6c0f2c1.json | Update CDN on bump | gulpfile.js | @@ -116,7 +116,8 @@ function bumpTask(complete) {
choices: choices
}, function(res) {
var increment = res.version.split(' ')[0],
- newVersion = semver.inc(package.version, increment);
+ newVersion = semver.inc(package.version, increment),
+ oldVersion = package.version;
// Set the new... | false |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | src/core/core.scale.js | @@ -33,6 +33,7 @@ module.exports = function(Chart) {
// label settings
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10,
@@ -190,7 +191,7 @@ module.exports = function(Chart) {
var lastWidth = this.ctx.measureText(this.ticks[this.ticks.length - 1]).wi... | true |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | test/core.helpers.tests.js | @@ -231,6 +231,7 @@ describe('Core helper tests', function() {
},
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10,
@@ -262,6 +263,7 @@ describe('Core helper tests', function() {
},
ticks: {
beginAtZero: false,
+ ... | true |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | test/scale.category.tests.js | @@ -30,6 +30,7 @@ describe('Category scale tests', function() {
},
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10, | true |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | test/scale.linear.tests.js | @@ -41,6 +41,7 @@ describe('Linear Scale', function() {
},
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10,
@@ -633,7 +634,7 @@ describe('Linear Scale', function() {
}
}
});
-
+
var xScale = chartInstance.scales.xScale0;
expec... | true |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | test/scale.logarithmic.tests.js | @@ -36,6 +36,7 @@ describe('Logarithmic Scale tests', function() {
},
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10, | true |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | test/scale.radialLinear.tests.js | @@ -54,6 +54,7 @@ describe('Test the radial linear scale', function() {
backdropPaddingY: 2,
backdropPaddingX: 2,
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10, | true |
Other | chartjs | Chart.js | 3bef974c25e61c7f8b45fd105d59aca363906acd.json | Add minRotation support | test/scale.time.tests.js | @@ -63,6 +63,7 @@ describe('Time scale tests', function() {
},
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10, | true |
Other | chartjs | Chart.js | ebffa52dc2ad3c2fc5a1b3f48e4fb8596334a9ee.json | allow callback or userCallback in the time scale | src/scales/scale.time.js | @@ -299,9 +299,11 @@ module.exports = function(Chart) {
// Function to format an individual tick mark
tickFormatFunction: function tickFormatFunction(tick, index, ticks) {
var formattedTick = tick.format(this.displayFormat);
+ var tickOpts = this.options.ticks;
+ var callback = helpers.getValueOrDefault(t... | false |
Other | chartjs | Chart.js | c276926c14a0f37e71f29f810e66354d7fca1e62.json | Update CDN in Readme to 2.1.2 | README.md | @@ -16,7 +16,7 @@ To install via npm / bower:
npm install chart.js --save
bower install Chart.js --save
```
-CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.1/Chart.min.js
+CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.2/Chart.min.js
## Documentation
| false |
Other | chartjs | Chart.js | 9cfda5a8198cee1d7d77a7732a1fd2c0beb0c93d.json | Update CDN in README to 2.1.1 | README.md | @@ -16,7 +16,7 @@ To install via npm / bower:
npm install chart.js --save
bower install Chart.js --save
```
-CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.0/Chart.min.js
+CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.1/Chart.min.js
## Documentation
| false |
Other | chartjs | Chart.js | 09bcac9b5c699c75909b77dc40dc40b5a3af1030.json | Reduce element.point size | src/elements/element.point.js | @@ -61,80 +61,86 @@ module.exports = function(Chart) {
var radius = vm.radius;
var xOffset,
- yOffset;
+ yOffset,
+ beginPath = "beginPath",
+ moveTo = "moveTo",
+ lineTo = "lineTo",
+ closePath = "closePath",
+ fillRect = "fillRect",
+ strokeRect = "strokeRect";
switc... | false |
Other | chartjs | Chart.js | 8f6f8820686cc57ab0ee3139c4d7d7c2c13b7014.json | Fix jshint issue | src/elements/element.point.js | @@ -21,7 +21,7 @@ module.exports = function(Chart) {
Chart.elements.Point = Chart.Element.extend({
inRange: function(mouseX, mouseY) {
var vm = this._view;
- return vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false
+ return vm ? ((Math.pow(mous... | false |
Other | chartjs | Chart.js | 4068836a42962c306a79f8baec099df0d0f4377f.json | Reduce core.title.js size | src/core/core.title.js | @@ -16,6 +16,7 @@ module.exports = function(Chart) {
text: ''
};
+ var noop = helpers.noop;
Chart.Title = Chart.Element.extend({
initialize: function(config) {
@@ -28,7 +29,7 @@ module.exports = function(Chart) {
// These methods are ordered by lifecyle. Utilities then follow.
- beforeUpdate: help... | true |
Other | chartjs | Chart.js | 4068836a42962c306a79f8baec099df0d0f4377f.json | Reduce core.title.js size | test/core.title.tests.js | @@ -107,9 +107,21 @@ describe('Title block tests', function() {
expect(context.getCalls()).toEqual([{
name: 'setFillStyle',
args: ['#666']
+ }, {
+ name: 'save',
+ args: []
+ }, {
+ name: 'translate',
+ args: [300, 66]
+ }, {
+ name: 'rotate',
+ args: [0]
}, {
name: 'fillText',
- args... | true |
Other | chartjs | Chart.js | eeae8a6a16649be2d2b16a4e09ffc5d6cc0439b2.json | Reduce size of on-canvas legend | src/core/core.legend.js | @@ -3,6 +3,7 @@
module.exports = function(Chart) {
var helpers = Chart.helpers;
+ var noop = helpers.noop;
Chart.defaults.global.legend = {
@@ -14,13 +15,14 @@ module.exports = function(Chart) {
// a callback that will handle
onClick: function(e, legendItem) {
var index = legendItem.datasetIndex;
-... | false |
Other | chartjs | Chart.js | 27b6791e7376420df7690699f856dbd2110f06bc.json | Fix build to remove all comments other than header | gulpfile.js | @@ -76,9 +76,9 @@ function buildTask() {
.pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(gulp.dest(outDir))
- .pipe(streamify(uglify({
- preserveComments: 'some'
- })))
+ .pipe(streamify(uglify()))
+ .pipe(insert.prepend(header))
+ .pipe... | false |
Other | chartjs | Chart.js | c2d6e4c31f027fc2bbba0a594ab41d156523bd71.json | Reset elements for polar area chart | src/Chart.PolarArea.js | @@ -121,6 +121,14 @@
_options: this.options,
}, this);
+ // Fit the scale before we animate
+ this.updateScaleRange();
+ this.scale.calculateRange();
+ Chart.scaleService.fitScalesForChart(this, this.chart.width, this.chart.height);
+
+ ... | false |
Other | chartjs | Chart.js | a6c712323f86ed9d12256f824287202c9d641dd4.json | Reset elements for donut charts | src/Chart.Doughnut.js | @@ -54,6 +54,8 @@
_options: this.options,
}, this);
+ this.resetElements();
+
// Update the chart with the latest data.
this.update();
@@ -66,6 +68,46 @@
return 0;
}
},
+ resetElements: function() {
+ ... | false |
Other | chartjs | Chart.js | 37cfbdb8028b24715589620e9e1ed191486f410a.json | Fix an issue with bar charts that are not stacked | src/Chart.Bar.js | @@ -335,7 +335,7 @@
var offset = 0;
- for (j = datasetIndex; j < datasets.length; j++) {
+ for (var j = datasetIndex; j < self.data.datasets.length; j++) {
if (j === datasetIndex && value) {
... | false |
Other | chartjs | Chart.js | 42e2c237d4e17db68929e47c9146ba023dca69ad.json | Bind events in scatter chart | src/Chart.Scatter.js | @@ -92,6 +92,10 @@
name: "Scatter",
defaults: defaultConfig,
initialize: function() {
+
+ // Events
+ helpers.bindEvents(this, this.options.events, this.events);
+
//Custom Point Defaults
helpers.each(this.data.datasets, function(dataset, datase... | false |
Other | chartjs | Chart.js | 8db79ae365cd212045c3f11701dd9665eb4b4db1.json | nnnick/Chart.js#1140: Watch sample folder | gulpfile.js | @@ -122,7 +122,7 @@ gulp.task('watch', function(){
livereload.changed(evt.path);
};
- gulp.watch('Chart.js', reloadPage);
+ gulp.watch(['Chart.js', 'samples/*'], reloadPage);
});
| false |
Other | chartjs | Chart.js | 8ef3aaa87da570148d2b6ae3a8fceff912b67ec7.json | Add livereload to Gulp task | gulpfile.js | @@ -12,7 +12,8 @@ var gulp = require('gulp'),
exec = require('child_process').exec,
fs = require('fs'),
package = require('./package.json'),
- bower = require('./bower.json');
+ bower = require('./bower.json'),
+ livereload = require('gulp-livereload');
var srcDir = './src/';
/*
@@ -114,6 +115,15 @@ gulp.task... | true |
Other | chartjs | Chart.js | 8ef3aaa87da570148d2b6ae3a8fceff912b67ec7.json | Add livereload to Gulp task | package.json | @@ -20,9 +20,10 @@
"gulp-util": "~2.2.x",
"gulp-html-validator": "^0.0.2",
"inquirer": "^0.5.1",
- "semver": "^3.0.1"
+ "semver": "^3.0.1",
+ "gulp-livereload": "^3.8.0"
},
"spm": {
"main": "Chart.js"
}
-}
\ No newline at end of file
+} | true |
Other | chartjs | Chart.js | e774a893da4f7be405af2926ae74499f2ab0d813.json | Use new animation options in the animation service. | src/Chart.Core.js | @@ -999,10 +999,10 @@
redraw: noop,
render: function(duration) {
- if (this.options.animation) {
+ if (this.options.animation.duration !== 0) {
var animation = new Chart.Animation();
- animation.numSteps = (duration || this.options.animationDurat... | false |
Other | chartjs | Chart.js | 73b579c9626b0f5f5d2ea4d24c36901a8d785cef.json | Remove old linear scale | src/Chart.Core.js | @@ -1782,279 +1782,6 @@
},
});
- Chart.Scale = Chart.Element.extend({
- initialize: function() {
- this.fit();
- },
- buildYLabels: function() {
- this.yLabels = [];
-
- var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
-
- for ... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.