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 | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | src/core/core.layouts.js | @@ -49,11 +49,11 @@ function setLayoutDims(layouts, params) {
layout = layouts[i];
// store dimensions used instead of available chartArea in fitBoxes
if (layout.horizontal) {
- layout.width = layout.box.fullWidth && params.availableWidth;
+ layout.width = layout.box.fullSize && params.availableWidth;
... | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | src/core/core.scale.js | @@ -906,8 +906,8 @@ export default class Scale extends Element {
/**
* @return {boolean}
*/
- isFullWidth() {
- return this.options.fullWidth;
+ isFullSize() {
+ return this.options.fullSize;
}
/** | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | src/plugins/plugin.legend.js | @@ -65,7 +65,7 @@ export class Legend extends Element {
this._margins = undefined;
this.position = undefined;
this.weight = undefined;
- this.fullWidth = undefined;
+ this.fullSize = undefined;
}
update(maxWidth, maxHeight, margins) {
@@ -540,7 +540,7 @@ export default {
display: true,
position: ... | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | src/plugins/plugin.title.js | @@ -23,7 +23,7 @@ export class Title extends Element {
this.height = undefined;
this.position = undefined;
this.weight = undefined;
- this.fullWidth = undefined;
+ this.fullSize = undefined;
}
update(maxWidth, maxHeight) {
@@ -170,7 +170,7 @@ export default {
font: {
style: 'bold',
},
- full... | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | test/specs/core.layouts.tests.js | @@ -206,7 +206,7 @@ describe('Chart.layouts', function() {
x2: {
type: 'category',
position: 'top',
- fullWidth: true,
+ fullSize: true,
offset: false
},
y: { | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | test/specs/plugin.legend.tests.js | @@ -7,7 +7,7 @@ describe('Legend block tests', function() {
display: true,
position: 'top',
align: 'center',
- fullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)
+ fullSize: true,
reverse: false,
weight: 1000,
@@ -768,24 +768,24 @@ descr... | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | test/specs/plugin.title.tests.js | @@ -9,7 +9,7 @@ describe('Title block tests', function() {
color: Chart.defaults.color,
display: false,
position: 'top',
- fullWidth: true,
+ fullSize: true,
weight: 2000,
font: {
style: 'bold'
@@ -291,24 +291,24 @@ describe('Title block tests', function() {
options: {
plugins: {... | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | types/index.esm.d.ts | @@ -717,7 +717,7 @@ export const layouts: {
configure(
chart: Chart,
item: LayoutItem,
- options: { fullWidth?: number; position?: LayoutPosition; weight?: number }
+ options: { fullSize?: number; position?: LayoutPosition; weight?: number }
): void;
/**
@@ -1222,7 +1222,7 @@ export interface Scale<O ex... | true |
Other | chartjs | Chart.js | ad84d285d841cefc8fef6a8e8e301bd5a68c010e.json | Rename LayoutItem.fullWidth to fullSize (#8358) | types/layout.d.ts | @@ -14,7 +14,7 @@ export interface LayoutItem {
/**
* if true, and the item is horizontal, then push vertical boxes down
*/
- fullWidth: boolean;
+ fullSize: boolean;
/**
* Width of item. Must be valid after update()
*/ | true |
Other | chartjs | Chart.js | 4f74a92b80a6f4c83f45668ad4fbdc921eb0ada9.json | Add documentation for vertical line charts (#8327)
* add documentation for vertical line charts
* remove the indexAxis prop from dataset since it doesnt belong there, fix horizontal bars example and make vertical line example
* 2 bars to line rename
* fix v3-migration guide
* revert deletion of prop from t... | docs/docs/charts/bar.mdx | @@ -294,6 +294,8 @@ The following dataset properties are specific to stacked bar charts.
## Horizontal Bar Chart
A horizontal bar chart is a variation on a vertical bar chart. It is sometimes used to show trend data, and the comparison of multiple data sets side by side.
+To achieve this you will have to set the `i... | true |
Other | chartjs | Chart.js | 4f74a92b80a6f4c83f45668ad4fbdc921eb0ada9.json | Add documentation for vertical line charts (#8327)
* add documentation for vertical line charts
* remove the indexAxis prop from dataset since it doesnt belong there, fix horizontal bars example and make vertical line example
* 2 bars to line rename
* fix v3-migration guide
* revert deletion of prop from t... | docs/docs/charts/line.mdx | @@ -72,6 +72,7 @@ The line chart allows a number of properties to be specified for each dataset. T
| [`hoverBorderDashOffset`](#line-styling) | `number` | Yes | - | `undefined`
| [`hoverBorderJoinStyle`](#line-styling) | `string` | Yes | - | `undefined`
| [`hoverBorderWidth`](#line-styling) | `number` | Yes | - | `u... | true |
Other | chartjs | Chart.js | 4f74a92b80a6f4c83f45668ad4fbdc921eb0ada9.json | Add documentation for vertical line charts (#8327)
* add documentation for vertical line charts
* remove the indexAxis prop from dataset since it doesnt belong there, fix horizontal bars example and make vertical line example
* 2 bars to line rename
* fix v3-migration guide
* revert deletion of prop from t... | docs/docs/getting-started/v3-migration.md | @@ -53,7 +53,7 @@ const chart = new Chart(ctx, {
### Chart types
-* `horizontalBar` chart type was removed. Horizontal bar charts can be configured using the new [`indexAxis`](./charts/bar.mdx#general) option
+* `horizontalBar` chart type was removed. Horizontal bar charts can be configured using the new [`indexAx... | true |
Other | chartjs | Chart.js | a730fc68fa4618afeb3dea9201e5c8686e47b2ae.json | Fix broken links in tooltip docs (#8316) | docs/docs/configuration/tooltip.md | @@ -93,17 +93,17 @@ These options are only applied to text lines. Color boxes are always aligned to
### Sort Callback
-Allows sorting of [tooltip items](#tooltip-item-interface). Must implement at minimum a function that can be passed to [Array.prototype.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScrip... | false |
Other | chartjs | Chart.js | e63beb8c6da12fe1ae0666bb0a1dea7d9c77629a.json | Add note about v3 dev code in readme (#8283)
* Add note about v3 dev code in readme
* Adjust note based on feedback | README.md | @@ -13,6 +13,13 @@
## Documentation
+Currently, there are two versions of the library (2.9.4 and 3.x.x). Version 2 is the latest stable version while 3 is the next (currently beta) version. As such bear the following in mind:
+
+* Current docs points to version 2.9.4
+* Npm/CDN/etc point to version 2.9.4 (unless y... | false |
Other | chartjs | Chart.js | 397d5bdee4163514948d2be7e4910fd26db788af.json | Remove empty line from the options table (#8274) | docs/docs/axes/styling.mdx | @@ -29,7 +29,6 @@ The grid line configuration is nested under the scale configuration in the `grid
| `tickColor` | [`Color`](../general/colors.md) | Yes | Yes | | Color of the tick line. If unset, defaults to the grid line color.
| `tickLength` | `number` | | | `10` | Length in pixels that the grid lines will draw in... | false |
Other | chartjs | Chart.js | 0c48c1148a7f791fb31a01f8b1ef51386559bab3.json | Fix resize bug of line / radar charts (#8266)
* Line: Make sure control points are re-calculated
* Radar: always set point on update | src/controllers/controller.radar.js | @@ -25,10 +25,10 @@ export default class RadarController extends DatasetController {
const labels = meta.iScale.getLabels();
// Update Line
+ line.points = points;
// In resize mode only point locations change, so no need to set the points or options.
if (mode !== 'resize') {
const properties = {
- ... | true |
Other | chartjs | Chart.js | 0c48c1148a7f791fb31a01f8b1ef51386559bab3.json | Fix resize bug of line / radar charts (#8266)
* Line: Make sure control points are re-calculated
* Radar: always set point on update | src/elements/element.line.js | @@ -228,9 +228,11 @@ export default class LineElement extends Element {
}
set points(points) {
- this._points = points;
- delete this._segments;
- delete this._path;
+ const me = this;
+ me._points = points;
+ delete me._segments;
+ delete me._path;
+ me._pointsUpdated = false;
}
get points() { | true |
Other | chartjs | Chart.js | 81a1e9a95ecf9f7d8f2db94f436e1f30e002e23a.json | Add type linting (#8264) | package-lock.json | @@ -564,6 +564,32 @@
"integrity": "sha512-K3Aul4Ct6O48yWw0/az5rqk2K76oNXXX3Su32Xkh4SfMFvPt0QEkq0Q6+3icE5S3U2c88WAuq3Vh1Iaz4aUH+w==",
"dev": true
},
+ "@nodelib/fs.scandir": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
+ ... | true |
Other | chartjs | Chart.js | 81a1e9a95ecf9f7d8f2db94f436e1f30e002e23a.json | Add type linting (#8264) | package.json | @@ -39,6 +39,7 @@
"docs": "cd docs && npm install && npm run build",
"lint-js": "eslint samples/**/*.html samples/**/*.js src/**/*.js test/**/*.js",
"lint-tsc": "tsc",
+ "lint-types": "eslint types/**/*.d.ts",
"lint": "concurrently \"npm:lint-*\"",
"test": "npm run lint && cross-env NODE_ENV... | true |
Other | chartjs | Chart.js | 81a1e9a95ecf9f7d8f2db94f436e1f30e002e23a.json | Add type linting (#8264) | types/.eslintrc.yml | @@ -0,0 +1,18 @@
+parser: '@typescript-eslint/parser'
+
+plugins:
+ - '@typescript-eslint'
+
+extends:
+ - chartjs
+ - plugin:@typescript-eslint/recommended
+
+# These rules were set to warning to make the linting pass initially,
+# without making any major changes to types.
+rules:
+ no-use-before-define: "warn"
+... | true |
Other | chartjs | Chart.js | 81a1e9a95ecf9f7d8f2db94f436e1f30e002e23a.json | Add type linting (#8264) | types/index.esm.d.ts | @@ -12,10 +12,10 @@
* }
*/
-import { TimeUnit } from "./adapters";
+import { TimeUnit } from './adapters';
import { AnimationEvent } from './animation';
import { Color } from './color';
-import { Element }from './element';
+import { Element } from './element';
import { ChartArea, Point } from './geometric';
i... | true |
Other | chartjs | Chart.js | b73b8f98633f399ac804d52bb0c8ed6d2212d3ea.json | Update running animations (#7196) | src/core/core.animation.js | @@ -42,6 +42,19 @@ export default class Animation {
return this._active;
}
+ update(cfg, to, date) {
+ const me = this;
+ if (me._active) {
+ const currentValue = me._target[me._prop];
+ const elapsed = date - me._start;
+ const remain = me._duration - elapsed;
+ me._start = date;
+ me._duration = Ma... | true |
Other | chartjs | Chart.js | b73b8f98633f399ac804d52bb0c8ed6d2212d3ea.json | Update running animations (#7196) | src/core/core.animations.js | @@ -147,6 +147,7 @@ export default class Animations {
const animations = [];
const running = target.$animations || (target.$animations = {});
const props = Object.keys(values);
+ const date = Date.now();
let i;
for (i = props.length - 1; i >= 0; --i) {
@@ -161,11 +162,17 @@ export default class Animat... | true |
Other | chartjs | Chart.js | b73b8f98633f399ac804d52bb0c8ed6d2212d3ea.json | Update running animations (#7196) | src/core/core.controller.js | @@ -343,7 +343,6 @@ export default class Chart {
options.onResize(me, newSize);
}
- me.stop();
me.update('resize');
}
} | true |
Other | chartjs | Chart.js | e22f8bd7dcb26532d1c5703f4c7c632ffb406c6c.json | Update Migration Guide (#7186)
* Add headers & split list of removed developer properties
* Reorganize option changes & include scale option example | docs/getting-started/v3-migration.md | @@ -17,45 +17,13 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
* Chart.js is no longer providing the `Chart.bundle.js` and `Chart.bundle.min.js`. Please see the [installation](installation.md) and [integration](integration.md) docs for details on the recommended way to setup Chart.... | false |
Other | chartjs | Chart.js | 1212ebde868297ed6922887b57aedaa4f0200ac9.json | Allow running releases on v3 release branch (#7185)
* Allow running releases on v3 release branch
* Remove `on` statement from yml config | .travis.yml | @@ -36,8 +36,7 @@ deploy:
- provider: script
script: ./scripts/release.sh
skip_cleanup: true
- on:
- branch: release
+ if: branch IN (release, release-3.x)
- provider: releases
api_key: $GITHUB_AUTH_TOKEN
skip_cleanup: true | false |
Other | chartjs | Chart.js | e1796d361fe7a942168a4193e2f7ec14b7ee1c49.json | expose boxWidth and boxHeight on tooltip (#6995) | docs/configuration/tooltip.md | @@ -42,6 +42,8 @@ The tooltip configuration is passed into the `options.tooltips` namespace. The g
| `cornerRadius` | `number` | `6` | Radius of tooltip corner curves.
| `multiKeyBackground` | `Color` | `'#fff'` | Color to draw behind the colored boxes when multiple items are in the tooltip.
| `displayColors` | `boo... | true |
Other | chartjs | Chart.js | e1796d361fe7a942168a4193e2f7ec14b7ee1c49.json | expose boxWidth and boxHeight on tooltip (#6995) | src/plugins/plugin.tooltip.js | @@ -242,6 +242,9 @@ function resolveOptions(options) {
options.bodyFontStyle = valueOrDefault(options.bodyFontStyle, defaults.fontStyle);
options.bodyFontSize = valueOrDefault(options.bodyFontSize, defaults.fontSize);
+ options.boxHeight = valueOrDefault(options.boxHeight, options.bodyFontSize);
+ options.boxWidt... | true |
Other | chartjs | Chart.js | 6836e514bf2619ee926b0b85996324f8851bc6c2.json | Make update_latest work with alpha, beta, etc. (#7177)
Make update_latest work with alpha, beta, etc. | scripts/deploy.sh | @@ -20,10 +20,22 @@ fi
function update_latest {
local out_path=$1
+
+ # The most recent directory whose name is a version number
local latest=($(ls -v $out_path | egrep '^('$VERSION_REGEX')$' | tail -1))
+
+ # As soon as a single version is deployed this line is a no-op
if [ "$latest" == "" ]; t... | false |
Other | chartjs | Chart.js | 788dbd4499f71063357b2dbc2ba29a4e1f5282c6.json | Alphabetize element default options (#7170)
* Alphabetize element default options
* Add arc
* Add missing comma | src/elements/element.arc.js | @@ -6,9 +6,9 @@ const TAU = Math.PI * 2;
defaults.set('elements', {
arc: {
backgroundColor: defaults.color,
+ borderAlign: 'center',
borderColor: '#fff',
- borderWidth: 2,
- borderAlign: 'center'
+ borderWidth: 2
}
});
| true |
Other | chartjs | Chart.js | 788dbd4499f71063357b2dbc2ba29a4e1f5282c6.json | Alphabetize element default options (#7170)
* Alphabetize element default options
* Add arc
* Add missing comma | src/elements/element.line.js | @@ -13,16 +13,16 @@ const defaultColor = defaults.color;
defaults.set('elements', {
line: {
- tension: 0.4,
backgroundColor: defaultColor,
- borderWidth: 3,
- borderColor: defaultColor,
borderCapStyle: 'butt',
+ borderColor: defaultColor,
borderDash: [],
- borderDashOffset: 0.0,
+ borderDashOffset: ... | true |
Other | chartjs | Chart.js | 788dbd4499f71063357b2dbc2ba29a4e1f5282c6.json | Alphabetize element default options (#7170)
* Alphabetize element default options
* Add arc
* Add missing comma | src/elements/element.point.js | @@ -6,15 +6,14 @@ const defaultColor = defaults.color;
defaults.set('elements', {
point: {
- radius: 3,
- pointStyle: 'circle',
backgroundColor: defaultColor,
borderColor: defaultColor,
borderWidth: 1,
- // Hover
hitRadius: 1,
+ hoverBorderWidth: 1,
hoverRadius: 4,
- hoverBorderWidth: 1
+ poin... | true |
Other | chartjs | Chart.js | 6638549a7517387fe5ac8ec877c064808c709334.json | Remove unused constructor parameter (#7171) | src/controllers/controller.bubble.js | @@ -124,6 +124,8 @@ export default class BubbleController extends DatasetController {
}
/**
+ * @param {number} index
+ * @param {string} [mode]
* @protected
*/
resolveDataElementOptions(index, mode) { | true |
Other | chartjs | Chart.js | 6638549a7517387fe5ac8ec877c064808c709334.json | Remove unused constructor parameter (#7171) | src/core/core.element.js | @@ -5,16 +5,12 @@ export default class Element {
static extend = inherits;
- constructor(cfg) {
+ constructor() {
this.x = undefined;
this.y = undefined;
this.active = false;
this.options = undefined;
this.$animations = undefined;
-
- if (cfg) {
- Object.assign(this, cfg);
- }
}
/** | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | docs/axes/cartesian/time.md | @@ -4,7 +4,7 @@ The time scale is used to display times and dates. When building its ticks, it w
## Date Adapters
-The time scale requires both a date library and corresponding adapter to be present. By default, Chart.js includes an adapter for Moment.js. You may wish to choose from [other available adapters](http... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | docs/getting-started/integration.md | @@ -35,32 +35,14 @@ require(['path/to/chartjs/dist/Chart.min.js'], function(Chart){
});
```
-**Note:** in order to use the time scale, you need to make sure [one of the available date adapters](https://github.com/chartjs/awesome#adapters) and corresponding date library are fully loaded **before** requiring Chart.js... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | docs/getting-started/v3-migration.md | @@ -15,7 +15,7 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released
### Setup and installation
* Chart.js is no longer providing the `Chart.bundle.js` and `Chart.bundle.min.js`. Please see the [installation](installation.md) and [integration](integration.md) docs for details on the rec... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | karma.conf.js | @@ -55,7 +55,8 @@ module.exports = function(karma) {
{pattern: 'test/fixtures/**/*.png', included: false},
'node_modules/moment/min/moment.min.js',
'test/index.js',
- 'src/index.js'
+ 'src/index.js',
+ 'node_modules/chartjs-adapter-moment/dist/chartjs-adapter-moment.js'
].concat((args.inputs || 'te... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | package-lock.json | @@ -3932,6 +3932,12 @@
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
"dev": true
},
+ "chartjs-adapter-moment": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/chartjs-adapter-moment/-/chartjs-adapter-mom... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | package.json | @@ -39,6 +39,7 @@
"@rollup/plugin-node-resolve": "^7.1.1",
"babel-plugin-istanbul": "^6.0.0",
"babel-preset-es2015-rollup": "^3.0.0",
+ "chartjs-adapter-moment": "^0.1.1",
"coveralls": "^3.0.9",
"eslint": "^6.8.0",
"eslint-config-chartjs": "^0.2.0", | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | rollup.config.js | @@ -4,7 +4,6 @@
const babel = require('rollup-plugin-babel');
const cleanup = require('rollup-plugin-cleanup');
const json = require('@rollup/plugin-json');
-const optional = require('./rollup.plugins').optional;
const resolve = require('@rollup/plugin-node-resolve');
const terser = require('rollup-plugin-terser')... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | rollup.plugins.js | @@ -1,60 +0,0 @@
-/* eslint-disable import/no-commonjs */
-const UMD_WRAPPER_RE = /(\(function \(global, factory\) \{)((?:\s.*?)*)(\}\(this,)/;
-const CJS_FACTORY_RE = /(module.exports = )(factory\(.*?\))( :)/;
-const AMD_FACTORY_RE = /(define\()(.*?, factory)(\) :)/;
-
-function optional(config = {}) {
- return {
- n... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | samples/.eslintrc.yml | @@ -3,6 +3,7 @@ globals:
Chart: true
Samples: true
moment: true
+ luxon: true
randomScalingFactor: true
rules: | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | samples/scales/financial.html | @@ -3,8 +3,9 @@
<head>
<title>Line Chart</title>
- <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/moment.min.js"></script>
<script src="../../dist/Chart.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/luxon@1.15.0"></script>
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-luxon... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | samples/scales/time/combo.html | @@ -3,8 +3,8 @@
<head>
<title>Line Chart - Combo Time Scale</title>
- <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/moment.min.js"></script>
<script src="../../../dist/Chart.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns@1.0.0/dist/chartjs-adapter-date-fns.bundle... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | samples/scales/time/line-max-span.html | @@ -3,8 +3,9 @@
<head>
<title>Time Scale Point Data</title>
- <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/moment.min.js"></script>
<script src="../../../dist/Chart.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0"></script>
+ <script src="https://cdn.jsdelivr.net/npm/chartj... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | samples/scales/time/line-point-data.html | @@ -3,8 +3,9 @@
<head>
<title>Time Scale Point Data</title>
- <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/moment.min.js"></script>
<script src="../../../dist/Chart.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0"></script>
+ <script src="https://cdn.jsdelivr.net/npm/chartj... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | samples/scales/time/line.html | @@ -3,8 +3,9 @@
<head>
<title>Line Chart</title>
- <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/moment.min.js"></script>
<script src="../../../dist/Chart.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0"></script>
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-m... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | src/adapters/adapter.moment.js | @@ -1,58 +0,0 @@
-// TODO v3 - make this adapter external (chartjs-adapter-moment)
-
-import moment from 'moment';
-import adapters from '../core/core.adapters';
-
-const FORMATS = {
- datetime: 'MMM D, YYYY, h:mm:ss a',
- millisecond: 'h:mm:ss.SSS a',
- second: 'h:mm:ss a',
- minute: 'h:mm a',
- hour: 'hA',
- day: 'MM... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | src/adapters/index.js | @@ -1,8 +0,0 @@
-// -----------------------------------------------------------------------------
-// IMPORTANT: do NOT submit new adapters to this repository, instead
-// create an external library named `chartjs-adapter-{lib-name}`
-// -----------------------------------------------------------------------------
-
-/... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | src/index.js | @@ -45,9 +45,6 @@ Chart.Ticks = Ticks;
import * as scales from './scales/index';
Object.keys(scales).forEach(key => Chart.scaleService.registerScale(scales[key]));
-// Load to register built-in adapters (as side effects)
-import './adapters/index';
-
// Loading built-in plugins
import plugins from './plugins/inde... | true |
Other | chartjs | Chart.js | df3c73cc5e05f92a13cf601bff4724d2b3874f7a.json | Give the boot to chartjs-adapter-moment (#7155)
Remove default of using chartjs-adapter-moment | src/scales/scale.time.js | @@ -539,10 +539,10 @@ const defaultConfig = {
adapters: {},
time: {
- parser: false, // false == a pattern string from https://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment
+ parser: false, // false == a pattern string from or a custom callback that conve... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | docs/developers/axes.md | @@ -6,14 +6,16 @@ Axes in Chart.js can be individually extended. Axes should always derive from `C
let MyScale = Chart.Scale.extend({
/* extensions ... */
});
+MyScale.id = 'myScale';
+MyScale.defaults = defaultConfigObject;
// MyScale is now derived from Chart.Scale
```
Once you have created your scale c... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | docs/getting-started/v3-migration.md | @@ -223,6 +223,7 @@ Animation system was completely rewritten in Chart.js v3. Each property can now
* `Scale.getLabelForIndex` was replaced by `scale.getLabelForValue`
* `Scale.getPixelForValue` now has only one parameter. For the `TimeScale` that parameter must be millis since the epoch
+* `ScaleService.registerSc... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/core/core.scaleService.js | @@ -11,9 +11,11 @@ export default {
// Scale config defaults
defaults: {},
- registerScaleType(type, scaleConstructor, scaleDefaults) {
- this.constructors[type] = scaleConstructor;
- this.defaults[type] = clone(scaleDefaults);
+ registerScale(scaleConstructor) {
+ const me = this;
+ const type = scaleConstru... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/index.js | @@ -42,11 +42,8 @@ Chart.scaleService = scaleService;
Chart.Ticks = Ticks;
// Register built-in scales
-import scales from './scales/index';
-Object.keys(scales).forEach((type) => {
- const scale = scales[type];
- Chart.scaleService.registerScaleType(type, scale, scale._defaults);
-});
+import * as scales from './s... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/scales/index.js | @@ -1,13 +1,5 @@
-import category from './scale.category';
-import linear from './scale.linear';
-import logarithmic from './scale.logarithmic';
-import radialLinear from './scale.radialLinear';
-import time from './scale.time';
-
-export default {
- category,
- linear,
- logarithmic,
- radialLinear,
- time
-};
+export... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/scales/scale.category.js | @@ -5,8 +5,9 @@ const defaultConfig = {
export default class CategoryScale extends Scale {
+ static id = 'category';
// INTERNAL: static default options, registered in src/index.js
- static _defaults = defaultConfig;
+ static defaults = defaultConfig;
constructor(cfg) {
super(cfg); | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/scales/scale.linear.js | @@ -11,8 +11,9 @@ const defaultConfig = {
export default class LinearScale extends LinearScaleBase {
+ static id = 'linear';
// INTERNAL: static default options, registered in src/index.js
- static _defaults = defaultConfig;
+ static defaults = defaultConfig;
determineDataLimits() {
const me = this; | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/scales/scale.logarithmic.js | @@ -59,8 +59,9 @@ const defaultConfig = {
export default class LogarithmicScale extends Scale {
+ static id = 'logarithmic';
// INTERNAL: static default options, registered in src/index.js
- static _defaults = defaultConfig;
+ static defaults = defaultConfig;
constructor(cfg) {
super(cfg); | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/scales/scale.radialLinear.js | @@ -292,8 +292,9 @@ function numberOrZero(param) {
export default class RadialLinearScale extends LinearScaleBase {
+ static id = 'radialLinear';
// INTERNAL: static default options, registered in src/index.js
- static _defaults = defaultConfig;
+ static defaults = defaultConfig;
constructor(cfg) {
super(... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | src/scales/scale.time.js | @@ -567,8 +567,9 @@ const defaultConfig = {
export default class TimeScale extends Scale {
+ static id = 'time';
// INTERNAL: static default options, registered in src/index.js
- static _defaults = defaultConfig;
+ static defaults = defaultConfig;
/**
* @param {object} props | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | test/specs/core.scale.tests.js | @@ -460,7 +460,9 @@ describe('Core.scale', function() {
return ['tick'];
}
});
- Chart.scaleService.registerScaleType('customScale', customScale, {});
+ customScale.id = 'customScale';
+ customScale.defaults = {};
+ Chart.scaleService.registerScale(customScale);
var chart = window.acquireCh... | true |
Other | chartjs | Chart.js | 3c1e04f928f74356d81c12c2034b2bcfde4472ba.json | Allow registering scale with single parameter (#7157)
Allow registering scale with single parameter | test/specs/core.scaleService.tests.js | @@ -2,14 +2,15 @@
describe('Test the scale service', function() {
it('should update scale defaults', function() {
- var defaults = {
- testProp: true
- };
var type = 'my_test_type';
var Constructor = function() {
this.initialized = true;
};
- Chart.scaleService.registerScaleType(type, Constructor... | true |
Other | chartjs | Chart.js | fc0a056fee9d33b20883bdf449493baf4d7acec6.json | Remove position defaults (#7165) | src/controllers/controller.bubble.js | @@ -11,12 +11,10 @@ defaults.set('bubble', {
},
scales: {
x: {
- type: 'linear',
- position: 'bottom'
+ type: 'linear'
},
y: {
- type: 'linear',
- position: 'left'
+ type: 'linear'
}
},
| true |
Other | chartjs | Chart.js | fc0a056fee9d33b20883bdf449493baf4d7acec6.json | Remove position defaults (#7165) | src/controllers/controller.horizontalBar.js | @@ -10,12 +10,10 @@ defaults.set('horizontalBar', {
scales: {
x: {
type: 'linear',
- position: 'bottom',
beginAtZero: true
},
y: {
type: 'category',
- position: 'left',
offset: true,
gridLines: {
offsetGridLines: true | true |
Other | chartjs | Chart.js | fc0a056fee9d33b20883bdf449493baf4d7acec6.json | Remove position defaults (#7165) | src/controllers/controller.scatter.js | @@ -4,12 +4,10 @@ import defaults from '../core/core.defaults';
defaults.set('scatter', {
scales: {
x: {
- type: 'linear',
- position: 'bottom'
+ type: 'linear'
},
y: {
- type: 'linear',
- position: 'left'
+ type: 'linear'
}
},
| true |
Other | chartjs | Chart.js | 774493e23d1e3ee99f7d865e7852baf73bd9fb44.json | Add some tests to improve coverage (#7164) | test/matchers.js | @@ -69,6 +69,19 @@ function toBeCloseToPixel() {
};
}
+function toBeCloseToPoint() {
+ function rnd(v) {
+ return Math.round(v * 100) / 100;
+ }
+ return {
+ compare: function(actual, expected) {
+ return {
+ pass: rnd(actual.x) === rnd(expected.x) && rnd(actual.y) === rnd(expected.y)
+ };
+ }
+ };
+}
+
... | true |
Other | chartjs | Chart.js | 774493e23d1e3ee99f7d865e7852baf73bd9fb44.json | Add some tests to improve coverage (#7164) | test/specs/core.helpers.tests.js | @@ -13,47 +13,4 @@ describe('Core helper tests', function() {
expect(helpers.uid()).toBe(uid + 2);
expect(helpers.uid()).toBe(uid + 3);
});
-
- describe('Color helper', function() {
- function isColorInstance(obj) {
- return typeof obj === 'object' && obj.valid;
- }
-
- it('should return a color when calle... | true |
Other | chartjs | Chart.js | 774493e23d1e3ee99f7d865e7852baf73bd9fb44.json | Add some tests to improve coverage (#7164) | test/specs/helpers.collection.tests.js | @@ -0,0 +1,30 @@
+import {_lookup, _lookupByKey, _rlookupByKey} from '../../src/helpers/helpers.collection';
+
+describe('helpers.interpolation', function() {
+ it('Should do binary search', function() {
+ const data = [0, 2, 6, 9];
+ expect(_lookup(data, 0)).toEqual({lo: 0, hi: 1});
+ expect(_lookup(data, 1)).toEqu... | true |
Other | chartjs | Chart.js | 774493e23d1e3ee99f7d865e7852baf73bd9fb44.json | Add some tests to improve coverage (#7164) | test/specs/helpers.color.tests.js | @@ -0,0 +1,44 @@
+import {color, getHoverColor} from '../../src/helpers/helpers.color';
+
+describe('Color helper', function() {
+ function isColorInstance(obj) {
+ return typeof obj === 'object' && obj.valid;
+ }
+
+ it('should return a color when called with a color', function() {
+ expect(isColorInstance(color('rg... | true |
Other | chartjs | Chart.js | 774493e23d1e3ee99f7d865e7852baf73bd9fb44.json | Add some tests to improve coverage (#7164) | test/specs/helpers.interpolation.tests.js | @@ -0,0 +1,35 @@
+import {_pointInLine, _steppedInterpolation, _bezierInterpolation} from '../../src/helpers/helpers.interpolation';
+
+describe('helpers.interpolation', function() {
+ it('Should interpolate a point in line', function() {
+ expect(_pointInLine({x: 10, y: 10}, {x: 20, y: 20}, 0)).toEqual({x: 10, y: 10}... | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/controllers/controller.bar.js | @@ -1,6 +1,6 @@
import DatasetController from '../core/core.datasetController';
import defaults from '../core/core.defaults';
-import Rectangle from '../elements/element.rectangle';
+import {Rectangle} from '../elements/index';
import {clipArea, unclipArea} from '../helpers/helpers.canvas';
import {isArray, isNullO... | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/controllers/controller.bubble.js | @@ -1,6 +1,6 @@
import DatasetController from '../core/core.datasetController';
import defaults from '../core/core.defaults';
-import Point from '../elements/element.point';
+import {Point} from '../elements/index';
import {resolve} from '../helpers/helpers.options';
defaults.set('bubble', { | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/controllers/controller.doughnut.js | @@ -1,6 +1,6 @@
import DatasetController from '../core/core.datasetController';
import defaults from '../core/core.defaults';
-import Arc from '../elements/element.arc';
+import {Arc} from '../elements/index';
import {isArray, valueOrDefault} from '../helpers/helpers.core';
/** | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/controllers/controller.line.js | @@ -1,7 +1,6 @@
import DatasetController from '../core/core.datasetController';
import defaults from '../core/core.defaults';
-import Line from '../elements/element.line';
-import Point from '../elements/element.point';
+import {Line, Point} from '../elements/index';
import {valueOrDefault} from '../helpers/helpers.... | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/controllers/controller.polarArea.js | @@ -1,6 +1,6 @@
import DatasetController from '../core/core.datasetController';
import defaults from '../core/core.defaults';
-import Arc from '../elements/element.arc';
+import {Arc} from '../elements/index';
import {toRadians} from '../helpers/helpers.math';
import {resolve} from '../helpers/helpers.options';
| true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/controllers/controller.radar.js | @@ -1,7 +1,6 @@
import DatasetController from '../core/core.datasetController';
import defaults from '../core/core.defaults';
-import Line from '../elements/element.line';
-import Point from '../elements/element.point';
+import {Line, Point} from '../elements/index';
import {valueOrDefault} from '../helpers/helpers.... | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/elements/index.js | @@ -1,11 +1,4 @@
-import Arc from './element.arc';
-import Line from './element.line';
-import Point from './element.point';
-import Rectangle from './element.rectangle';
-
-export default {
- Arc,
- Line,
- Point,
- Rectangle
-};
+export {default as Arc} from './element.arc';
+export {default as Line} from './element.... | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | src/index.js | @@ -1,3 +1,5 @@
+/* eslint-disable import/no-namespace, import/namespace */
+
/**
* @namespace Chart
*/
@@ -12,7 +14,7 @@ import controllers from './controllers/index';
import DatasetController from './core/core.datasetController';
import defaults from './core/core.defaults';
import Element from './core/core.el... | true |
Other | chartjs | Chart.js | ac69e81b045350724f2bc2ff28ed5ccad2690a67.json | Turn elements/index into an index (#7135) | test/specs/global.namespace.tests.js | @@ -20,9 +20,6 @@ describe('Chart namespace', function() {
});
describe('Chart.elements', function() {
- it('should be an object', function() {
- expect(Chart.elements instanceof Object).toBeTruthy();
- });
it('should contains "elements" classes', function() {
expect(Chart.elements.Arc instanceof Funct... | true |
Other | chartjs | Chart.js | f3ef620c6876ad13188f5c95f65b010952d219ea.json | Make test Context an ES6 module (#7142)
* Make test Context an ES6 module
* Address comments | karma.conf.js | @@ -68,7 +68,7 @@ module.exports = function(karma) {
plugins: [
resolve(),
babel({exclude: 'node_modules/**'}), // use babel since we have ES proposal features
- commonjs()
+ commonjs({exclude: ['src/**', 'test/**']})
],
output: {
name: 'test', | true |
Other | chartjs | Chart.js | f3ef620c6876ad13188f5c95f65b010952d219ea.json | Make test Context an ES6 module (#7142)
* Make test Context an ES6 module
* Address comments | test/context.js | @@ -1,5 +1,5 @@
// Code from https://stackoverflow.com/questions/4406864/html-canvas-unit-testing
-var Context = function() {
+const Context = function() {
this._calls = []; // names/args of recorded calls
this._initMethods();
@@ -136,4 +136,4 @@ Context.prototype.resetCalls = function() {
this._calls = [];
}... | true |
Other | chartjs | Chart.js | 428411319a24d2d8e4823a80a07fd3038fcc6dfa.json | Create a Tick typedef (#7124) | src/core/core.scale.js | @@ -8,6 +8,7 @@ import Ticks from './core.ticks';
/**
* @typedef { import("./core.controller").default } Chart
+ * @typedef {{value:any, label?:string, major?:boolean}} Tick
*/
defaults.set('scale', {
@@ -64,7 +65,11 @@ defaults.set('scale', {
}
});
-/** Returns a new array containing numItems from arr *... | false |
Other | chartjs | Chart.js | 392921c35479b6fd8cc947b95a8868765feeb1e9.json | Remove unnecessary changes (#7140) | .travis.yml | @@ -3,7 +3,7 @@ node_js:
- lts/*
before_install:
- - "export CHROME_BIN=/usr/bin/google-chrome-beta"
+ - "export CHROME_BIN=/usr/bin/google-chrome"
services:
- xvfb
@@ -20,7 +20,7 @@ sudo: required
dist: bionic
addons:
- chrome: beta
+ chrome: stable
firefox: latest
# IMPORTANT: scripts requir... | true |
Other | chartjs | Chart.js | 392921c35479b6fd8cc947b95a8868765feeb1e9.json | Remove unnecessary changes (#7140) | docs/_config.yml | @@ -1,2 +0,0 @@
-include:
- - "_*_.html" | true |
Other | chartjs | Chart.js | ee7520b7105618072a6f0870bcc32abcccf1b7cd.json | Remove css from deploy scripts (#7131) | scripts/deploy.sh | @@ -41,7 +41,7 @@ cd $TARGET_DIR
git checkout $TARGET_BRANCH
# Copy dist files
-deploy_files '../dist/*.css ../dist/*.js' './dist'
+deploy_files '../dist/*.js' './dist'
# Copy generated documentation
deploy_files '../dist/docs/*' './docs' | true |
Other | chartjs | Chart.js | ee7520b7105618072a6f0870bcc32abcccf1b7cd.json | Remove css from deploy scripts (#7131) | scripts/release.sh | @@ -21,7 +21,7 @@ git remote add auth-origin https://$GITHUB_AUTH_TOKEN@github.com/$TRAVIS_REPO_SL
git config --global user.email "$GITHUB_AUTH_EMAIL"
git config --global user.name "Chart.js"
git checkout --detach --quiet
-git add -f dist/*.css dist/*.js bower.json
+git add -f dist/*.js bower.json
git commit -m "Re... | true |
Other | chartjs | Chart.js | bd4537cae426ca9813cbaf5ed144ce94a8f62f09.json | Fix deploy.sh if (#7132) | scripts/deploy.sh | @@ -8,7 +8,7 @@ TARGET_REPO_URL="https://$GITHUB_AUTH_TOKEN@github.com/chartjs/chartjs.github.io
VERSION_REGEX='[[:digit:]]+.[[:digit:]]+.[[:digit:]]+(-.*)?'
# Make sure that this script is executed only for the release and master branches
-if [ "$TRAVIS_BRANCH" =~ ^release.*$ ]; then
+if [[ "$TRAVIS_BRANCH" =~ ^re... | false |
Other | chartjs | Chart.js | 4a737729d5ca1718510796d1391b8a8991968efd.json | Move color helpers to helpers.color (#7130)
Move color helpers to helpers.color | src/helpers/helpers.color.js | @@ -0,0 +1,24 @@
+import colorLib from '@kurkle/color';
+
+/**
+ * @param {string | CanvasGradient | CanvasPattern} value
+ */
+const isPatternOrGradient = (value) => value instanceof CanvasGradient || value instanceof CanvasPattern;
+
+/**
+ * @param {string|CanvasGradient|CanvasPattern} value
+ * @return {CanvasGradi... | true |
Other | chartjs | Chart.js | 4a737729d5ca1718510796d1391b8a8991968efd.json | Move color helpers to helpers.color (#7130)
Move color helpers to helpers.color | src/helpers/index.js | @@ -1,7 +1,5 @@
/* eslint-disable import/no-namespace */
-import color from '@kurkle/color';
-
import * as coreHelpers from './helpers.core';
import * as canvas from './helpers.canvas';
import * as curve from './helpers.curve';
@@ -11,16 +9,7 @@ import * as options from './helpers.options';
import * as math from... | true |
Other | chartjs | Chart.js | f2aa88f49d432bd87281a7a90a7015388a594dff.json | Prepare babel & karma for class properties (#7126)
* Prepare babel & karma for class properties
* Remove rollup-plugin-istanbul | babel.config.json | @@ -1,4 +1,12 @@
{
"presets": ["@babel/preset-env"],
- "plugins": ["@babel/plugin-transform-object-assign"]
+ "plugins": [
+ "@babel/plugin-transform-object-assign",
+ "@babel/plugin-proposal-class-properties"
+ ],
+ "env": {
+ "test": {
+ "plugins": ["istanbul"]
+ }
+ }
} | true |
Other | chartjs | Chart.js | f2aa88f49d432bd87281a7a90a7015388a594dff.json | Prepare babel & karma for class properties (#7126)
* Prepare babel & karma for class properties
* Remove rollup-plugin-istanbul | gulpfile.js | @@ -1,4 +1,4 @@
-/* eslint-disable no-use-before-define */
+/* eslint-disable import/no-nodejs-modules, import/no-commonjs, no-use-before-define */
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const file = require('gulp-file');
@@ -42,15 +42,15 @@ gulp.task('size', gulp.parallel('library-size... | true |
Other | chartjs | Chart.js | f2aa88f49d432bd87281a7a90a7015388a594dff.json | Prepare babel & karma for class properties (#7126)
* Prepare babel & karma for class properties
* Remove rollup-plugin-istanbul | karma.conf.js | @@ -1,9 +1,9 @@
-/* eslint-env es6 */
+/* eslint-disable import/no-commonjs */
const commonjs = require('rollup-plugin-commonjs');
-const istanbul = require('rollup-plugin-istanbul');
const resolve = require('rollup-plugin-node-resolve');
const builds = require('./rollup.config');
+const babel = require('rollup-pl... | true |
Other | chartjs | Chart.js | f2aa88f49d432bd87281a7a90a7015388a594dff.json | Prepare babel & karma for class properties (#7126)
* Prepare babel & karma for class properties
* Remove rollup-plugin-istanbul | package-lock.json | @@ -353,6 +353,99 @@
"semver": "^5.5.0"
}
},
+ "@babel/helper-create-class-features-plugin": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz",
+ "integrity": "sha512-qmp4pD... | true |
Other | chartjs | Chart.js | f2aa88f49d432bd87281a7a90a7015388a594dff.json | Prepare babel & karma for class properties (#7126)
* Prepare babel & karma for class properties
* Remove rollup-plugin-istanbul | package.json | @@ -31,8 +31,10 @@
],
"devDependencies": {
"@babel/core": "^7.8.4",
+ "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/preset-env": "^7.8.4",
+ "babel-plugin-istanbul": "^6.0.0",
"babel-preset-es2015-rollup": "^3.0.0",
"... | true |
Other | chartjs | Chart.js | 10c3c3bbc9dfdf18a817f7a48acba1a334e39632.json | Simplify rtlAdapter export (#7120) | src/helpers/helpers.rtl.js | @@ -1,4 +1,4 @@
-const getRtlAdapter = function(rectX, width) {
+const getRightToLeftAdapter = function(rectX, width) {
return {
x(x) {
return rectX + rectX + width - x;
@@ -21,7 +21,7 @@ const getRtlAdapter = function(rectX, width) {
};
};
-const getLtrAdapter = function() {
+const getLeftToRightAdapter ... | false |
Other | chartjs | Chart.js | 93f777821a9f9c0475f8669c165fa3149766c4b3.json | Remove version from docs. Use latest (#7128) | docs/getting-started/README.md | @@ -11,7 +11,7 @@ First, we need to have a canvas in our page.
Now that we have a canvas we can use, we need to include Chart.js in our page.
```html
-<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
+<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
```
Now, we can create a chart... | false |
Other | chartjs | Chart.js | 1b1c7fc302f77ee4c1504d5a1202a167620d6ce1.json | Remove unused property _maxLabelLines (#7101) | src/core/core.scale.js | @@ -286,8 +286,6 @@ class Scale extends Element {
/** @type {object} */
this._longestTextCache = {};
/** @type {number} */
- this._maxLabelLines = undefined;
- /** @type {number} */
this._startPixel = undefined;
/** @type {number} */
this._endPixel = undefined;
@@ -445,7 +443,6 @@ class Scale extend... | false |
Other | chartjs | Chart.js | 72c3c6d0802919eb4d24a4ef19cc465e9fa8ff1b.json | Fix memory leak (#7097) | src/core/core.animator.js | @@ -210,6 +210,14 @@ class Animator {
anims.items = [];
this._notify(chart, anims, Date.now(), 'complete');
}
+
+ /**
+ * Remove chart from Animator
+ * @param {Chart} chart
+ */
+ remove(chart) {
+ return this._charts.delete(chart);
+ }
}
const instance = new Animator(); | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.