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 | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/core/core.datasetController.js | @@ -2,7 +2,7 @@ import Animations from './core.animations';
import defaults from './core.defaults';
import {isArray, isFinite, isObject, valueOrDefault, resolveObjectKey, defined} from '../helpers/helpers.core';
import {listenArrayEvents, unlistenArrayEvents} from '../helpers/helpers.collection';
-import {sign} from... | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/core/core.scale.js | @@ -3,7 +3,7 @@ import {_alignPixel, _measureText, renderText, clipArea, unclipArea} from '../he
import {callback as call, each, finiteOrDefault, isArray, isFinite, isNullOrUndef, isObject, valueOrDefault} from '../helpers/helpers.core';
import {toDegrees, toRadians, _int16Range, _limitValue, HALF_PI} from '../helper... | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/elements/element.line.js | @@ -244,6 +244,7 @@ export default class LineElement extends Element {
this.animated = true;
this.options = undefined;
+ this._chart = undefined;
this._loop = undefined;
this._fullLoop = undefined;
this._path = undefined; | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/helpers/helpers.options.js | @@ -184,3 +184,13 @@ export function _addGrace(minmax, grace, beginAtZero) {
max: keepZero(max, change)
};
}
+
+/**
+ * Create a context inheriting parentContext
+ * @param {object|null} parentContext
+ * @param {object} context
+ * @returns {object}
+ */
+export function createContext(parentContext, context) ... | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/helpers/helpers.segment.js | @@ -1,4 +1,5 @@
import {_angleBetween, _angleDiff, _normalizeAngle} from './helpers.math';
+import {createContext} from './helpers.options';
/**
* @typedef { import("../elements/element.line").default } LineElement
@@ -275,6 +276,7 @@ function splitByStyles(line, segments, points, segmentOptions) {
* @return {S... | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/plugins/plugin.tooltip.js | @@ -5,7 +5,7 @@ import {each, noop, isNullOrUndef, isArray, _elementsEqual} from '../helpers/hel
import {toFont, toPadding, toTRBLCorners} from '../helpers/helpers.options';
import {getRtlAdapter, overrideTextDirection, restoreTextDirection} from '../helpers/helpers.rtl';
import {distanceBetweenPoints, _limitValue} ... | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | src/scales/scale.radialLinear.js | @@ -4,7 +4,7 @@ import {HALF_PI, isNumber, TAU, toDegrees, toRadians, _normalizeAngle} from '../
import LinearScaleBase from './scale.linearbase';
import Ticks from '../core/core.ticks';
import {valueOrDefault, isArray, isFinite, callback as callCallback, isNullOrUndef} from '../helpers/helpers.core';
-import {toFon... | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | types/helpers/helpers.options.d.ts | @@ -52,3 +52,10 @@ export function resolve<T, C>(
index?: number,
info?: { cacheable?: boolean }
): T | undefined;
+
+
+/**
+ * Create a context inheriting parentContext
+ * @since 3.6.0
+ */
+export function createContext<P, T>(parentContext: P, context: T): P extends null ? T : P & T; | true |
Other | chartjs | Chart.js | 6a250de81dd0ebcd66014911460d3076d41e8737.json | Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context
* Types | types/tests/helpers/options.ts | @@ -0,0 +1,10 @@
+import { createContext } from '../../helpers/helpers.options';
+
+const context1 = createContext(null, { type: 'test1', parent: true });
+const context2 = createContext(context1, { type: 'test2' });
+
+const sSest: string = context1.type + context2.type;
+const bTest: boolean = context1.parent && cont... | true |
Other | chartjs | Chart.js | 7993fc95dcea17edf1050283580078423d63a82d.json | Types: Move tooltip methods to model from plugin (#9729) | types/index.esm.d.ts | @@ -2427,15 +2427,15 @@ export interface TooltipModel<TType extends ChartType> {
// tooltip options
options: TooltipOptions<TType>;
+
+ getActiveElements(): ActiveElement[];
+ setActiveElements(active: ActiveDataPoint[], eventPosition: { x: number, y: number }): void;
}
export const Tooltip: Plugin & {
... | true |
Other | chartjs | Chart.js | 7993fc95dcea17edf1050283580078423d63a82d.json | Types: Move tooltip methods to model from plugin (#9729) | types/tests/plugins/plugin.tooltip/chart.tooltip.ts | @@ -11,3 +11,5 @@ const chart = new Chart('id', {
});
const tooltip = chart.tooltip;
+
+const active = tooltip && tooltip.getActiveElements(); | true |
Other | chartjs | Chart.js | 28de4b00dcea3fc54366e0e12ea4b2e9a0c0cb43.json | docs: fix small error (#9724) | docs/general/options.md | @@ -32,7 +32,7 @@ Options are resolved from top to bottom, using a context dependent route.
### Dataset element level options
-Each scope is looked up with `elementType` prefix in the option name first, then wihtout the prefix. For example, `radius` for `point` element is looked up using `pointRadius` and if that ... | false |
Other | chartjs | Chart.js | 990a2890d5d04a82bff329a263ac0231585ddb25.json | Fix some typings issues (#9680)
* Types: Add scope to ticks.callback
* Fix some typings issues | docs/samples/advanced/linear-gradient.md | @@ -47,7 +47,7 @@ let width, height, gradient;
function getGradient(ctx, chartArea) {
const chartWidth = chartArea.right - chartArea.left;
const chartHeight = chartArea.bottom - chartArea.top;
- if (gradient === null || width !== chartWidth || height !== chartHeight) {
+ if (!gradient || width !== chartWidth |... | true |
Other | chartjs | Chart.js | 990a2890d5d04a82bff329a263ac0231585ddb25.json | Fix some typings issues (#9680)
* Types: Add scope to ticks.callback
* Fix some typings issues | docs/samples/advanced/radial-gradient.md | @@ -30,7 +30,7 @@ function createRadialGradient3(context, c1, c2, c3) {
const chartArea = context.chart.chartArea;
if (!chartArea) {
// This case happens on initial chart load
- return null;
+ return;
}
const chartWidth = chartArea.right - chartArea.left; | true |
Other | chartjs | Chart.js | 990a2890d5d04a82bff329a263ac0231585ddb25.json | Fix some typings issues (#9680)
* Types: Add scope to ticks.callback
* Fix some typings issues | types/index.esm.d.ts | @@ -34,7 +34,7 @@ export interface ScriptableLineSegmentContext {
datasetIndex: number
}
-export type Scriptable<T, TContext> = T | ((ctx: TContext, options: AnyObject) => T);
+export type Scriptable<T, TContext> = T | ((ctx: TContext, options: AnyObject) => T | undefined);
export type ScriptableOptions<T, TCont... | true |
Other | chartjs | Chart.js | 990a2890d5d04a82bff329a263ac0231585ddb25.json | Fix some typings issues (#9680)
* Types: Add scope to ticks.callback
* Fix some typings issues | types/tests/scales/options.ts | @@ -26,6 +26,14 @@ const chart = new Chart('test', {
// @ts-expect-error Type 'string' is not assignable to type 'false | "millisecond" | "second" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "year" | undefined'.
unit: 'year'
}
+ },
+ y: {
+ ticks: {
+ ... | true |
Other | chartjs | Chart.js | 990a2890d5d04a82bff329a263ac0231585ddb25.json | Fix some typings issues (#9680)
* Types: Add scope to ticks.callback
* Fix some typings issues | types/tests/scriptable_core_chart_options.ts | @@ -0,0 +1,15 @@
+import { ChartConfiguration } from '../index.esm';
+
+const getConfig = (): ChartConfiguration<'bar'> => {
+ return {
+ type: 'bar',
+ data: {
+ datasets: []
+ },
+ options: {
+ backgroundColor: (context) => context.active ? '#fff' : undefined,
+ font: (context) => context.... | true |
Other | chartjs | Chart.js | 5587738fa4cf86bcd89de09da04a5d245a092bef.json | Add sanity check for stepSize (#9679) | src/scales/scale.linearbase.js | @@ -222,6 +222,10 @@ export default class LinearScaleBase extends Scale {
if (stepSize) {
maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;
+ if (maxTicks > 1000) {
+ console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxT... | true |
Other | chartjs | Chart.js | 5587738fa4cf86bcd89de09da04a5d245a092bef.json | Add sanity check for stepSize (#9679) | test/specs/scale.linear.tests.js | @@ -639,6 +639,29 @@ describe('Linear Scale', function() {
expect(getLabels(chart.scales.y)).toEqual(['1', '3', '5', '7', '9', '11']);
});
+ it('Should not generate insane amounts of ticks with small stepSize and large range', function() {
+ var chart = window.acquireChart({
+ type: 'bar',
+ opt... | true |
Other | chartjs | Chart.js | 0e64e53a59df1e0ba8ab6bd429334badb0a2afbc.json | Add align to interface of scale title config (#9634) | types/index.esm.d.ts | @@ -2905,6 +2905,7 @@ export interface CartesianScaleOptions extends CoreScaleOptions {
title: {
display: boolean;
+ align: 'start' | 'center' | 'end';
text: string | string[];
color: Color;
font: FontSpec; | false |
Other | chartjs | Chart.js | 3f23aaba9a18c6ff70eee9ec1ce51cc4b6e62634.json | Add sanity checks for scale options (#9624) | src/core/core.config.js | @@ -48,6 +48,12 @@ function mergeScaleConfig(config, options) {
// First figure out first scale id's per axis.
Object.keys(configScales).forEach(id => {
const scaleConf = configScales[id];
+ if (!isObject(scaleConf)) {
+ return console.error(`Invalid scale configuration for scale: ${id}`);
+ }
+ ... | true |
Other | chartjs | Chart.js | 3f23aaba9a18c6ff70eee9ec1ce51cc4b6e62634.json | Add sanity checks for scale options (#9624) | test/specs/core.controller.tests.js | @@ -498,6 +498,49 @@ describe('Chart', function() {
expect(Chart.defaults.scales.linear._jasmineCheck).not.toBeDefined();
expect(Chart.defaults.scales.category._jasmineCheck).not.toBeDefined();
});
+
+ it('should ignore proxy passed as scale options', function() {
+ let failure = false;
+ ... | true |
Other | chartjs | Chart.js | 6c47a984b0b417e793ed3ef3e0dd7ca36e6eed4c.json | Remove offscreen canvas (#9617) | types/index.esm.d.ts | @@ -537,11 +537,9 @@ export const registerables: readonly ChartComponentLike[];
export declare type ChartItem =
| string
| CanvasRenderingContext2D
- | OffscreenCanvasRenderingContext2D
| HTMLCanvasElement
- | OffscreenCanvas
- | { canvas: HTMLCanvasElement | OffscreenCanvas }
- | ArrayLike<CanvasRenderin... | false |
Other | chartjs | Chart.js | eb1e82c9813fbfccd86f4e4b424e768332654bd9.json | Update old codepen links to ones for v3 (#9619) | .github/ISSUE_TEMPLATE/DOCS.md | @@ -21,5 +21,5 @@ Documentation Is:
### Example
<!--
Provide a link to a live example demonstrating the issue or feature to be documented:
- https://codepen.io/pen?template=JXVYzq
+ https://codepen.io/pen?template=wvezeOq
--> | true |
Other | chartjs | Chart.js | eb1e82c9813fbfccd86f4e4b424e768332654bd9.json | Update old codepen links to ones for v3 (#9619) | .github/PULL_REQUEST_TEMPLATE.md | @@ -7,5 +7,5 @@ Example of changes on an interactive website such as the following:
- https://jsbin.com/
- https://jsfiddle.net/
- https://codepen.io/pen/
-- Premade template: https://codepen.io/pen?template=JXVYzq
+- Premade template: https://codepen.io/pen?template=wvezeOq
--> | true |
Other | chartjs | Chart.js | eb1e82c9813fbfccd86f4e4b424e768332654bd9.json | Update old codepen links to ones for v3 (#9619) | docs/developers/contributing.md | @@ -74,6 +74,6 @@ Guidelines for reporting bugs:
- Check the issue search to see if it has already been reported
- Isolate the problem to a simple test case
-- Please include a demonstration of the bug on a website such as [JS Bin](https://jsbin.com/), [JS Fiddle](https://jsfiddle.net/), or [Codepen](https://codepe... | true |
Other | chartjs | Chart.js | fca030922360a1a2d1292f6936276ad11a7cf7d9.json | Detect attach/detach from any level (#9557) | src/core/core.controller.js | @@ -123,7 +123,7 @@ class Chart {
this.attached = false;
this._animationsDisabled = undefined;
this.$context = undefined;
- this._doResize = debounce(() => this.update('resize'), options.resizeDelay || 0);
+ this._doResize = debounce(mode => this.update(mode), options.resizeDelay || 0);
// A... | true |
Other | chartjs | Chart.js | fca030922360a1a2d1292f6936276ad11a7cf7d9.json | Detect attach/detach from any level (#9557) | src/helpers/helpers.extras.js | @@ -42,24 +42,23 @@ export function throttled(fn, thisArg, updateFn) {
/**
* Debounces calling `fn` for `delay` ms
- * @param {function} fn - Function to call. No arguments are passed.
+ * @param {function} fn - Function to call.
* @param {number} delay - Delay in ms. 0 = immediate invocation.
* @returns {func... | true |
Other | chartjs | Chart.js | fca030922360a1a2d1292f6936276ad11a7cf7d9.json | Detect attach/detach from any level (#9557) | src/platform/platform.dom.js | @@ -116,40 +116,31 @@ function fromNativeEvent(event, chart) {
function createAttachObserver(chart, type, listener) {
const canvas = chart.canvas;
- const container = canvas && _getParentNode(canvas);
- const element = container || canvas;
const observer = new MutationObserver(entries => {
- const parent ... | true |
Other | chartjs | Chart.js | fca030922360a1a2d1292f6936276ad11a7cf7d9.json | Detect attach/detach from any level (#9557) | test/specs/core.controller.tests.js | @@ -1029,8 +1029,10 @@ describe('Chart', function() {
});
parent.removeChild(wrapper);
- parent.appendChild(wrapper);
- wrapper.style.height = '355px';
+ setTimeout(() => {
+ parent.appendChild(wrapper);
+ wrapper.style.height = '355px';
+ }, 0);
});
// http... | true |
Other | chartjs | Chart.js | 4d99658155cdf3d504749b43cdc3ab71ab1d18d6.json | Remove chart.scale property (always undefined) (#9556) | src/core/core.controller.js | @@ -117,7 +117,6 @@ class Chart {
this._responsiveListeners = undefined;
this._sortedMetasets = [];
this.scales = {};
- this.scale = undefined;
this._plugins = new PluginService();
this.$proxies = {};
this._hiddenIndices = {}; | false |
Other | chartjs | Chart.js | fdd3ede6aa8e3678d3034d8b4e347819de7707ee.json | Fix broken link. (#9555)
Fix broken link from Creating Custom Tick Formats section to the Tick
API page. | docs/axes/labelling.md | @@ -24,7 +24,7 @@ The method receives 3 arguments:
* `value` - the tick value in the **internal data format** of the associated scale.
* `index` - the tick index in the ticks array.
-* `ticks` - the array containing all of the [tick objects](../api/interfaces/tick).
+* `ticks` - the array containing all of the [tic... | false |
Other | chartjs | Chart.js | 567baad09dbb27055c0ea1b7ad0c61e4bdfca6d3.json | Update eslint settings for readable errors (#9534) | .eslintrc.yml | @@ -1,15 +1,19 @@
extends:
- chartjs
- - plugin:es/no-new-in-es2019
+ - plugin:es/restrict-to-es2018
- plugin:markdown/recommended
+settings:
+ es:
+ aggressive: true
+
env:
es6: true
browser: true
node: true
parserOptions:
- ecmaVersion: 2018
+ ecmaVersion: 2021
sourceType: module
e... | false |
Other | chartjs | Chart.js | 148114b03ba8eef45c07e8c987992aa2abeef1cb.json | Add more details on legend sort function (#9524) | docs/configuration/legend.md | @@ -58,7 +58,7 @@ Namespace: `options.plugins.legend.labels`
| `padding` | `number` | `10` | Padding between rows of colored boxes.
| `generateLabels` | `function` | | Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box. See [Legend Item](#legend-it... | false |
Other | chartjs | Chart.js | 1c837a9c12ec4fa7c519a170830a4adbb9898d09.json | Fix _isPointInArea helper when no area is provided (#9489) | src/helpers/helpers.canvas.js | @@ -251,8 +251,8 @@ export function drawPoint(ctx, options, x, y) {
export function _isPointInArea(point, area, margin) {
margin = margin || 0.5; // margin - default is to match rounded decimals
- return point && area && point.x > area.left - margin && point.x < area.right + margin &&
- point.y > area.top - mar... | true |
Other | chartjs | Chart.js | 1c837a9c12ec4fa7c519a170830a4adbb9898d09.json | Fix _isPointInArea helper when no area is provided (#9489) | test/specs/helpers.canvas.tests.js | @@ -24,6 +24,9 @@ describe('Chart.helpers.canvas', function() {
});
describe('isPointInArea', function() {
+ it('should return true when no area is provided', function() {
+ expect(helpers._isPointInArea({x: 1, y: 1})).toBe(true);
+ });
it('should determine if a point is in the area', function()... | true |
Other | chartjs | Chart.js | 1c837a9c12ec4fa7c519a170830a4adbb9898d09.json | Fix _isPointInArea helper when no area is provided (#9489) | types/index.esm.d.ts | @@ -1629,7 +1629,7 @@ export interface FontSpec {
export type TextAlign = 'left' | 'center' | 'right';
export interface VisualElement {
- draw(ctx: CanvasRenderingContext2D): void;
+ draw(ctx: CanvasRenderingContext2D, area?: ChartArea): void;
inRange(mouseX: number, mouseY: number, useFinalPosition?: boolean)... | true |
Other | chartjs | Chart.js | 281ad204524f6ad9943902a6a909bb56bfc3d06b.json | Fix copy typo | docs/06-Polar-Area-Chart.md | @@ -29,7 +29,7 @@ Some properties are specified as arrays. The first value applies to the first ba
Property | Type | Usage
--- | --- | ---
-data | `Array<Number>` | The data to plot as bars
+data | `Array<Number>` | The data to plot as arcs
label | `String` | The label for the dataset which appears in the legend a... | false |
Other | chartjs | Chart.js | 8226f3432b9a71f2f9c0c616161de328378985da.json | Fix JSHint warnings and remove commented code | src/controllers/controller.bar.js | @@ -446,26 +446,10 @@ module.exports = function(Chart) {
var base = 0;
if (xScale.options.stacked) {
+ var chart = me.chart;
+ var datasets = chart.data.datasets;
+ var value = Number(datasets[datasetIndex].data[index]);
- var value = Number(me.chart.data.datasets[datasetIndex].data[index]);
-
-... | false |
Other | chartjs | Chart.js | a452094f5d1637b99b01bacd06a78b5ab4666cfa.json | Add polar area start angle setting | docs/06-Polar-Area-Chart.md | @@ -76,6 +76,7 @@ These are the customisation options specific to Polar Area charts. These options
Name | Type | Default | Description
--- | --- | --- | ---
+startAngle | Number | -0.5 * Math.PI | Sets the starting angle for the first item in a dataset
scale | Object | [See Scales](#scales) and [Defaults for Radia... | true |
Other | chartjs | Chart.js | a452094f5d1637b99b01bacd06a78b5ab4666cfa.json | Add polar area start angle setting | src/controllers/controller.polarArea.js | @@ -20,6 +20,7 @@ module.exports = function(Chart) {
animateScale: true
},
+ startAngle: -0.5 * Math.PI,
aspectRatio: 1,
legendCallback: function(chart) {
var text = [];
@@ -154,9 +155,10 @@ module.exports = function(Chart) {
}
}
- var negHalfPI = -0.5 * Math.PI;
+ //var negHalfPI = -... | true |
Other | chartjs | Chart.js | a452094f5d1637b99b01bacd06a78b5ab4666cfa.json | Add polar area start angle setting | test/controller.polarArea.tests.js | @@ -159,6 +159,52 @@ describe('Polar area controller tests', function() {
}));
});
+ it('should update elements with start angle from options', function() {
+ var chart = window.acquireChart({
+ type: 'polarArea',
+ data: {
+ datasets: [{
+ data: [10, 15, 0, -4],
+ label: 'dataset2'
+ }],
+ ... | true |
Other | chartjs | Chart.js | ff9e9f1d7c32b8c1ec36f9eb8a0ace5d20748818.json | add wikipedia link for DRY explanation
DRY is a short term for Don't Repeat yourself, maybe it is not so well known by front-end developers, but it is well known among back end developers | docs/01-Chart-Configuration.md | @@ -21,7 +21,7 @@ var chartInstance = new Chart(ctx, {
### Global Configuration
-This concept was introduced in Chart.js 1.0 to keep configuration DRY, and allow for changing options globally across chart types, avoiding the need to specify options for each instance, or the default for a particular chart type.
+Th... | false |
Other | chartjs | Chart.js | aed3d40263b77aa5014d8c3734e2dcbc9ca5122d.json | add id property to common configuration | docs/02-Scales.md | @@ -19,6 +19,7 @@ Name | Type | Default | Description
type | String | Chart specific. | Type of scale being employed. Custom scales can be created and registered with a string key. Options: ["category"](#scales-category-scale), ["linear"](#scales-linear-scale), ["logarithmic"](#scales-logarithmic-scale), ["time"](#sca... | false |
Other | chartjs | Chart.js | 2feebb1cd29e89479194ffe66488b223e75a0c50.json | remove redundant option entry | docs/02-Scales.md | @@ -52,7 +52,7 @@ drawTicks | Boolean | true | If true, draw lines beside the ticks in the axis a
tickMarkLength | Number | 10 | Length in pixels that the grid lines will draw into the axis area.
zeroLineWidth | Number | 1 | Stroke width of the grid line for the first index (index 0).
zeroLineColor | Color | "rgba(... | false |
Other | chartjs | Chart.js | 900e1062ba57331f6c44535bace125e10a0e8bf1.json | Fix typo in docs | docs/01-Chart-Configuration.md | @@ -373,7 +373,7 @@ hoverBorderWidth | Number | 1 | Default stroke width when hovered
#### Rectangle Configuration
-Rectangle elements are used to represent the bars in a bar chart. The global rectangle options are stored in `Chart.defaults.global.elements.rectange`.
+Rectangle elements are used to represent the b... | false |
Other | chartjs | Chart.js | e1a1d9cd6dc16b3291f45b57dd0c13a69694f41f.json | Change ID links for scales objects | docs/02-Scales.md | @@ -33,9 +33,9 @@ afterCalculateTickRotation | Function | undefined | Callback that runs after tic
beforeFit | Function | undefined | Callback that runs before the scale fits to the canvas. Passed a single argument, the scale instance.
afterFit | Function | undefined | Callback that runs after the scale fits to the c... | false |
Other | chartjs | Chart.js | 5c36e0de652af1912b0e5de262f3e9758677e05c.json | Fix typo in tooltip docs | docs/01-Chart-Configuration.md | @@ -189,7 +189,7 @@ var chartInstance = new Chart(ctx, {
### Tooltip Configuration
-The title configuration is passed into the `options.tooltips` namespace. The global options for the chart tooltips is defined in `Chart.defaults.global.tooltips`.
+The tooltip configuration is passed into the `options.tooltips` nam... | false |
Other | chartjs | Chart.js | 3cf1cfa3de538f13f64f31e5071a4fb40a8482ad.json | Fix JSHint warning | src/controllers/controller.polarArea.js | @@ -130,7 +130,6 @@ module.exports = function(Chart) {
updateElement: function(arc, index, reset) {
var me = this;
var chart = me.chart;
- var chartArea = chart.chartArea;
var dataset = me.getDataset();
var opts = chart.options;
var animationOpts = opts.animation; | false |
Other | chartjs | Chart.js | 7ea36aead33d90803027d668a15d0f698fb3d4b2.json | Add a way to know when a resize occurs. | docs/01-Chart-Configuration.md | @@ -72,6 +72,7 @@ maintainAspectRatio | Boolean | true | Maintain the original canvas aspect ratio
events | Array[String] | `["mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"]` | Events that the chart should listen to for tooltips and hovering
onClick | Function | null | Called if the event is ... | true |
Other | chartjs | Chart.js | 7ea36aead33d90803027d668a15d0f698fb3d4b2.json | Add a way to know when a resize occurs. | docs/09-Advanced.md | @@ -381,6 +381,9 @@ Plugins will be called at the following times
* End of update (before render occurs)
* Start of draw
* End of draw
+* Before datasets draw
+* After datasets draw
+* Resize
* Before an animation is started
Plugins should derive from Chart.PluginBase and implement the following interface
@@ -38... | true |
Other | chartjs | Chart.js | 7ea36aead33d90803027d668a15d0f698fb3d4b2.json | Add a way to know when a resize occurs. | src/core/core.controller.js | @@ -76,26 +76,39 @@ module.exports = function(Chart) {
},
resize: function resize(silent) {
- var canvas = this.chart.canvas;
- var newWidth = helpers.getMaximumWidth(this.chart.canvas);
- var newHeight = (this.options.maintainAspectRatio && isNaN(this.chart.aspectRatio) === false && isFinite(this.chart.a... | true |
Other | chartjs | Chart.js | 016c2d8267f0d7c5a25caa858611ed804c18f8e4.json | Update Contributing Guidelines | CONTRIBUTING.md | @@ -25,7 +25,7 @@ Guidlines for reporting bugs:
- Check the issue search to see if it has already been reported
- Isolate the problem to a simple test case
- - Provide a demonstration of the problem on [JS Bin](http://jsbin.com) or similar
+ - Please include a demonstration of the bug on a website such as [JS Bin... | false |
Other | chartjs | Chart.js | 10f01088e43f6632c0fbb977c43dfae4996c7dcc.json | add afterDatasetDraw in correct place | src/core/core.controller.js | @@ -297,12 +297,12 @@ module.exports = function(Chart) {
}
}, this, true);
- Chart.pluginService.notifyPlugins('afterElementDraw', [this, easingDecimal]);
+ Chart.pluginService.notifyPlugins('afterDatasetDraw', [this, easingDecimal]);
// Finally draw the tooltip
this.tooltip.transition(easingDe... | false |
Other | chartjs | Chart.js | 0997cf71ccd711afe956d0d40e1a7053d698fff2.json | Fix doc syntax (#2673) | docs/02-Scales.md | @@ -190,14 +190,16 @@ var chartInstance = new Chart(ctx, {
type: 'line',
data: data,
options: {
- xAxes: [{
- type: 'logarithmic',
- position: 'bottom',
- ticks: {
- min: 1,
- max: 1000
- }
- }]
+ scales: {
+ ... | false |
Other | chartjs | Chart.js | 9d7a0fb93ef23fd76ee41596b36235aaf988dcf4.json | Fix links to 09-Advanced.md (was 07-Advanced.md) | CONTRIBUTING.md | @@ -9,7 +9,7 @@ Using issues
The [issue tracker](https://github.com/chartjs/Chart.js/issues) is the preferred channel for reporting bugs, requesting new features and submitting pull requests.
-If you're suggesting a new chart type, please take a look at [writing new chart types](https://github.com/chartjs/Chart.js... | false |
Other | chartjs | Chart.js | a5167cc42d397491247e406253afd006ba6b33b5.json | Reduce duplicated code in doughnut controller | src/controllers/controller.doughnut.js | @@ -220,10 +220,8 @@ module.exports = function(Chart) {
});
var model = arc._model;
- model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : valueAtIndexOrDefault(dataset.backgroundColor, index, arcOpts.backgroundColor);
- model.hoverBackgroundColor = custom.hoverBackgroundColor ? custo... | true |
Other | chartjs | Chart.js | a5167cc42d397491247e406253afd006ba6b33b5.json | Reduce duplicated code in doughnut controller | test/controller.doughnut.tests.js | @@ -75,8 +75,7 @@ describe('Doughnut controller tests', function() {
arc: {
backgroundColor: 'rgb(255, 0, 0)',
borderColor: 'rgb(0, 0, 255)',
- borderWidth: 2,
- hoverBackgroundColor: 'rgb(255, 255, 255)'
+ borderWidth: 2
}
}
}
@@ -102,7 +101,6 @@ describe('Doughnut con... | true |
Other | chartjs | Chart.js | bd6c4870af3ce2e6ed85b030907835a694b08619.json | Update colors for chart that is created | docs/04-Bar-Chart.md | @@ -58,11 +58,23 @@ var data = {
datasets: [
{
label: "My First dataset",
- backgroundColor: "rgba(255,99,132,0.2)",
- borderColor: "rgba(255,99,132,1)",
- borderWidth: 1,
- hoverBackgroundColor: "rgba(255,99,132,0.4)",
- hoverBorderColor: "rgba(255,99,132,1)",
+ backgroundColor: [
+ ... | false |
Other | chartjs | Chart.js | 876ddc89313cef693771a70b571d844b062e7fc4.json | Update radial linear scale docs | docs/02-Scales.md | @@ -340,8 +340,15 @@ Name | Type | Default | Description
backdropColor | Color | 'rgba(255, 255, 255, 0.75)' | Color of label backdrops
backdropPaddingX | Number | 2 | Horizontal padding of label backdrop
backdropPaddingY | Number | 2 | Vertical padding of label backdrop
+beginAtZero | Boolean | - | if true, scale w... | false |
Other | chartjs | Chart.js | 6bc917c8e3168aee488f1b716bc1dbd174c52b95.json | Improve testing on the CI | src/core/core.tooltip.js | @@ -282,10 +282,10 @@ module.exports = function(Chart) {
model.opacity = 1;
var labelColors = [],
- tooltipPosition = tooltipPosition = getAveragePosition(active);
+ tooltipPosition = getAveragePosition(active);
var tooltipItems = [];
- for (var i = 0, len = active.length; i < len; ++i) {
... | true |
Other | chartjs | Chart.js | 6bc917c8e3168aee488f1b716bc1dbd174c52b95.json | Improve testing on the CI | test/core.tooltip.tests.js | @@ -109,8 +109,6 @@ describe('tooltip tests', function() {
}],
afterBody: [],
footer: [],
- x: 269,
- y: 155,
caretPadding: 2,
labelColors: [{
borderColor: 'rgb(255, 0, 0)',
@@ -120,6 +118,9 @@ describe('tooltip tests', function() {
backgroundColor: 'rgb(0, 255, 255)'
}]
}));
+
... | true |
Other | chartjs | Chart.js | da1c51f1492c48ba8738896d4256bc2d77302777.json | Improve testing on CI | test/core.tooltip.tests.js | @@ -109,8 +109,6 @@ describe('tooltip tests', function() {
}],
afterBody: [],
footer: [],
- x: 269,
- y: 155,
caretPadding: 2,
labelColors: [{
borderColor: 'rgb(255, 0, 0)',
@@ -120,6 +118,9 @@ describe('tooltip tests', function() {
backgroundColor: 'rgb(0, 255, 255)'
}]
}));
+
... | false |
Other | chartjs | Chart.js | af5344462e64f40c96741bf937f2bffa1fc39a72.json | Improve tooltip minification | src/core/core.helpers.js | @@ -953,17 +953,6 @@ module.exports = function(Chart) {
return true;
};
- helpers.pushAllIfDefined = function(element, array) {
- if (typeof element === "undefined") {
- return;
- }
-
- if (helpers.isArray(element)) {
- array.push.apply(array, element);
- } else {
- array.push(element);
- }
- };
hel... | true |
Other | chartjs | Chart.js | af5344462e64f40c96741bf937f2bffa1fc39a72.json | Improve tooltip minification | src/core/core.tooltip.js | @@ -35,12 +35,16 @@ module.exports = function(Chart) {
title: function(tooltipItems, data) {
// Pick first xLabel for now
var title = '';
+ var labels = data.labels;
+ var labelCount = labels ? labels.length : 0;
if (tooltipItems.length > 0) {
- if (tooltipItems[0].xLabel) {
- title ... | true |
Other | chartjs | Chart.js | 1b277a71e4af83d19a87d09ffeb06841c275fce9.json | Fix pie custom tooltip sample | samples/pie-customTooltips.html | @@ -13,160 +13,142 @@
text-align: center;
}
#chartjs-tooltip {
- opacity: 1;
- position: absolute;
- background: rgba(0, 0, 0, .7);
- color: white;
- padding: 3px;
- border-radius: 3px;
- -webkit-transition: all .1s ease;
- transition: all .1s e... | false |
Other | chartjs | Chart.js | 46fc96bf4d97989096aa1024be3d0ee2c9a6a789.json | Remove unused code from core controller. | src/core/core.controller.js | @@ -53,7 +53,6 @@ module.exports = function(Chart) {
this.ensureScalesHaveIDs();
this.buildOrUpdateControllers();
this.buildScales();
- this.buildSurroundingItems();
this.updateLayout();
this.resetElements();
this.initToolTip();
@@ -166,18 +165,6 @@ module.exports = function(Chart) {
Chart... | false |
Other | chartjs | Chart.js | d6289c6129f1222980ea571f6c6f675182d78f35.json | Convert title block to a plugin | src/chart.js | @@ -8,9 +8,9 @@ require('./core/core.datasetController')(Chart);
require('./core/core.layoutService')(Chart);
require('./core/core.scaleService')(Chart);
require('./core/core.plugin.js')(Chart);
-require('./core/core.legend')(Chart);
require('./core/core.scale')(Chart);
require('./core/core.title')(Chart);
+requir... | true |
Other | chartjs | Chart.js | d6289c6129f1222980ea571f6c6f675182d78f35.json | Convert title block to a plugin | src/core/core.controller.js | @@ -167,15 +167,15 @@ module.exports = function(Chart) {
},
buildSurroundingItems: function() {
- if (this.options.title) {
+ /*if (this.options.title) {
this.titleBlock = new Chart.Title({
ctx: this.chart.ctx,
options: this.options.title,
chart: this
});
Chart.layoutServi... | true |
Other | chartjs | Chart.js | d6289c6129f1222980ea571f6c6f675182d78f35.json | Convert title block to a plugin | src/core/core.legend.js | @@ -363,5 +363,5 @@ module.exports = function(Chart) {
Chart.layoutService.addBox(chartInstance, chartInstance.legend);
}
}
- })
+ });
}; | true |
Other | chartjs | Chart.js | d6289c6129f1222980ea571f6c6f675182d78f35.json | Convert title block to a plugin | src/core/core.title.js | @@ -177,4 +177,22 @@ module.exports = function(Chart) {
}
}
});
+
+ // Register the title plugin
+ Chart.pluginService.register({
+ beforeInit: function(chartInstance) {
+ var opts = chartInstance.options;
+ var titleOpts = opts.title;
+
+ if (titleOpts) {
+ chartInstance.titleBlock = new Chart.Title... | true |
Other | chartjs | Chart.js | e81299ded4b7a6af9f2bf52e31129d9d96f51a3f.json | Improve line chart docs | docs/03-Line-Chart.md | @@ -3,9 +3,7 @@ title: Line Chart
anchor: line-chart
---
### Introduction
-A line chart is a way of plotting data points on a line.
-
-Often, it is used to show trend data, and the comparison of two data sets.
+A line chart is a way of plotting data points on a line. Often, it is used to show trend data, and the com... | false |
Other | chartjs | Chart.js | f4ef56993d94ad5379ebd82331f05f16d89df987.json | Add full description text for scales. | docs/01-Scales.md | @@ -14,39 +14,39 @@ Every scale extends a core scale class with the following options:
Name | Type | Default | Description
--- |:---:| --- | ---
-display | Boolean | true | If true, show the scale.
-reverse | Boolean | false | If true, reverses the scales.
-gridLines | Array | |
+type | String | Chart specific. | T... | false |
Other | chartjs | Chart.js | ea15aaaec23485c5c257617c3ece3e178729e870.json | Fix draw issue | src/core/core.legend.js | @@ -285,6 +285,7 @@
if (dataset.hidden) {
// Strikethrough the text if hidden
+ ctx.beginPath();
ctx.moveTo(this.options.labels.boxWidth + (this.options.labels.fontSize / 2) + cursor.x, cursor.y + (this.options.labels.fontSize / 2));
ctx.lineTo(this.options.labels.boxWidth + (this... | false |
Other | chartjs | Chart.js | f32d62722a8b64bc2d198796d8bd64db6c5a3666.json | Update initializer documentation for Bar. | docs/03-Bar-Chart.md | @@ -14,8 +14,9 @@ It is sometimes used to show trend data, and the comparison of multiple data set
### Example usage
```javascript
-var myBarChart = new Chart(ctx).Bar({
- data: data,
+var myBarChart = new Chart(ctx,{
+ type: 'bar',
+ data: data,
options: options
});
```
@@ -83,7 +84,7 @@ These are the customi... | false |
Other | chartjs | Chart.js | 7edcc0659bf3295532974d1d3569f3454290e8e7.json | Fix polar area legends | src/charts/Chart.PolarArea.js | @@ -7,7 +7,23 @@
var defaultConfig = {
aspectRatio: 1,
- legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i = 0; i < data.datasets[0].data.length; i++){%><li><span style=\"background-color:<%=data.datasets[0].backgroundColor[i]%>\"><%if(data.labels && i < data.labels.length){%><%=data.l... | false |
Other | chartjs | Chart.js | 8398d26d10ee030339cafb77519a98857ce9dd66.json | Remove Tooltip opacity from core-controller | src/core/core.controller.js | @@ -458,20 +458,7 @@
// The usual updates
this.tooltip.initialize();
-
- // Active
- if (this.tooltipActive.length) {
- this.tooltip._model.opacity = 1;
-
- helpers.extend(this.tooltip, {
- _active: this.tooltipActive,
- });
-
- } else {
- // Inactive
- this.tooltip._model.... | false |
Other | chartjs | Chart.js | 0fa03fad24040d83b713727f2158919f223387b4.json | Handle opacity in the tooltip update method | src/core/core.tooltip.js | @@ -197,63 +197,70 @@
var ctx = this._chart.ctx;
- var element = this._active[0],
- labelColors = [],
- tooltipPosition;
-
- var tooltipItems = [];
-
- if (this._options.tooltips.mode == 'single') {
- var yScale = element._yScale || element._scale; // handle radar || polarArea charts
- tooltip... | false |
Other | chartjs | Chart.js | ecf5801787abefaa6a47b17cb8b4180c35948437.json | call the custom callback in tooltip options | src/core/core.tooltip.js | @@ -136,7 +136,7 @@
});
},
- // Get the title
+ // Get the title
// Args are: (tooltipItem, data)
getTitle: function() {
var beforeTitle = this._options.tooltips.callbacks.beforeTitle.apply(this, arguments),
@@ -197,7 +197,7 @@
var ctx = this._chart.ctx;
- var element = this._active[0], ... | false |
Other | chartjs | Chart.js | 682545e1e37e16d32e55f9b34dfda867ac1fd8ec.json | Change license link
The link to the license now points to the direct license that applies for chart.js, rather than a generic MIT license | README.md | @@ -58,4 +58,4 @@ For support using Chart.js, please post questions with the [`chartjs` tag on Sta
## License
-Chart.js is available under the [MIT license](http://opensource.org/licenses/MIT).
+Chart.js is available under the [MIT license](https://github.com/nnnick/Chart.js/blob/master/LICENSE.md). | false |
Other | chartjs | Chart.js | b87106c1817d380576fbd6fc1ae1e7928d38b6ba.json | Add npm info to getting started doc. | docs/00-Getting-Started.md | @@ -31,6 +31,12 @@ You can also grab Chart.js using bower:
bower install Chart.js --save
```
+or NPM:
+
+```bash
+npm install chart.js --save
+```
+
Also, Chart.js is available from CDN:
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js | false |
Other | chartjs | Chart.js | 4d009d116dfd405e183fc44658909e013dfa88fc.json | Use the new travis CI docker framework (hopefully) | .travis.yml | @@ -15,3 +15,5 @@ script:
notifications:
slack: chartjs:pcfCZR6ugg5TEcaLtmIfQYuA
+
+sudo: false
\ No newline at end of file | false |
Other | chartjs | Chart.js | 57979a22708364d16eb58373910de374d736ecb0.json | Fix similar typos in core.controller & element | src/core/core.controller.js | @@ -4,7 +4,7 @@
//Declare root variable - window in the browser, global on the server
var root = this,
- previous = root.Chart,
+ Chart = root.Chart,
helpers = Chart.helpers;
| true |
Other | chartjs | Chart.js | 57979a22708364d16eb58373910de374d736ecb0.json | Fix similar typos in core.controller & element | src/core/core.element.js | @@ -4,7 +4,7 @@
//Declare root variable - window in the browser, global on the server
var root = this,
- previous = root.Chart,
+ Chart = root.Chart,
helpers = Chart.helpers;
Chart.elements = {}; | true |
Other | chartjs | Chart.js | ef1c4fb0cbd7c35f0affaa27bf589b6f3302fd8c.json | Fix typo in core.helpers.js | src/core/core.helpers.js | @@ -4,7 +4,7 @@
//Declare root variable - window in the browser, global on the server
var root = this,
- previous = root.Chart;
+ Chart = root.Chart;
//Global Chart helpers object for utility methods and classes
var helpers = Chart.helpers = {}; | false |
Other | chartjs | Chart.js | fe5ef1584b7e10b4d584e553ecb949d7c8ccc5ec.json | Add Line chart with time scale sample | samples/line-time-scale.html | @@ -0,0 +1,162 @@
+<!doctype html>
+<html>
+
+<head>
+ <title>Line Chart</title>
+ <script src="../Chart.js"></script>
+ <script src="../node_modules/jquery/dist/jquery.min.js"></script>
+ <style>
+ canvas {
+ -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, .5);
+ }
+ </style>
+</he... | false |
Other | chartjs | Chart.js | 8762ae2f2806d7784b1b716e273827544abc53eb.json | Add moment.js as dependency | gulpfile.js | @@ -33,7 +33,8 @@ var srcFiles = [
'./src/scales/**',
'./src/elements/**',
'./src/charts/**',
- './node_modules/color/dist/color.min.js'
+ './node_modules/color/dist/color.min.js',
+ './node_modules/moment/min/moment.min.js'
];
| true |
Other | chartjs | Chart.js | 8762ae2f2806d7784b1b716e273827544abc53eb.json | Add moment.js as dependency | package.json | @@ -31,6 +31,7 @@
"karma-firefox-launcher": "^0.1.6",
"karma-jasmine": "^0.3.6",
"karma-jasmine-html-reporter": "^0.1.8",
+ "moment": "^2.10.6",
"onecolor": "^2.5.0",
"semver": "^3.0.1"
}, | true |
Other | chartjs | Chart.js | 26684b6371cca9db250edc9e7c0a056fb8081d4d.json | Rectangle element tests | src/elements/element.rectangle.js | @@ -55,15 +55,26 @@
},
inRange: function(mouseX, mouseY) {
var vm = this._view;
- if (vm.y < vm.base) {
- return (mouseX >= vm.x - vm.width / 2 && mouseX <= vm.x + vm.width / 2) && (mouseY >= vm.y && mouseY <= vm.base);
- } else {
- return (mouseX >= vm.x - vm.width / 2 && mouseX <= vm.x + vm.width ... | true |
Other | chartjs | Chart.js | 26684b6371cca9db250edc9e7c0a056fb8081d4d.json | Rectangle element tests | test/element.rectangle.tests.js | @@ -0,0 +1,246 @@
+// Test the rectangle element
+
+describe('Rectangle element tests', function() {
+ it ('Should be constructed', function() {
+ var rectangle = new Chart.elements.Rectangle({
+ _datasetIndex: 2,
+ _index: 1
+ });
+
+ expect(rectangle).not.toBe(undefined);
+ expect(rectangle._datasetIndex).toB... | true |
Other | chartjs | Chart.js | b4b3bf60b81e898fac41afc716b5885e928caebc.json | Remove wrong addition of padding | src/scales/scale.linear.js | @@ -173,7 +173,6 @@
// Bottom - top since pixels increase downard on a screen
var innerHeight = this.height - (this.paddingTop + this.paddingBottom);
pixel = (this.bottom - this.paddingBottom) - (innerHeight / range * (value - this.start));
- pixel += this.paddingTop;
}
return pixel; | false |
Other | chartjs | Chart.js | 572b1c737ee20ad9e144976e60b2bb33444d74d0.json | Move register/unregister to core.controller (#7626) | src/core/core.controller.js | @@ -1181,4 +1181,16 @@ Chart.instances = {};
Chart.registry = registry;
+// @ts-ignore
+const invalidatePlugins = () => each(Chart.instances, (chart) => chart._plugins.invalidate());
+
+Chart.register = (...items) => {
+ registry.add(...items);
+ invalidatePlugins();
+};
+Chart.unregister = (...items) => {
+ regis... | true |
Other | chartjs | Chart.js | 572b1c737ee20ad9e144976e60b2bb33444d74d0.json | Move register/unregister to core.controller (#7626) | src/index.js | @@ -23,21 +23,9 @@ import registry from './core/core.registry';
import Scale from './core/core.scale';
import * as scales from './scales';
import Ticks from './core/core.ticks';
-import {each} from './helpers/helpers.core';
-
-// @ts-ignore
-const invalidatePlugins = () => each(Chart.instances, (chart) => chart._plu... | true |
Other | chartjs | Chart.js | 4f6d9d844072e6e1cbac49f483a231e1ab4969fb.json | Fix links to fonts.md (#7623) | docs/docs/axes/labelling.md | @@ -13,7 +13,7 @@ The scale label configuration is nested under the scale configuration in the `sc
| `display` | `boolean` | `false` | If true, display the axis title.
| `align` | `string` | `'center'` | Alignment of the axis title. Possible options are `'start'`, `'center'` and `'end'`
| `labelString` | `string` | ... | true |
Other | chartjs | Chart.js | 4f6d9d844072e6e1cbac49f483a231e1ab4969fb.json | Fix links to fonts.md (#7623) | docs/docs/axes/radial/linear.md | @@ -133,7 +133,7 @@ The following options are used to configure the point labels that are shown on t
| ---- | ---- | ------- | ------- | -----------
| `display` | `boolean` | | `true` | if true, point labels are shown.
| `callback` | `function` | | | Callback function to transform data labels to point labels. The de... | true |
Other | chartjs | Chart.js | 4f6d9d844072e6e1cbac49f483a231e1ab4969fb.json | Fix links to fonts.md (#7623) | docs/docs/axes/styling.md | @@ -44,7 +44,7 @@ The tick configuration is nested under the scale configuration in the `ticks` ke
| ---- | ---- | :-------------------------------: | ------- | -----------
| `callback` | `function` | | | Returns the string representation of the tick value as it should be displayed on the chart. See [callback](../axe... | true |
Other | chartjs | Chart.js | 4f6d9d844072e6e1cbac49f483a231e1ab4969fb.json | Fix links to fonts.md (#7623) | docs/docs/configuration/title.md | @@ -13,7 +13,7 @@ The title configuration is passed into the `options.title` namespace. The global
| `align` | `string` | `'center'` | Alignment of the title. [more...](#align)
| `display` | `boolean` | `false` | Is the title shown?
| `position` | `string` | `'top'` | Position of title. [more...](#position)
-| `font... | true |
Other | chartjs | Chart.js | 4f6d9d844072e6e1cbac49f483a231e1ab4969fb.json | Fix links to fonts.md (#7623) | docs/docs/configuration/tooltip.md | @@ -17,14 +17,14 @@ The tooltip configuration is passed into the `options.tooltips` namespace. The g
| `itemSort` | `function` | | Sort tooltip items. [more...](#sort-callback)
| `filter` | `function` | | Filter tooltip items. [more...](#filter-callback)
| `backgroundColor` | `Color` | `'rgba(0, 0, 0, 0.8)'` | Backg... | true |
Other | chartjs | Chart.js | fb68e91312ad632fcefad0d5883d1d04c13e32ec.json | Fix errors in custom tooltip samples (#7595) | samples/tooltips/custom-line.html | @@ -40,24 +40,26 @@
<script>
Chart.defaults.pointHitDetectionRadius = 1;
- var getOrCreateTooltip = function() {
+ var getOrCreateTooltip = function(chart) {
var tooltipEl = document.getElementById('chartjs-tooltip');
if (!tooltipEl) {
tooltipEl = document.createElement('div');
tooltipEl.id... | true |
Other | chartjs | Chart.js | fb68e91312ad632fcefad0d5883d1d04c13e32ec.json | Fix errors in custom tooltip samples (#7595) | samples/tooltips/custom-pie.html | @@ -43,8 +43,9 @@
</div>
<script>
- Chart.defaults.plugins.tooltip.custom = function(tooltip) {
+ Chart.defaults.plugins.tooltip.custom = function(context) {
// Tooltip Element
+ var tooltip = context.tooltip;
var tooltipEl = document.getElementById('chartjs-tooltip');
// Hide if no tooltip
@@ -... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.