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
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/DOCS.md
@@ -1,25 +0,0 @@ ---- -name: Documentation -about: Are the docs lacking or missing something? -labels: 'type: documentation' ---- - -Documentation Is: - -<!-- Please place an x (no spaces!) in all [ ] that apply --> - -- [ ] Missing or needed -- [ ] Confusing -- [ ] Not Sure? - -### Please Explain in Detail... - - -###...
true
Other
chartjs
Chart.js
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/FEATURE.md
@@ -1,25 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea -labels: 'type: enhancement' ---- - -<!-- - Most features should start as plugins outside of Chart.js - (https://www.chartjs.org/docs/#advanced-usage-creating-plugins). - Please consider whether your changes are useful for all users, or if this is ...
true
Other
chartjs
Chart.js
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/SUPPORT.md
@@ -1,27 +0,0 @@ ---- -name: Support, Help, and Advice -about: Need help or support? Head to https://stackoverflow.com/questions/tagged/chart.js -labels: 'type: support' ---- - -<!-- - Hey there! - - If you need help or tech support then this is not the place to ask. Please post - a question to https://stackoverflo...
true
Other
chartjs
Chart.js
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/bug.yml
@@ -0,0 +1,84 @@ +name: Bug Report +description: Something went awry +labels: ["type: bug"] +body: + - type: markdown + attributes: + value: | + Need help or support? + Please don't open an issue! Head to https://stackoverflow.com/questions/tagged/chart.js. + + - type: markdown + attributes...
true
Other
chartjs
Chart.js
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Support, Help, and Advice + url: https://stackoverflow.com/questions/tagged/chart.js + about: Need help or support? Head to https://stackoverflow.com/questions/tagged/chart.js
true
Other
chartjs
Chart.js
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/docs.yml
@@ -0,0 +1,31 @@ +name: Documentation +description: Are the docs lacking or missing something? +labels: ["type: documentation"] +body: + - type: checkboxes + attributes: + label: "Documentation Is:" + options: + - label: Missing or needed? + - label: Confusing + - label: Not sure? + +...
true
Other
chartjs
Chart.js
51b051f766c309fd04fbd94556ec5c738c6d153f.json
Improve issue templates (#10038) * Make issue templates fancier * should be valid yml now * remove title field * remove reproducable sample for docs * add example back to docs, change link for plugin and add TS link for TS issues * wrong labels, forgot type: in front of it * implement feedback * g...
.github/ISSUE_TEMPLATE/feature.yml
@@ -0,0 +1,28 @@ +name: Feature Request +description: Suggest an idea +labels: ["type: enhancement"] +body: + - type: markdown + attributes: + value: | + Most features should start as plugins outside of Chart.js + (https://www.chartjs.org/docs/latest/developers/plugins.html). + Please cons...
true
Other
chartjs
Chart.js
f1c99316a714df4637e3d983184c2b680cba2ae5.json
radialLinear: Hide pointLabels of hidden data (#10018) * radialLinear: Hide pointLabels of hidden data * filter after map
src/scales/scale.radialLinear.js
@@ -86,7 +86,7 @@ function fitWithPointLabels(scale) { const labelSizes = []; const padding = []; - const valueCount = scale.getLabels().length; + const valueCount = scale._pointLabels.length; for (let i = 0; i < valueCount; i++) { const opts = scale.options.pointLabels.setContext(scale.getPointLabelC...
true
Other
chartjs
Chart.js
f1c99316a714df4637e3d983184c2b680cba2ae5.json
radialLinear: Hide pointLabels of hidden data (#10018) * radialLinear: Hide pointLabels of hidden data * filter after map
test/specs/scale.radialLinear.tests.js
@@ -369,6 +369,22 @@ describe('Test the radial linear scale', function() { expect(chart.scales.r._pointLabels).toEqual([0, '', '', '', '', '']); }); + it('Should build point labels considering hidden data', function() { + const chart = window.acquireChart({ + type: 'polarArea', + data: { + ...
true
Other
chartjs
Chart.js
5bea389c42b949ca6ebdabf1706295d126ea5f4b.json
Add random seed reporting to test runs (#9977)
karma.conf.js
@@ -1,3 +1,4 @@ +const jasmineSeedReporter = require('./test/seed-reporter'); const commonjs = require('@rollup/plugin-commonjs'); const istanbul = require('rollup-plugin-istanbul'); const json = require('@rollup/plugin-json'); @@ -30,7 +31,8 @@ module.exports = function(karma) { karma.set({ frameworks: ['...
true
Other
chartjs
Chart.js
5bea389c42b949ca6ebdabf1706295d126ea5f4b.json
Add random seed reporting to test runs (#9977)
test/seed-reporter.js
@@ -0,0 +1,13 @@ +const SeedReporter = function(baseReporterDecorator) { + baseReporterDecorator(this); + + this.onBrowserComplete = function(browser, result) { + if (result.order && result.order.random && result.order.seed) { + this.write('%s: Randomized with seed %s\n', browser, result.order.seed); + } +...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/core/core.controller.js
@@ -7,14 +7,14 @@ import PluginService from './core.plugins'; import registry from './core.registry'; import Config, {determineAxis, getIndexAxis} from './core.config'; import {retinaScale, _isDomSupported} from '../helpers/helpers.dom'; -import {each, callback as callCallback, uid, valueOrDefault, _elementsEqual, i...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/core/core.interaction.js
@@ -5,7 +5,7 @@ import {_angleBetween, getAngleFromPoint} from '../helpers/helpers.math'; /** * @typedef { import("./core.controller").default } Chart - * @typedef { import("../platform/platform.base").ChartEvent } ChartEvent + * @typedef { import("../../types/index.esm").ChartEvent } ChartEvent * @typedef {{axi...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/core/core.plugins.js
@@ -3,7 +3,7 @@ import {callback as callCallback, isNullOrUndef, valueOrDefault} from '../helper /** * @typedef { import("./core.controller").default } Chart - * @typedef { import("../platform/platform.base").ChartEvent } ChartEvent + * @typedef { import("../../types/index.esm").ChartEvent } ChartEvent * @typede...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/helpers/helpers.core.js
@@ -340,3 +340,12 @@ export const setsEqual = (a, b) => { return true; }; + +/** + * @param {import('../../types/index.esm').ChartEvent} e - The event + * @returns {boolean} + * @private + */ +export function _isClickEvent(e) { + return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu'; +}
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/platform/platform.base.js
@@ -81,14 +81,3 @@ export default class BasePlatform { // no-op } } - -/** - * @interface ChartEvent - * @typedef {object} ChartEvent - * @prop {string} type - The event type name, possible values are: - * 'contextmenu', 'mouseenter', 'mousedown', 'mousemove', 'mouseup', 'mouseout', - * 'click', 'dblclick', 'k...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/plugins/plugin.legend.js
@@ -10,7 +10,7 @@ import { import {_toLeftRightCenter, _alignStartEnd, _textX} from '../helpers/helpers.extras'; import {toTRBLCorners} from '../helpers/helpers.options'; /** - * @typedef { import("../platform/platform.base").ChartEvent } ChartEvent + * @typedef { import("../../types/index.esm").ChartEvent } ChartEv...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
src/plugins/plugin.tooltip.js
@@ -9,7 +9,7 @@ import {createContext, drawPoint} from '../helpers'; /** * @typedef { import("../platform/platform.base").Chart } Chart - * @typedef { import("../platform/platform.base").ChartEvent } ChartEvent + * @typedef { import("../../types/index.esm").ChartEvent } ChartEvent * @typedef { import("../../type...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
test/specs/core.controller.tests.js
@@ -361,6 +361,39 @@ describe('Chart', function() { await jasmine.triggerMouseEvent(chart, 'mousemove', point); expect(chart.getActiveElements()).toEqual([]); }); + + it('should not change the active elements when outside chartArea, except for mouseout', async function() { + var chart = acqui...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
test/specs/plugin.tooltip.tests.js
@@ -1556,6 +1556,38 @@ describe('Plugin.Tooltip', function() { expect(chart.tooltip.getActiveElements()[0].element).toBe(meta.data[0]); }); + it('should not change the active elements on events outside chartArea, except for mouseout', async function() { + var chart = acquireChart({ + type: ...
true
Other
chartjs
Chart.js
ba6b446b043f8806a2c9a7420516c9b0934b6c3d.json
Limit active element changes to chartArea (#9970) * Limit active element changes to chartArea * CC, remove duplicate ChartEvent interface * CC2
types/index.esm.d.ts
@@ -1031,20 +1031,22 @@ export interface Plugin<TType extends ChartType = ChartType, O = AnyObject> exte * @param {object} args - The call arguments. * @param {ChartEvent} args.event - The event object. * @param {boolean} args.replay - True if this event is replayed from `Chart.update` + * @param {boolean...
true
Other
chartjs
Chart.js
d2d5f49953c130253c06621476e0eecdff4544d0.json
Pass object from array as value to _fallback (#9969) * Pass object from array as value to _fallback * cleanup * reduce changes * reduce even more changes
src/helpers/helpers.config.js
@@ -250,12 +250,12 @@ function resolveFallback(fallback, prop, value) { const getScope = (key, parent) => key === true ? parent : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined; -function addScopes(set, parentScopes, key, parentFallback) { +function addScopes(set, parentScopes, key, parentFal...
true
Other
chartjs
Chart.js
d2d5f49953c130253c06621476e0eecdff4544d0.json
Pass object from array as value to _fallback (#9969) * Pass object from array as value to _fallback * cleanup * reduce changes * reduce even more changes
test/specs/helpers.config.tests.js
@@ -654,6 +654,46 @@ describe('Chart.helpers.config', function() { }); }); + it('should call _fallback with proper value from array when descriptor is object', function() { + const spy = jasmine.createSpy('fallback'); + const descriptors = { + items: { + _fallback: spy + ...
true
Other
chartjs
Chart.js
957ca837d5b5d03f10cdf4b91f67e3d1f3570d9b.json
Specify UTC time zone for the test suite (#9945) The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected. Using moment-timezone to spec...
karma.conf.js
@@ -82,6 +82,7 @@ module.exports = function(karma) { {pattern: 'test/fixtures/**/*.json', included: false}, {pattern: 'test/fixtures/**/*.png', included: false}, 'node_modules/moment/min/moment.min.js', + 'node_modules/moment-timezone/builds/moment-timezone-with-data.min.js', {pattern: ...
true
Other
chartjs
Chart.js
957ca837d5b5d03f10cdf4b91f67e3d1f3570d9b.json
Specify UTC time zone for the test suite (#9945) The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected. Using moment-timezone to spec...
package-lock.json
@@ -47,6 +47,7 @@ "luxon": "^1.26.0", "markdown-it-include": "^2.0.0", "moment": "^2.29.1", + "moment-timezone": "^0.5.34", "pixelmatch": "^5.2.1", "rollup": "^2.44.0", "rollup-plugin-analyzer": "^4.0.0"...
true
Other
chartjs
Chart.js
957ca837d5b5d03f10cdf4b91f67e3d1f3570d9b.json
Specify UTC time zone for the test suite (#9945) The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected. Using moment-timezone to spec...
package.json
@@ -87,6 +87,7 @@ "luxon": "^1.26.0", "markdown-it-include": "^2.0.0", "moment": "^2.29.1", + "moment-timezone": "^0.5.34", "pixelmatch": "^5.2.1", "rollup": "^2.44.0", "rollup-plugin-analyzer": "^4.0.0",
true
Other
chartjs
Chart.js
957ca837d5b5d03f10cdf4b91f67e3d1f3570d9b.json
Specify UTC time zone for the test suite (#9945) The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected. Using moment-timezone to spec...
test/index.js
@@ -18,6 +18,10 @@ jasmine.fixture = { jasmine.triggerMouseEvent = triggerMouseEvent; +// Set a fixed time zone (and, in particular, disable Daylight Saving Time) for +// more stable test results. +window.moment.tz.setDefault('Etc/UTC'); + beforeEach(function() { addMatchers(); });
true
Other
chartjs
Chart.js
957ca837d5b5d03f10cdf4b91f67e3d1f3570d9b.json
Specify UTC time zone for the test suite (#9945) The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected. Using moment-timezone to spec...
test/specs/scale.time.tests.js
@@ -450,8 +450,11 @@ describe('Time scale tests', function() { datasets: [{ xAxisID: 'x', data: [ - {t: +new Date('2018-01-08 05:14:23.234'), y: 10}, - {t: +new Date('2018-01-09 06:17:43.426'), y: 3} + // Normally (at least with the moment.js adapter), tim...
true
Other
chartjs
Chart.js
7784fbfded3c01b61bb553b7fc769c12e6513884.json
Support "r" axis for non-intersecting interaction (#9919) * Support "r" axis for non-intersecting interaction * Extract some interaction functionality * Remove whitespace and semicolons * WIP: add interaction test * Update documentation * Fix test * Add another test * Update axis params * Add a...
docs/configuration/interactions.md
@@ -6,7 +6,7 @@ Namespace: `options.interaction`, the global interaction configuration is at `Ch | ---- | ---- | ------- | ----------- | `mode` | `string` | `'nearest'` | Sets which elements appear in the interaction. See [Interaction Modes](#modes) for details. | `intersect` | `boolean` | `true` | if true, the inte...
true
Other
chartjs
Chart.js
7784fbfded3c01b61bb553b7fc769c12e6513884.json
Support "r" axis for non-intersecting interaction (#9919) * Support "r" axis for non-intersecting interaction * Extract some interaction functionality * Remove whitespace and semicolons * WIP: add interaction test * Update documentation * Fix test * Add another test * Update axis params * Add a...
src/core/core.interaction.js
@@ -1,6 +1,7 @@ import {_isPointInArea} from '../helpers/helpers.canvas'; import {_lookupByKey, _rlookupByKey} from '../helpers/helpers.collection'; import {getRelativePosition as helpersGetRelativePosition} from '../helpers/helpers.dom'; +import {_angleBetween, getAngleFromPoint} from '../helpers/helpers.math'; ...
true
Other
chartjs
Chart.js
7784fbfded3c01b61bb553b7fc769c12e6513884.json
Support "r" axis for non-intersecting interaction (#9919) * Support "r" axis for non-intersecting interaction * Extract some interaction functionality * Remove whitespace and semicolons * WIP: add interaction test * Update documentation * Fix test * Add another test * Update axis params * Add a...
test/specs/core.interaction.tests.js
@@ -325,7 +325,7 @@ describe('Core.Interaction', function() { describe('nearest mode', function() { describe('intersect: false', function() { beforeEach(function() { - this.chart = window.acquireChart({ + this.lineChart = window.acquireChart({ type: 'line', data: { ...
true
Other
chartjs
Chart.js
7784fbfded3c01b61bb553b7fc769c12e6513884.json
Support "r" axis for non-intersecting interaction (#9919) * Support "r" axis for non-intersecting interaction * Extract some interaction functionality * Remove whitespace and semicolons * WIP: add interaction test * Update documentation * Fix test * Add another test * Update axis params * Add a...
types/index.esm.d.ts
@@ -1391,9 +1391,9 @@ export interface CoreInteractionOptions { intersect: boolean; /** - * Can be set to 'x', 'y', or 'xy' to define which directions are used in calculating distances. Defaults to 'x' for 'index' mode and 'xy' in dataset and 'nearest' modes. + * Can be set to 'x', 'y', 'xy' or 'r' to defin...
true
Other
chartjs
Chart.js
42e85942a852d3082907e0a8eafb75d3b15e554a.json
Add notes about more specific options for axes (#9923)
docs/axes/cartesian/index.md
@@ -192,6 +192,10 @@ module.exports = { ## Common Configuration +:::tip Note +These are only the common options supported by all cartesian axes. Please see the specific axis documentation for all the available options for that axis. +::: + !!!include(axes/cartesian/_common.md)!!! !!!include(axes/_common.md)!!!...
true
Other
chartjs
Chart.js
42e85942a852d3082907e0a8eafb75d3b15e554a.json
Add notes about more specific options for axes (#9923)
docs/axes/index.md
@@ -93,10 +93,18 @@ let chart = new Chart(ctx, { ## Common Configuration +:::tip Note +These are only the common options supported by all axes. Please see specific axis documentation for all of the available options for that axis. +::: + !!!include(axes/_common.md)!!! ## Tick Configuration +:::tip Note +Thes...
true
Other
chartjs
Chart.js
5e5339d01ce0c5b6a28e96624e0d81b71d459d72.json
Update stale documentation for axis titles (#9683) * Update stale documentation for axis titles (#9682) Updated the documentation for the types on axis labels. In the corresponding `index.esm.d.ts` file, put JSDoc descriptions for the properties to match the now-updated documentation. * Clean up axis title l...
docs/axes/labelling.md
@@ -13,7 +13,7 @@ Namespace: `options.scales[scaleId].title`, it defines options for the scale tit | `text` | `string`\|`string[]` | `''` | The text for the title. (i.e. "# of People" or "Response Choices"). | `color` | [`Color`](../general/colors.md) | `Chart.defaults.color` | Color of label. | `font` | `Font` | `C...
true
Other
chartjs
Chart.js
5e5339d01ce0c5b6a28e96624e0d81b71d459d72.json
Update stale documentation for axis titles (#9683) * Update stale documentation for axis titles (#9682) Updated the documentation for the types on axis labels. In the corresponding `index.esm.d.ts` file, put JSDoc descriptions for the properties to match the now-updated documentation. * Clean up axis title l...
types/index.esm.d.ts
@@ -2937,15 +2937,26 @@ export interface CartesianScaleOptions extends CoreScaleOptions { grid: GridLineOptions; + /** Options for the scale title. */ title: { + /** If true, displays the axis title. */ display: boolean; + /** Alignment of the axis title. */ align: 'start' | 'center' | 'end';...
true
Other
chartjs
Chart.js
bccb1276f023448e2539a49c879c7a97bd83f763.json
Detect detach/attach in same observation (#9876) * Detect detach/attach in same observation * Missing `!`, better tests * reduce duplication
src/platform/platform.dom.js
@@ -114,15 +114,24 @@ function fromNativeEvent(event, chart) { }; } +function nodeListContains(nodeList, canvas) { + for (const node of nodeList) { + if (node === canvas || node.contains(canvas)) { + return true; + } + } +} + function createAttachObserver(chart, type, listener) { const canvas = c...
true
Other
chartjs
Chart.js
bccb1276f023448e2539a49c879c7a97bd83f763.json
Detect detach/attach in same observation (#9876) * Detect detach/attach in same observation * Missing `!`, better tests * reduce duplication
test/specs/core.controller.tests.js
@@ -1078,6 +1078,108 @@ describe('Chart', function() { }, 0); }); + // https://github.com/chartjs/Chart.js/issues/9875 + it('should detect detach/attach in series', function(done) { + var chart = acquireChart({ + options: { + responsive: true, + maintainAspectRatio: fal...
true
Other
chartjs
Chart.js
1107073a9802fd8893e2ee3fa369c5d65beabb48.json
Fix a typo in index.md (#9900) Fix a typo
docs/developers/index.md
@@ -43,7 +43,7 @@ Version 3 has a largely different API than earlier versions. Most earlier version options have current equivalents or are the same. -Please note - documentation for previous versions are available online or in the GitHub repo. +Please note - documentation for previous versions is available online...
false
Other
chartjs
Chart.js
51762aece5a08f8961989c367a87be2ff2a52174.json
docs: Add a link to front-end integrations (#9866)
docs/index.md
@@ -6,6 +6,8 @@ You can get the latest version of Chart.js from [npm](https://npmjs.com/package/chart.js), the [GitHub releases](https://github.com/chartjs/Chart.js/releases/latest), or use a [Chart.js CDN](https://www.jsdelivr.com/package/npm/chart.js). Detailed installation instructions can be found on the [instal...
false
Other
chartjs
Chart.js
838d40b2c832e8ae1a8caeeba508714d7b647581.json
Synchronize data visibility with data changes (#9857) * Synchronize data visibility with data changes * avoid babel spread bug * Simpler? * one more * simple enough, cc?
src/core/core.controller.js
@@ -69,6 +69,21 @@ const getChart = (key) => { return Object.values(instances).filter((c) => c.canvas === canvas).pop(); }; +function moveNumericKeys(obj, start, move) { + const keys = Object.keys(obj); + for (const key of keys) { + const intKey = +key; + if (intKey >= start) { + const value = obj[ke...
true
Other
chartjs
Chart.js
838d40b2c832e8ae1a8caeeba508714d7b647581.json
Synchronize data visibility with data changes (#9857) * Synchronize data visibility with data changes * avoid babel spread bug * Simpler? * one more * simple enough, cc?
src/core/core.datasetController.js
@@ -982,16 +982,19 @@ export default class DatasetController { meta.data.splice(start, count); } + /** + * @private + */ _sync(args) { if (this._parsing) { this._syncList.push(args); } else { const [method, arg1, arg2] = args; this[method](arg1, arg2); } + this.ch...
true
Other
chartjs
Chart.js
838d40b2c832e8ae1a8caeeba508714d7b647581.json
Synchronize data visibility with data changes (#9857) * Synchronize data visibility with data changes * avoid babel spread bug * Simpler? * one more * simple enough, cc?
test/specs/core.controller.tests.js
@@ -1966,6 +1966,99 @@ describe('Chart', function() { chart.update(); expect(chart.getDataVisibility(1)).toBe(false); }); + + it('should maintain data visibility indices when data changes', function() { + var chart = acquireChart({ + type: 'pie', + data: { + labels: ['0...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
src/elements/element.arc.js
@@ -1,6 +1,6 @@ import Element from '../core/core.element'; -import {_angleBetween, getAngleFromPoint, TAU, HALF_PI} from '../helpers/index'; -import {PI, _limitValue} from '../helpers/helpers.math'; +import {_angleBetween, getAngleFromPoint, TAU, HALF_PI, valueOrDefault} from '../helpers/index'; +import {PI, _isBetwe...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
src/elements/element.bar.js
@@ -1,5 +1,5 @@ import Element from '../core/core.element'; -import {isObject, _limitValue} from '../helpers'; +import {isObject, _isBetween, _limitValue} from '../helpers'; import {addRoundedRectPath} from '../helpers/helpers.canvas'; import {toTRBL, toTRBLCorners} from '../helpers/helpers.options'; @@ -105,8 +10...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
src/helpers/helpers.math.js
@@ -173,6 +173,21 @@ export function _limitValue(value, min, max) { return Math.max(min, Math.min(max, value)); } +/** + * @param {number} value + * @private + */ export function _int16Range(value) { return _limitValue(value, -32768, 32767); } + +/** + * @param {number} value + * @param {number} start + * @p...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
src/helpers/helpers.segment.js
@@ -1,4 +1,4 @@ -import {_angleBetween, _angleDiff, _normalizeAngle} from './helpers.math'; +import {_angleBetween, _angleDiff, _isBetween, _normalizeAngle} from './helpers.math'; import {createContext} from './helpers.options'; /** @@ -16,7 +16,7 @@ function propertyFn(property) { }; } return { - bet...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
src/plugins/plugin.filler.js
@@ -8,7 +8,7 @@ import LineElement from '../elements/element.line'; import {_boundSegment, _boundSegments} from '../helpers/helpers.segment'; import {clipArea, unclipArea} from '../helpers/helpers.canvas'; import {isArray, isFinite, isObject, valueOrDefault} from '../helpers/helpers.core'; -import {TAU, _normalizeAn...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
src/plugins/plugin.legend.js
@@ -5,7 +5,7 @@ import {addRoundedRectPath, drawPoint, renderText} from '../helpers/helpers.canv import { callback as call, valueOrDefault, toFont, toPadding, getRtlAdapter, overrideTextDirection, restoreTextDirection, - clipArea, unclipArea + clipArea, unclipArea, _isBetween } from '../helpers/index'; impor...
true
Other
chartjs
Chart.js
0c5db4973e29d3f77f8bf45bbee8170a86608ed1.json
Fix inRange for full circle arc (#9871) * Update misleading sample comment * Fix inRange for full circle arc
test/specs/element.arc.tests.js
@@ -23,6 +23,39 @@ describe('Arc element tests', function() { expect(arc.inRange(-1.0 * Math.sqrt(7), Math.sqrt(7))).toBe(false); }); + it ('should determine if in range when full circle', function() { + // Mock out the arc as if the controller put it there + var arc = new Chart.elements.ArcElement({ +...
true
Other
chartjs
Chart.js
c8b885dd3e35632df407df4bd463d9a5cc90280b.json
Prevent proxying CanvasGradient in Node platform (#9861)
src/helpers/helpers.config.js
@@ -178,7 +178,8 @@ export function _descriptors(proxy, defaults = {scriptable: true, indexable: tru } const readKey = (prefix, name) => prefix ? prefix + _capitalize(name) : name; -const needsSubResolver = (prop, value) => isObject(value) && prop !== 'adapters'; +const needsSubResolver = (prop, value) => isObject(...
true
Other
chartjs
Chart.js
c8b885dd3e35632df407df4bd463d9a5cc90280b.json
Prevent proxying CanvasGradient in Node platform (#9861)
test/specs/helpers.config.tests.js
@@ -752,6 +752,29 @@ describe('Chart.helpers.config', function() { expect(fn()).toEqual('ok'); }); + it('should not create proxy for objects with custom constructor', function() { + class MyClass { + constructor() { + this.string = 'test string'; + } + method(arg) { +...
true
Other
chartjs
Chart.js
359d1716834d3454ada84c5e7128c1d9b813a70c.json
update animation event to include inital variable (#9834)
types/animation.d.ts
@@ -12,6 +12,7 @@ export class Animation { export interface AnimationEvent { chart: Chart; numSteps: number; + initial: boolean; currentState: number; }
false
Other
chartjs
Chart.js
7966227df36fdb3a79f35ac238ea8b5c84b3f3a8.json
Pass number format to tooltip (#9831)
src/scales/scale.linearbase.js
@@ -312,6 +312,6 @@ export default class LinearScaleBase extends Scale { } getLabelForValue(value) { - return formatNumber(value, this.chart.options.locale); + return formatNumber(value, this.chart.options.locale, this.options.ticks.format); } }
true
Other
chartjs
Chart.js
7966227df36fdb3a79f35ac238ea8b5c84b3f3a8.json
Pass number format to tooltip (#9831)
src/scales/scale.logarithmic.js
@@ -146,7 +146,9 @@ export default class LogarithmicScale extends Scale { * @return {string} */ getLabelForValue(value) { - return value === undefined ? '0' : formatNumber(value, this.chart.options.locale); + return value === undefined + ? '0' + : formatNumber(value, this.chart.options.locale, ...
true
Other
chartjs
Chart.js
6961bd6baf49df8bcd5f0614a1ffb80808db6ef5.json
Use const/let in time scale (#6806)
src/scales/scale.time.js
@@ -65,9 +65,9 @@ function sorter(a, b) { } function arrayUnique(items) { - var hash = {}; - var out = []; - var i, ilen, item; + const hash = {}; + const out = []; + let i, ilen, item; for (i = 0, ilen = items.length; i < ilen; ++i) { item = items[i]; @@ -103,9 +103,9 @@ function buildLookupTable(timestamps...
false
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
.eslintrc.yml
@@ -5,7 +5,7 @@ env: node: true parserOptions: - ecmaVersion: 6 + ecmaVersion: 2018 sourceType: 'module' plugins: ['html']
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/helpers.canvas.js
@@ -10,193 +10,191 @@ const TWO_THIRDS_PI = PI * 2 / 3; /** * @namespace Chart.helpers.canvas */ -module.exports = { - /** - * Returns the aligned pixel value to avoid anti-aliasing blur - * @param {Chart} chart - The chart instance. - * @param {number} pixel - A pixel value. - * @param {number} width - The wi...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/helpers.core.js
@@ -3,342 +3,343 @@ /** * @namespace Chart.helpers */ -var helpers = { - /** - * An empty function that can be used, for example, for optional callback. - */ - noop: function() {}, - - /** - * Returns a unique id, sequentially generated from a global variable. - * @returns {number} - * @function - */ - uid: ...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/helpers.easing.js
@@ -5,7 +5,7 @@ * @namespace Chart.helpers.easing.effects * @see http://www.robertpenner.com/easing/ */ -var effects = { +export const effects = { linear: function(t) { return t; }, @@ -231,7 +231,3 @@ var effects = { return effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5; } }; - -module.exports = { - e...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/helpers.math.js
@@ -4,41 +4,37 @@ * @alias Chart.helpers.math * @namespace */ -var exports = { - /** - * Returns an array of factors sorted from 1 to sqrt(value) - * @private - */ - _factorize: function(value) { - var result = []; - var sqrt = Math.sqrt(value); - var i; +/** + * Returns an array of factors sorted from 1 to...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/helpers.options.js
@@ -1,9 +1,7 @@ 'use strict'; -var defaults = require('../core/core.defaults'); -var helpers = require('./helpers.core'); - -var valueOrDefault = helpers.valueOrDefault; +import defaults from '../core/core.defaults'; +import {isNullOrUndef, isArray, isObject, valueOrDefault} from './helpers.core'; /** * Convert...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/helpers.rtl.js
@@ -42,11 +42,11 @@ var getLtrAdapter = function() { }; }; -var getAdapter = function(rtl, rectX, width) { +const getAdapter = function(rtl, rectX, width) { return rtl ? getRtlAdapter(rectX, width) : getLtrAdapter(); }; -var overrideTextDirection = function(ctx, direction) { +const overrideTextDirection = fun...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
src/helpers/index.js
@@ -1,8 +1,17 @@ 'use strict'; -module.exports = require('./helpers.core'); -module.exports.easing = require('./helpers.easing'); -module.exports.canvas = require('./helpers.canvas'); -module.exports.options = require('./helpers.options'); -module.exports.math = require('./helpers.math'); -module.exports.rtl = requi...
true
Other
chartjs
Chart.js
5a99dff5f7eeaa3c59ae9c473ccbe6738f289593.json
Convert src/helpers to use ES6 exports (#6797) * Canvas helpers exported * Easing helpers use exports * Math helper uses export * Linting * RTL options use export * Allow object spread operator * Rest of helpers use `export`
test/specs/global.namespace.tests.js
@@ -37,10 +37,5 @@ describe('Chart namespace', function() { it('should be an object', function() { expect(Chart.helpers instanceof Object).toBeTruthy(); }); - it('should contains "helpers" namespaces', function() { - expect(Chart.helpers.easing instanceof Object).toBeTruthy(); - expect(Chart.helpers.canv...
true
Other
chartjs
Chart.js
1f3cf3c28d85b650d7b74022871e2a141c3fc3fb.json
Remove createElement and pre-allocate arrays (#6788) * Remove createElement and pre-allocate arrays * Address review comment
docs/getting-started/v3-migration.md
@@ -70,6 +70,8 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released * `Chart.chart.chart` * `Chart.types` * `DatasetController.addElementAndReset` +* `DatasetController.createMetaData` +* `DatasetController.createMetaDataset` * `Element.getArea` * `Element.height` * `Element.initiali...
true
Other
chartjs
Chart.js
1f3cf3c28d85b650d7b74022871e2a141c3fc3fb.json
Remove createElement and pre-allocate arrays (#6788) * Remove createElement and pre-allocate arrays * Address review comment
src/core/core.datasetController.js
@@ -153,15 +153,15 @@ function applyStack(stack, value, dsIndex, allOther) { } function convertObjectDataToArray(data) { - var keys = Object.keys(data); - var adata = []; - var i, ilen, key; + const keys = Object.keys(data); + const adata = new Array(keys.length); + let i, ilen, key; for (i = 0, ilen = keys.lengt...
true
Other
chartjs
Chart.js
090b5aee1fdd866d0ebd5f687a9afe8259c03fa5.json
Improve autoSkip performance (#6783) * Improve autoSkip performance * Maintain tick ordering
src/core/core.scale.js
@@ -212,18 +212,6 @@ function parseTickFontOptions(options) { return {minor: minor, major: major}; } -function nonSkipped(ticksToFilter) { - var filtered = []; - var item, index, len; - for (index = 0, len = ticksToFilter.length; index < len; ++index) { - item = ticksToFilter[index]; - if (typeof item._index !==...
false
Other
chartjs
Chart.js
d5393003acb19164d6112e5c4745c37e6a9ee7be.json
Add min/max to performance documentation (#6785) * Add min/max to performance documentation * Review1 * Review2
docs/general/performance.md
@@ -34,6 +34,31 @@ new Chart(ctx, { }); ``` +## Specify `min` and `max` for scales + +If you specify the `min` and `max`, the scale does not have to compute the range from the data. + +```javascript +new Chart(ctx, { + type: 'line', + data: data, + options: { + scales: { + x: { + ...
false
Other
chartjs
Chart.js
5eed101a53c424e9c37debd8669d4cadb495448e.json
Use correct dataset index in parseVisibleItems (#6786) * Use correct dataset index * Review1
src/core/core.interaction.js
@@ -25,15 +25,15 @@ function getRelativePosition(e, chart) { * @param {function} handler - the callback to execute for each visible item */ function parseVisibleItems(chart, handler) { - var metasets = chart._getSortedVisibleDatasetMetas(); - var metadata, i, j, ilen, jlen, element; + const metasets = chart._getSo...
false
Other
chartjs
Chart.js
e6cf2fe8b80bd6cc00d20a4047afc3ac4d809e68.json
Fix broken tests (#6780)
test/fixtures/plugin.filler/fill-line-boundary-origin-span-dual.json
@@ -23,12 +23,12 @@ "legend": false, "title": false, "scales": { - "xAxes": [{ + "x": { "display": false - }], - "yAxes": [{ + }, + "y": { "display":...
true
Other
chartjs
Chart.js
e6cf2fe8b80bd6cc00d20a4047afc3ac4d809e68.json
Fix broken tests (#6780)
test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.json
@@ -23,12 +23,12 @@ "legend": false, "title": false, "scales": { - "xAxes": [{ + "x": { "display": false - }], - "yAxes": [{ + }, + "y": { "display":...
true
Other
chartjs
Chart.js
e6cf2fe8b80bd6cc00d20a4047afc3ac4d809e68.json
Fix broken tests (#6780)
test/fixtures/plugin.filler/fill-line-dataset-dual.json
@@ -21,12 +21,12 @@ "legend": false, "title": false, "scales": { - "xAxes": [{ + "x": { "display": false - }], - "yAxes": [{ + }, + "y": { "display":...
true
Other
chartjs
Chart.js
e6cf2fe8b80bd6cc00d20a4047afc3ac4d809e68.json
Fix broken tests (#6780)
test/fixtures/plugin.filler/fill-line-dataset-span-dual.json
@@ -43,12 +43,12 @@ "legend": false, "title": false, "scales": { - "xAxes": [{ + "x": { "display": false - }], - "yAxes": [{ + }, + "y": { "display":...
true
Other
chartjs
Chart.js
e6cf2fe8b80bd6cc00d20a4047afc3ac4d809e68.json
Fix broken tests (#6780)
test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.json
@@ -39,12 +39,12 @@ "legend": false, "title": false, "scales": { - "xAxes": [{ + "x": { "display": false - }], - "yAxes": [{ + }, + "y": { "display":...
true
Other
chartjs
Chart.js
e6cf2fe8b80bd6cc00d20a4047afc3ac4d809e68.json
Fix broken tests (#6780)
test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.json
@@ -39,12 +39,12 @@ "legend": false, "title": false, "scales": { - "xAxes": [{ + "x": { "display": false - }], - "yAxes": [{ + }, + "y": { "display":...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/README.md
@@ -43,9 +43,9 @@ var myChart = new Chart(ctx, { }, options: { scales: { - yAxes: [{ + y: { beginAtZero: true - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/axes/cartesian/README.md
@@ -38,7 +38,8 @@ The following options are common to all cartesian axes but do not apply to other | `padding` | `number` | `0` | Padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies in the vertical (Y) direc...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/axes/cartesian/category.md
@@ -25,10 +25,10 @@ let chart = new Chart(ctx, { data: ... options: { scales: { - xAxes: [{ + x: { type: 'category', labels: ['January', 'February', 'March', 'April', 'May', 'June'] - }] + } } } }); @@ -58,9 ...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/axes/cartesian/linear.md
@@ -45,10 +45,10 @@ let chart = new Chart(ctx, { }, options: { scales: { - yAxes: [{ + y: { suggestedMin: 50, suggestedMax: 100 - }] + } } } }); @@ -65,13 +65,13 @@ This example sets up a chart with a y axis ...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/axes/cartesian/time.md
@@ -67,18 +67,19 @@ var chart = new Chart(ctx, { data: data, options: { scales: { - xAxes: [{ + x: { type: 'time', time: { unit: 'month' } - }] + } } } }); ``` ### Di...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/axes/labelling.md
@@ -31,14 +31,14 @@ var chart = new Chart(ctx, { data: data, options: { scales: { - yAxes: [{ + y: { ticks: { // Include a dollar sign in the ticks callback: function(value, index, values) { retu...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/charts/bar.md
@@ -41,9 +41,9 @@ A bar chart provides a way of showing data values represented as vertical bars. }, "options": { "scales": { - "yAxes": [{ + "y": { "beginAtZero": true - }] + } } } } @@ -160,14 +160,17 @@ data: { }] };...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/charts/line.md
@@ -211,9 +211,9 @@ var stackedLine = new Chart(ctx, { data: data, options: { scales: { - yAxes: [{ + y: { stacked: true - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/charts/mixed.md
@@ -61,9 +61,9 @@ At this point we have a chart rendering how we'd like. It's important to note th }, "options": { "scales": { - "yAxes": [{ + "y": { "beginAtZero": true - }] + } } } }
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/charts/scatter.md
@@ -22,10 +22,10 @@ var scatterChart = new Chart(ctx, { }, options: { scales: { - xAxes: [{ + x: { type: 'linear', position: 'bottom' - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/developers/axes.md
@@ -24,9 +24,9 @@ var lineChart = new Chart(ctx, { type: 'line', options: { scales: { - yAxes: [{ + y: { type: 'myScale' // this is the same key that was passed to the registerScaleType function - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/developers/updates.md
@@ -45,12 +45,12 @@ function updateConfigAsNewObject(chart) { text: 'Chart.js' }, scales: { - xAxes: [{ + x: { display: true - }], - yAxes: [{ + }, + y: { display: true - }] + ...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/getting-started/usage.md
@@ -53,9 +53,9 @@ var myChart = new Chart(ctx, { }, options: { scales: { - yAxes: [{ + y: { beginAtZero: true - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
docs/getting-started/v3-migration.md
@@ -33,20 +33,21 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released ### Options * The dataset option `tension` was renamed to `lineTension` +* `scales.[x/y]Axes` arrays were removed. Scales are now configured directly to `options.scales` object with the object key being the scale Id....
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/area/line-boundaries.html
@@ -59,12 +59,12 @@ } }, scales: { - xAxes: [{ + x: { ticks: { autoSkip: false, maxRotation: 0 } - }] + } } };
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/area/line-datasets.html
@@ -114,9 +114,9 @@ } }, scales: { - yAxes: [{ - stacked: true - }] + y: { + stacked: true, + } }, plugins: { filler: {
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/area/line-stacked.html
@@ -98,19 +98,19 @@ mode: 'index' }, scales: { - xAxes: [{ + x: { scaleLabel: { display: true, labelString: 'Month' } - }], - yAxes: [{ + }, + y: { stacked: true, scaleLabel: { display: true, labelString: 'Value' ...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/bar/multi-axis.html
@@ -33,7 +33,7 @@ window.chartColors.purple, window.chartColors.red ], - yAxisID: 'y-axis-1', + yAxisID: 'y', data: [ randomScalingFactor(), randomScalingFactor(), @@ -46,7 +46,7 @@ }, { label: 'Dataset 2', backgroundColor: window.chartColors.grey, - yAxisID: 'y-...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/bar/stacked-group.html
@@ -80,12 +80,12 @@ }, responsive: true, scales: { - xAxes: [{ + x: { stacked: true, - }], - yAxes: [{ + }, + y: { stacked: true - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/bar/stacked.html
@@ -77,12 +77,12 @@ }, responsive: true, scales: { - xAxes: [{ + x: { stacked: true, - }], - yAxes: [{ + }, + y: { stacked: true - }] + } } } });
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/line/basic.html
@@ -76,20 +76,20 @@ intersect: true }, scales: { - xAxes: [{ + x: { display: true, scaleLabel: { display: true, labelString: 'Month' } - }], - yAxes: [{ + }, + y: { display: true, scaleLabel: { display: true, labe...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/line/interpolation-modes.html
@@ -64,21 +64,21 @@ mode: 'index' }, scales: { - xAxes: [{ + x: { display: true, scaleLabel: { display: true } - }], - yAxes: [{ + }, + y: { display: true, scaleLabel: { display: true, labelString: 'Value' }, ...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/line/line-styles.html
@@ -83,20 +83,20 @@ intersect: true }, scales: { - xAxes: [{ + x: { display: true, scaleLabel: { display: true, labelString: 'Month' } - }], - yAxes: [{ + }, + y: { display: true, scaleLabel: { display: true, labe...
true
Other
chartjs
Chart.js
ce74eb76a1ad29c0ccaeb8cf3e606d82e38f2ac7.json
Convert axis options from arrays to objects (#6773) * Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defau...
samples/charts/line/multi-axis.html
@@ -36,7 +36,7 @@ randomScalingFactor(), randomScalingFactor() ], - yAxisID: 'y-axis-1', + yAxisID: 'y', }, { label: 'My Second dataset', borderColor: window.chartColors.blue, @@ -51,7 +51,7 @@ randomScalingFactor(), randomScalingFactor() ], - yAxisID: 'y-axis-2'...
true