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
aa0933e040b456e23557a999408f6047578e631c.json
Avoid meta data access in calculateCircumference Fix access of uninitialized meta data while calculating circumference in the polar area chart by caching the number of visible elements in the update() method. Also make the calculateTotal() of the doughnut chart tolerant of uninitialized meta data.
src/controllers/controller.polarArea.js
@@ -119,6 +119,7 @@ module.exports = function(Chart) { }, update: function update(reset) { + var meta = this.getMeta(); var minSize = Math.min(this.chart.chartArea.right - this.chart.chartArea.left, this.chart.chartArea.bottom - this.chart.chartArea.top); this.chart.outerRadius = Math.max((minSize - t...
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/controllers/controller.doughnut.js
@@ -38,8 +38,9 @@ module.exports = function(Chart) { var data = chart.data; if (data.labels.length && data.datasets.length) { return data.labels.map(function(label, i) { + var meta = chart.getDatasetMeta(0); var ds = data.datasets[0]; - var arc = chart.getDatasetMeta(0).data[i]; +...
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/controllers/controller.polarArea.js
@@ -39,8 +39,9 @@ module.exports = function(Chart) { var data = chart.data; if (data.labels.length && data.datasets.length) { return data.labels.map(function(label, i) { + var meta = chart.getDatasetMeta(0); var ds = data.datasets[0]; - var arc = chart.getDatasetMeta(0).data[i]; +...
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/core/core.controller.js
@@ -416,7 +416,6 @@ module.exports = function(Chart) { data: [], dataset: null, controller: null, - hiddenData: {}, hidden: null, // See isDatasetVisible() comment xAxisID: null, yAxisID: null
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/core/core.element.js
@@ -11,7 +11,9 @@ module.exports = function(Chart) { this.initialize.apply(this, arguments); }; helpers.extend(Chart.Element.prototype, { - initialize: function() {}, + initialize: function() { + this.hidden = false; + }, pivot: function() { if (!this._view) { this._view = ...
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/scales/scale.linear.js
@@ -61,9 +61,8 @@ module.exports = function(Chart) { if (this.chart.isDatasetVisible(datasetIndex) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) { helpers.each(dataset.data, function(rawValue, index) { - var value = +this.getRightValue(rawValue); - if (isNa...
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/scales/scale.logarithmic.js
@@ -40,7 +40,7 @@ module.exports = function(Chart) { helpers.each(dataset.data, function(rawValue, index) { var values = valuesPerType[meta.type]; var value = +this.getRightValue(rawValue); - if (isNaN(value)) { + if (isNaN(value) || meta.data[index].hidden) { return; ...
true
Other
chartjs
Chart.js
29115c9d2c94f5f52a22fa5e9d39244726a7d9d2.json
Handle data visibility per chart New Chart.Element.hidden bool flag storing the visibility state of its associated data. Since elements belong to a specific chart, this change allows to manage data visibility per chart (e.g. when clicking the legend of some charts). This commit also changes (fixes?) the polar chart a...
src/scales/scale.radialLinear.js
@@ -65,9 +65,10 @@ module.exports = function(Chart) { helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { if (this.chart.isDatasetVisible(datasetIndex)) { + var meta = this.chart.getDatasetMeta(datasetIndex); helpers.each(dataset.data, function(rawValue, index) { var val...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/controllers/controller.bar.js
@@ -40,7 +40,7 @@ module.exports = function(Chart) { var barCount = 0; helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { var meta = this.chart.getDatasetMeta(datasetIndex); - if (meta.bar && helpers.isDatasetVisible(dataset)) { + if (meta.bar && this.chart.isDatasetVisible(data...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/controllers/controller.doughnut.js
@@ -61,17 +61,17 @@ module.exports = function(Chart) { } }, onClick: function(e, legendItem) { - helpers.each(this.chart.data.datasets, function(dataset) { - dataset.metaHiddenData = dataset.metaHiddenData || []; + helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { + var...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/controllers/controller.line.js
@@ -223,7 +223,7 @@ module.exports = function(Chart) { for (var i = 0; i < datasetIndex; i++) { var ds = this.chart.data.datasets[i]; var dsMeta = this.chart.getDatasetMeta(i); - if (dsMeta.type === 'line' && helpers.isDatasetVisible(ds)) { + if (dsMeta.type === 'line' && this.chart.isDatasetVi...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/controllers/controller.polarArea.js
@@ -62,17 +62,17 @@ module.exports = function(Chart) { } }, onClick: function(e, legendItem) { - helpers.each(this.chart.data.datasets, function(dataset) { - dataset.metaHiddenData = dataset.metaHiddenData || []; + helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { + var...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/core/core.controller.js
@@ -325,7 +325,7 @@ module.exports = function(Chart) { // Draw each dataset via its respective controller (reversed to support proper line stacking) helpers.each(this.data.datasets, function(dataset, datasetIndex) { - if (helpers.isDatasetVisible(dataset)) { + if (this.isDatasetVisible(datasetIndex)) { ...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/core/core.helpers.js
@@ -938,9 +938,6 @@ module.exports = function(Chart) { array.push(element); } }; - helpers.isDatasetVisible = function(dataset) { - return !dataset.hidden; - }; helpers.callCallback = function(fn, args, _tArg) { if (fn && typeof fn.call === 'function') { fn.apply(_tArg, args);
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/core/core.legend.js
@@ -13,8 +13,11 @@ module.exports = function(Chart) { // a callback that will handle onClick: function(e, legendItem) { - var dataset = this.chart.data.datasets[legendItem.datasetIndex]; - dataset.hidden = !dataset.hidden; + var index = legendItem.datasetIndex; + var meta = this.chart.getDatasetMeta(ind...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/core/core.tooltip.js
@@ -236,7 +236,7 @@ module.exports = function(Chart) { tooltipPosition = this.getAveragePosition(this._active); } else { helpers.each(this._data.datasets, function(dataset, datasetIndex) { - if (!helpers.isDatasetVisible(dataset)) { + if (!this._chartInstance.isDatasetVisible(datasetIndex)) {...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/scales/scale.linear.js
@@ -59,7 +59,7 @@ module.exports = function(Chart) { var positiveValues = valuesPerType[meta.type].positiveValues; var negativeValues = valuesPerType[meta.type].negativeValues; - if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) { + ...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/scales/scale.logarithmic.js
@@ -32,7 +32,7 @@ module.exports = function(Chart) { helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { var meta = this.chart.getDatasetMeta(datasetIndex); - if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) { + ...
true
Other
chartjs
Chart.js
82b1e5cd99d77744aac3c1a3c532bbf99b2578cf.json
Handle effective dataset visibility per chart Introduced a new meta.hidden 3 states flag (null|true|false) to be able to override dataset.hidden when interacting with the chart (i.e., true or false to ignore the dataset.hidden value). This is required in order to be able to correctly share dataset.hidden between multi...
src/scales/scale.radialLinear.js
@@ -63,8 +63,8 @@ module.exports = function(Chart) { this.min = null; this.max = null; - helpers.each(this.chart.data.datasets, function(dataset) { - if (helpers.isDatasetVisible(dataset)) { + helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { + if (this.chart.isDatasetVisible(...
true
Other
chartjs
Chart.js
f3457c99417e3e87f67b8b673c6d9ca046b3bc46.json
Handle dataset type per chart Dataset effective type is now stored under meta.type, allowing many charts to share the same dataset but with different types. Also move dataset.bar flag to meta.bar.
src/controllers/controller.bar.js
@@ -33,16 +33,17 @@ module.exports = function(Chart) { Chart.DatasetController.prototype.initialize.call(this, chart, datasetIndex); // Use this to indicate that this is a bar dataset. - this.getDataset().bar = true; + this.getMeta().bar = true; }, // Get the number of datasets that display bars. We...
true
Other
chartjs
Chart.js
f3457c99417e3e87f67b8b673c6d9ca046b3bc46.json
Handle dataset type per chart Dataset effective type is now stored under meta.type, allowing many charts to share the same dataset but with different types. Also move dataset.bar flag to meta.bar.
src/controllers/controller.line.js
@@ -222,7 +222,8 @@ module.exports = function(Chart) { for (var i = 0; i < datasetIndex; i++) { var ds = this.chart.data.datasets[i]; - if (ds.type === 'line' && helpers.isDatasetVisible(ds)) { + var dsMeta = this.chart.getDatasetMeta(i); + if (dsMeta.type === 'line' && helpers.isDatasetVisible...
true
Other
chartjs
Chart.js
f3457c99417e3e87f67b8b673c6d9ca046b3bc46.json
Handle dataset type per chart Dataset effective type is now stored under meta.type, allowing many charts to share the same dataset but with different types. Also move dataset.bar flag to meta.bar.
src/core/core.controller.js
@@ -208,18 +208,17 @@ module.exports = function(Chart) { var newControllers = []; helpers.each(this.data.datasets, function(dataset, datasetIndex) { - if (!dataset.type) { - dataset.type = this.config.type; + var meta = this.getDatasetMeta(datasetIndex); + if (!meta.type) { + meta.type = data...
true
Other
chartjs
Chart.js
f3457c99417e3e87f67b8b673c6d9ca046b3bc46.json
Handle dataset type per chart Dataset effective type is now stored under meta.type, allowing many charts to share the same dataset but with different types. Also move dataset.bar flag to meta.bar.
src/scales/scale.linear.js
@@ -48,16 +48,16 @@ module.exports = function(Chart) { helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { var meta = this.chart.getDatasetMeta(datasetIndex); - if (valuesPerType[dataset.type] === undefined) { - valuesPerType[dataset.type] = { + if (valuesPerType[meta.type...
true
Other
chartjs
Chart.js
f3457c99417e3e87f67b8b673c6d9ca046b3bc46.json
Handle dataset type per chart Dataset effective type is now stored under meta.type, allowing many charts to share the same dataset but with different types. Also move dataset.bar flag to meta.bar.
src/scales/scale.logarithmic.js
@@ -33,12 +33,12 @@ module.exports = function(Chart) { helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) { var meta = this.chart.getDatasetMeta(datasetIndex); if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) { - ...
true
Other
chartjs
Chart.js
f51d7753bd3dea42e51487831c3b0f6f732460c1.json
Update logarithmic algorithm
src/scales/scale.logarithmic.js
@@ -10,10 +10,10 @@ // label settings ticks: { - callback: function(value) { + callback: function(value, index, arr) { var remain = value / (Math.pow(10, Math.floor(Chart.helpers.log10(value)))); - if (remain === 1 || remain === 2 || remain === 5) { + if (remain === 1 || remain === 2 || remain ...
false
Other
chartjs
Chart.js
e94bd460a795180c7bf5b45245c89f4c23c37ab6.json
Remove Firefox workaround The workaround for older Firefox should be removed, because latest supported Firefox 38.4.0/42.0 do not require it. And it has side effect like #1198 or my problem on Kintone on cybozu.com.
src/Chart.Core.js
@@ -40,10 +40,6 @@ var width = this.width = computeDimension(context.canvas,'Width') || context.canvas.width; var height = this.height = computeDimension(context.canvas,'Height') || context.canvas.height; - // Firefox requires this to work correctly - context.canvas.width = width; - context.canvas.height = ...
false
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
docs/01-Scales.md
@@ -153,16 +153,18 @@ The time scale extends the core scale class with the following tick template: // Moment js for each of the units. Replaces `displayFormat` // To override, use a pattern string from http://momentjs.com/docs/#/displaying/format/ displayFormats: { - 'millisecond': 'SSS [ms]', - 'second...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
samples/timeScale/combo-time-scale.html
@@ -2,190 +2,179 @@ <html> <head> - <title>Line Chart</title> - <script src="../node_modules/moment/min/moment.min.js"></script> - <script src="../Chart.js"></script> - <script src="../node_modules/jquery/dist/jquery.min.js"></script> - <style> - canvas { - -webkit-box-shadow: 0 0 2...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
samples/timeScale/line-time-point-data.html
@@ -2,163 +2,171 @@ <html> <head> - <title>Time Scale Point Data</title> - <script src="../node_modules/moment/min/moment.min.js"></script> - <script src="../Chart.js"></script> - <script src="../node_modules/jquery/dist/jquery.min.js"></script> - <style> - canvas { - -webkit-box-sh...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
samples/timeScale/line-time-scale.html
@@ -2,205 +2,210 @@ <html> <head> - <title>Line Chart</title> - <script src="../node_modules/moment/min/moment.min.js"></script> - <script src="../Chart.js"></script> - <script src="../node_modules/jquery/dist/jquery.min.js"></script> - <style> - canvas { - -webkit-box-shadow: 0 0 2...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
src/controllers/controller.bar.js
@@ -233,9 +233,9 @@ var datasetCount = this.getBarCount(); var tickWidth = (function() { - var min = xScale.getPixelForValue(null, 1) - xScale.getPixelForValue(null, 0); + var min = xScale.getPixelForTick(1) - xScale.getPixelForTick(0); for (var i = 2; i < this.getDataset().data.length; i++) { - ...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
src/core/core.scale.js
@@ -334,7 +334,11 @@ } // If it is in fact an object, dive in one more level if (typeof(rawValue) === "object") { - return getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y); + if (rawValue instanceof Date) { + return rawValue; + } else { + return getRightValue(this.isHorizontal()...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
src/scales/scale.time.js
@@ -164,9 +164,9 @@ if (helpers.isArray(unitDefinition.steps) && Math.ceil(this.tickRange / labelCapacity) < helpers.max(unitDefinition.steps)) { // Use one of the prefedined steps - for (var idx = 1; idx < unitDefinition.steps.length; ++idx) { + for (var idx = 0; idx < unitDefinition.steps.len...
true
Other
chartjs
Chart.js
28fc6841f302d595fdf78f441c6e030fe815dc07.json
Add tooltipFormat option to time scale options. Fix bars when displayed on a time scale. Updated sample files.
test/scale.time.tests.js
@@ -92,7 +92,35 @@ describe('Time scale tests', function() { scale.update(400, 50); // Counts down because the lines are drawn top to bottom - expect(scale.ticks).toEqual(['Jan 1, 2015', 'Jan 2, 2015', 'Jan 3, 2015', 'Jan 4, 2015', 'Jan 5, 2015', 'Jan 6, 2015', 'Jan 7, 2015', 'Jan 8, 2015', 'Jan 9, 2015', 'Jan...
true
Other
chartjs
Chart.js
d8704ee37ded3d81c5ea747c5b181357f5fe209b.json
Add legends to sample files
samples/bar.html
@@ -70,6 +70,13 @@ <h3>Legend</h3> data: barChartData, options: { responsive: true, + legend: { + position: 'top', + title: { + display: true, + t...
true
Other
chartjs
Chart.js
d8704ee37ded3d81c5ea747c5b181357f5fe209b.json
Add legends to sample files
samples/doughnut.html
@@ -101,7 +101,14 @@ <h3>Legend</h3> ] }, options: { - responsive: true + responsive: true, + legend: { + position: 'top', + title: { + display: true, + text: 'Our 2 Favorite Datasets' + ...
true
Other
chartjs
Chart.js
d8704ee37ded3d81c5ea747c5b181357f5fe209b.json
Add legends to sample files
samples/polar-area.html
@@ -59,6 +59,13 @@ <h3>Legend</h3> }, options: { responsive: true, + legend: { + position: 'top', + title: { + display: true, + text: 'Our Favorite Dataset' + } + }, scale...
true
Other
chartjs
Chart.js
d8704ee37ded3d81c5ea747c5b181357f5fe209b.json
Add legends to sample files
samples/radar.html
@@ -56,6 +56,13 @@ <h3>Legend</h3> },] }, options: { + legend: { + position: 'top', + title: { + display: true, + text: 'Our 3 Favorite Datasets' + } + }, scale: { ...
true
Other
chartjs
Chart.js
0b260d57cce124597d2f4186629a1409c98f8da5.json
Fix JSHint issue
src/core/core.controller.js
@@ -422,7 +422,7 @@ } else { var _this = this; - function getItemsForMode(mode) { + var getItemsForMode = function(mode) { switch (mode) { case 'single': return _this.getElementAtEvent(e); @@ -433,7 +433,7 @@ default: return e; } - } + }; this.acti...
false
Other
chartjs
Chart.js
0ed39c9fd702a0f281206137b01131080be8712b.json
Fix error in math helpers.
src/core/core.helpers.js
@@ -271,7 +271,7 @@ } else { return max; } - }, Number.MIN_VALUE); + }, Number.NEGATIVE_INFINITY); }; helpers.min = function(array) { return array.reduce(function(min, value) { @@ -280,7 +280,7 @@ } else { return min; } - }, Number.MAX_VALUE); + }, Number.POSITIVE_INFINITY); }; ...
false
Other
chartjs
Chart.js
24e4a924c4b6adcb787e13eb417b3e1845e9cf11.json
Add option to disable line drawing
docs/02-Line-Chart.md
@@ -120,6 +120,7 @@ The default options for line chart are defined in `Chart.defaults.Line`. Name | Type | Default | Description --- | --- | --- | --- +showLines | Boolean | true | If false, the lines between points are not drawn stacked | Boolean | false | If true, lines stack on top of each other along the y axi...
true
Other
chartjs
Chart.js
24e4a924c4b6adcb787e13eb417b3e1845e9cf11.json
Add option to disable line drawing
src/controllers/controller.line.js
@@ -7,6 +7,8 @@ helpers = Chart.helpers; Chart.defaults.line = { + showLines: true, + hover: { mode: "label" }, @@ -58,7 +60,8 @@ this.getDataset().metaData.splice(index, 0, point); // Make sure bezier control points are updated - this.updateBezierControlPoints(); + if (this.chart.option...
true
Other
chartjs
Chart.js
24e4a924c4b6adcb787e13eb417b3e1845e9cf11.json
Add option to disable line drawing
test/controller.line.tests.js
@@ -87,6 +87,7 @@ describe('Line controller tests', function() { type: 'line' }, options: { + showLines: true, scales: { xAxes: [{ id: 'firstXScaleID' @@ -114,6 +115,45 @@ describe('Line controller tests', function() { expect(chart.data.datasets[0].metaData[3].draw.calls.count()).to...
true
Other
chartjs
Chart.js
977d45a3e09393efbbdd2089e6e473f11c7f514b.json
Add some optimizations to often used functions
src/core/core.helpers.js
@@ -11,25 +11,25 @@ //-- Basic js utility methods helpers.each = function(loopable, callback, self, reverse) { - var additionalArgs = Array.prototype.slice.call(arguments, 3); // Check to see if null or undefined firstly. - if (loopable) { - if (loopable.length === +loopable.length) { - var i; - if (...
false
Other
chartjs
Chart.js
88fc6ecc5c5b7ed3c36e9baca74e9fbfa48a17c5.json
Fix orf/olf being undefined
src/core/core.tooltip.js
@@ -362,13 +362,14 @@ if (this._model.yAlign === 'center') { lf = function(x) { return x <= midX; }; rf = function(x) { return x > midX; }; - olf = function(x) { return x + size.width > _this._chart.width; }; - orf = function(x) { return x - size.width < 0; }; - yf = function(y) { return y <= mid...
false
Other
chartjs
Chart.js
d49b5b82c7d2f487cd858af278801aee3a564afe.json
Add test for scale
test/scale.linear.tests.js
@@ -321,6 +321,47 @@ describe('Linear Scale', function() { expect(scale.max).toBe(200); }); + it('Should correctly determine the min and max data values when stacked mode is turned on there are multiple types of datasets', function() { + var scaleID = 'myScale'; + + var mockData = { + datasets: [{ + type:...
false
Other
chartjs
Chart.js
57bd8c7715998a668d1a3b41daa8a520070969fe.json
Ignore null values when calculating scale
src/Chart.Core.js
@@ -409,8 +409,13 @@ maxSteps = Math.floor(drawingSize/(textSize * 1.5)), skipFitting = (minSteps >= maxSteps); - var maxValue = max(valuesArray), - minValue = min(valuesArray); + // Filter out null values since these would min() to zero + var values = []; + each(valuesArray, function( v ){ + ...
false
Other
chartjs
Chart.js
8487375730a0c932792a6b8b52922cfc875771ac.json
Update readme to latest beta version
README.md
@@ -7,7 +7,7 @@ ## v2.0 Beta -Current Release: [2.0.0-beta](https://github.com/nnnick/Chart.js/releases/tag/2.0.0-beta) +Current Release: [2.0.0-beta2](https://github.com/nnnick/Chart.js/releases/tag/2.0.0-beta2) The next generation and release of Chart.js has been well under way this year and we are very close...
false
Other
chartjs
Chart.js
fa6be2f772793525a9b2d68a58e5a6c9d31f426c.json
Fix inconsistent aspect ratio
src/controllers/controller.doughnut.js
@@ -12,7 +12,6 @@ module.exports = function(Chart) { // Boolean - Whether we animate scaling the Doughnut from the centre animateScale: false }, - aspectRatio: 1, hover: { mode: 'single' },
true
Other
chartjs
Chart.js
fa6be2f772793525a9b2d68a58e5a6c9d31f426c.json
Fix inconsistent aspect ratio
src/controllers/controller.polarArea.js
@@ -29,7 +29,6 @@ module.exports = function(Chart) { }, startAngle: -0.5 * Math.PI, - aspectRatio: 1, legendCallback: function(chart) { var text = []; text.push('<ul class="' + chart.id + '-legend">');
true
Other
chartjs
Chart.js
fa6be2f772793525a9b2d68a58e5a6c9d31f426c.json
Fix inconsistent aspect ratio
src/controllers/controller.radar.js
@@ -5,7 +5,6 @@ module.exports = function(Chart) { var helpers = Chart.helpers; Chart.defaults.radar = { - aspectRatio: 1, scale: { type: 'radialLinear' },
true
Other
chartjs
Chart.js
fa6be2f772793525a9b2d68a58e5a6c9d31f426c.json
Fix inconsistent aspect ratio
test/specs/platform.dom.tests.js
@@ -122,6 +122,9 @@ describe('Platform.dom', function() { }); it('should use default "chart" aspect ratio for render and display sizes', function() { + var ratio = Chart.defaults.doughnut.aspectRatio; + Chart.defaults.doughnut.aspectRatio = 1; + var chart = acquireChart({ type: 'doughnut', opt...
true
Other
chartjs
Chart.js
0075373bec751f681253355ad5237da68f129405.json
Add GA tracking code to docs
book.json
@@ -2,13 +2,17 @@ "root": "./docs", "author": "chartjs", "gitbook": "3.2.2", - "plugins": ["-lunr", "-search", "search-plus", "anchorjs", "chartjs"], + "plugins": ["-lunr", "-search", "search-plus", "anchorjs", "chartjs", "ga"], "pluginsConfig": { "anchorjs": { "icon": "#", "placement":...
false
Other
chartjs
Chart.js
20452ddb7c7569c87b4379b1940a0efd5e4a5043.json
Fix invalid link in area.md (#4257)
docs/charts/area.md
@@ -2,7 +2,7 @@ Both [line](line.md) and [radar](radar.md) charts support a `fill` option on the dataset object which can be used to create area between two datasets or a dataset and a boundary, i.e. the scale `origin`, `start` or `end` (see [filling modes](#filling-modes)). -> **Note:** this feature is implemente...
false
Other
chartjs
Chart.js
50e2ba953de8949347bbce55a7c0ff14e5dad09b.json
Use https to load scripts from CDN in samples (#4255)
samples/scales/time/combo.html
@@ -3,7 +3,7 @@ <head> <title>Line Chart - Combo Time Scale</title> - <script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> <script src="../../../dist/Chart.js"></script> <scri...
true
Other
chartjs
Chart.js
50e2ba953de8949347bbce55a7c0ff14e5dad09b.json
Use https to load scripts from CDN in samples (#4255)
samples/scales/time/line-point-data.html
@@ -3,7 +3,7 @@ <head> <title>Time Scale Point Data</title> - <script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> <script src="../../../dist/Chart.js"></script> <script src="...
true
Other
chartjs
Chart.js
50e2ba953de8949347bbce55a7c0ff14e5dad09b.json
Use https to load scripts from CDN in samples (#4255)
samples/scales/time/line.html
@@ -3,7 +3,7 @@ <head> <title>Line Chart</title> - <script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> <script src="../../../dist/Chart.js"></script> <script src="../../utils...
true
Other
chartjs
Chart.js
50e2ba953de8949347bbce55a7c0ff14e5dad09b.json
Use https to load scripts from CDN in samples (#4255)
samples/tooltips/custom-points.html
@@ -5,7 +5,7 @@ <title>Custom Tooltips using Data Points</title> <script src="../../dist/Chart.bundle.js"></script> <script src="../utils.js"></script> - <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jque...
true
Other
chartjs
Chart.js
c4c00b58342c5f46c5c54ec3caddd518c45fdf9f.json
Fix RequireJS doc to use UMD file instead (#4252)
docs/getting-started/integration.md
@@ -5,30 +5,32 @@ Chart.js can be integrated with plain JavaScript or with different module loader ## ES6 Modules ```javascript -import Chart from 'chart.js' -var myChart = new Chart(ctx, {...}) +import Chart from 'chart.js'; +var myChart = new Chart(ctx, {...}); ``` ## Script Tag ```html -<script src="path/...
false
Other
chartjs
Chart.js
3ff5d489c14bbc1cd6b7fab383095cd2c25afe71.json
Document the new filling modes and options (#4251)
docs/SUMMARY.md
@@ -27,6 +27,7 @@ * [Polar Area](charts/polar.md) * [Bubble](charts/bubble.md) * [Scatter](charts/scatter.md) + * [Area](charts/area.md) * [Mixed](charts/mixed.md) * [Axes](axes/README.md) * [Cartesian](axes/cartesian/README.md)
true
Other
chartjs
Chart.js
3ff5d489c14bbc1cd6b7fab383095cd2c25afe71.json
Document the new filling modes and options (#4251)
docs/charts/README.md
@@ -8,4 +8,6 @@ Chart.js comes with built-in chart types: * [doughnut and pie](./doughnut.md) * [bubble](./bubble.md) -To create a new chart type, see the [developer notes](../developers/charts.md#new-charts) \ No newline at end of file +[Area charts](area.md) can be built from a line or radar chart using the datas...
true
Other
chartjs
Chart.js
3ff5d489c14bbc1cd6b7fab383095cd2c25afe71.json
Document the new filling modes and options (#4251)
docs/charts/area.md
@@ -0,0 +1,72 @@ +# Area Charts + +Both [line](line.md) and [radar](radar.md) charts support a `fill` option on the dataset object which can be used to create area between two datasets or a dataset and a boundary, i.e. the scale `origin`, `start` or `end` (see [filling modes](#filling-modes)). + +> **Note:** this featu...
true
Other
chartjs
Chart.js
3ff5d489c14bbc1cd6b7fab383095cd2c25afe71.json
Document the new filling modes and options (#4251)
docs/charts/line.md
@@ -56,7 +56,7 @@ All point* properties can be specified as an array. If these are set to an array | `borderCapStyle` | `String` | Cap style of the line. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap) | `borderJoinStyle` | `String` | Line joint style. See [MDN](https://de...
true
Other
chartjs
Chart.js
3ff5d489c14bbc1cd6b7fab383095cd2c25afe71.json
Document the new filling modes and options (#4251)
docs/charts/radar.md
@@ -76,8 +76,8 @@ All point* properties can be specified as an array. If these are set to an array | `borderDashOffset` | `Number` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset) | `borderCapStyle` | `String` | Cap style of the line. See [M...
true
Other
chartjs
Chart.js
3ff5d489c14bbc1cd6b7fab383095cd2c25afe71.json
Document the new filling modes and options (#4251)
docs/style.css
@@ -9,3 +9,7 @@ a.anchorjs-link { a.anchorjs-link:hover { color: rgba(65, 131, 196, 1); } + +sup { + font-size: 0.75em !important; +}
true
Other
chartjs
Chart.js
9f793a715fd9033ae475d5d524733668b7492c91.json
Remove unnecessary variable
src/scales/scale.time.js
@@ -318,7 +318,7 @@ module.exports = function(Chart) { me.displayFormat = timeOpts.displayFormats[unit]; var stepSize = timeOpts.stepSize || determineStepSize(minTimestamp || dataMin, maxTimestamp || dataMax, unit, maxTicks); - var ticks = me.ticks = Chart.Ticks.generators.time({ + me.ticks = Chart.Ticks....
false
Other
chartjs
Chart.js
f0c6b3f8342e2406c250329336037a7f7004284e.json
Fix legend and title layout options update
src/core/core.layoutService.js
@@ -54,18 +54,19 @@ module.exports = function(Chart) { * Register a box to a chart. * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title. * @param {Chart} chart - the chart to use - * @param {ILayoutItem} layoutItem - the item to add to be layed out + * @param {ILay...
true
Other
chartjs
Chart.js
f0c6b3f8342e2406c250329336037a7f7004284e.json
Fix legend and title layout options update
src/plugins/plugin.legend.js
@@ -3,14 +3,15 @@ module.exports = function(Chart) { var helpers = Chart.helpers; + var layout = Chart.layoutService; var noop = helpers.noop; Chart.defaults.global.legend = { - display: true, position: 'top', - fullWidth: true, // marks that this box should take the full width of the canvas (pushing ...
true
Other
chartjs
Chart.js
f0c6b3f8342e2406c250329336037a7f7004284e.json
Fix legend and title layout options update
src/plugins/plugin.title.js
@@ -3,13 +3,14 @@ module.exports = function(Chart) { var helpers = Chart.helpers; + var layout = Chart.layoutService; var noop = helpers.noop; Chart.defaults.global.title = { display: false, position: 'top', - fullWidth: true, // marks that this box should take the full width of the canvas (pushing do...
true
Other
chartjs
Chart.js
f0c6b3f8342e2406c250329336037a7f7004284e.json
Fix legend and title layout options update
test/specs/plugin.legend.tests.js
@@ -11,6 +11,7 @@ describe('Legend block tests', function() { position: 'top', fullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes) reverse: false, + weight: 1000, // a callback that will handle onClick: jasmine.any(Function), @@ -391,6 +392...
true
Other
chartjs
Chart.js
f0c6b3f8342e2406c250329336037a7f7004284e.json
Fix legend and title layout options update
test/specs/plugin.title.tests.js
@@ -11,6 +11,7 @@ describe('Title block tests', function() { display: false, position: 'top', fullWidth: true, + weight: 2000, fontStyle: 'bold', padding: 10, text: '' @@ -231,6 +232,33 @@ describe('Title block tests', function() { expect(chart.titleBlock.options.display).toBe(false); }...
true
Other
chartjs
Chart.js
8811759e1c986fff719af3a0cd2cbdfdcef8ae79.json
Remove malformed comment Fixes https://github.com/chartjs/Chart.js/issues/4181
src/scales/scale.category.js
@@ -18,7 +18,7 @@ module.exports = function(Chart) { var data = this.chart.data; return (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels; }, - // Implement this so that + determineDataLimits: function() { var me = this; var labels = me.getLabels();
false
Other
chartjs
Chart.js
f2c569ef25320f26c442cfde4238a2fb536d4888.json
Enhance the responsive documentation Make sure to explain responsiveness limitations with CANVAS elements and how to correctly setup a responsive chart using a dedicated and relatively positioned div wrapper.
docs/general/responsive.md
@@ -1,10 +1,35 @@ # Responsive Charts -Chart.js provides a few options for controlling resizing behaviour of charts. +When it comes to change the chart size based on the window size, a major limitation is that the canvas *render* size (`canvas.width` and `.height`) can **not** be expressed with relative values, cont...
false
Other
chartjs
Chart.js
3ec6377f11a97310ea23ca7725a08c5c70eb35df.json
Fix hidden charts hanging the browser Ensure width cannot be greater than maxWidth. Similar to `minSize.height` calculation.
src/core/core.scale.js
@@ -356,7 +356,7 @@ module.exports = function(Chart) { } else { largestTextWidth += me.options.ticks.padding; } - minSize.width += largestTextWidth; + minSize.width = Math.min(me.maxWidth, minSize.width + largestTextWidth); me.paddingTop = tickFont.size / 2; me.paddingBottom = tic...
true
Other
chartjs
Chart.js
3ec6377f11a97310ea23ca7725a08c5c70eb35df.json
Fix hidden charts hanging the browser Ensure width cannot be greater than maxWidth. Similar to `minSize.height` calculation.
src/scales/scale.time.js
@@ -145,18 +145,19 @@ module.exports = function(Chart) { var unitSizeInMilliSeconds = unitDefinition.size; var sizeInUnits = Math.ceil((max - min) / unitSizeInMilliSeconds); var multiplier = 1; + var range = max - min; if (unitDefinition.steps) { // Have an array of steps var numSteps = unitDefin...
true
Other
chartjs
Chart.js
3ec6377f11a97310ea23ca7725a08c5c70eb35df.json
Fix hidden charts hanging the browser Ensure width cannot be greater than maxWidth. Similar to `minSize.height` calculation.
test/specs/scale.time.tests.js
@@ -471,4 +471,34 @@ describe('Time scale tests', function() { unit: 'day', }); }); + + it('does not create a negative width chart when hidden', function() { + var chart = window.acquireChart({ + type: 'line', + data: { + datasets: [{ + data: [] + }] + }, + options: { + scales: { + xA...
true
Other
chartjs
Chart.js
86fb98eb3720a7256764ff0bd8b34a23c0946ade.json
Remove extraneous period
README.md
@@ -33,7 +33,7 @@ You can find documentation at [www.chartjs.org/docs](http://www.chartjs.org/docs ## Contributing -Before submitting an issue or a pull request, please take a moment to look over the [contributing guidelines](https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md.) first. ...
false
Other
chartjs
Chart.js
ecac839f68791788d1d5a88fe8eb4d007c8f6fbd.json
Fix broken link to point to correct sample file.
samples/samples.js
@@ -111,7 +111,7 @@ path: 'scales/time/line.html' }, { title: 'Line (point data)', - path: 'scales/time/line.html' + path: 'scales/time/line-point-data.html' }, { title: 'Combo', path: 'scales/time/combo.html'
false
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/bar.md
@@ -1,6 +1,56 @@ # Bar A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend data, and the comparison of multiple data sets side by side. +{% chartjs %} +{ + "type": "bar", + "data": { + "labels": [ + "January", + "Febr...
true
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/bubble.md
@@ -2,6 +2,27 @@ A bubble chart is used to display three dimensions of data at the same time. The location of the bubble is determined by the first two dimensions and the corresponding horizontal and vertical axes. The third dimension is represented by the size of the individual bubbles. +{% chartjs %} +{ + "t...
true
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/doughnut.md
@@ -7,6 +7,28 @@ Pie and doughnut charts are effectively the same class in Chart.js, but have one They are also registered under two aliases in the `Chart` core. Other than their different default value, and different alias, they are exactly the same. +{% chartjs %} +{ + "type": "doughnut", + "data": { + ...
true
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/line.md
@@ -1,6 +1,33 @@ # Line A line chart is a way of plotting data points on a line. Often, it is used to show trend data, or the comparison of two data sets. +{% chartjs %} +{ + "type": "line", + "data": { + "labels": [ + "January", + "February", + "March", + ...
true
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/mixed.md
@@ -34,4 +34,39 @@ var mixedChart = new Chart(ctx, { }); ``` -At this point we have a chart rendering how we'd like. It's important to note that the default options for a line chart are not merged in this case. Only the options for the default type are merged in. In this case, that means that the default options fo...
true
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/polar.md
@@ -4,6 +4,32 @@ Polar area charts are similar to pie charts, but each segment has the same angle This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context. +{% chartjs %} +{ + "type": "polarArea", + "data": { + "label...
true
Other
chartjs
Chart.js
9ea18065add95d80a807e67f27018caadcfeb44c.json
Add live samples back to docs for each chart type
docs/charts/radar.md
@@ -3,6 +3,54 @@ A radar chart is a way of showing multiple data points and the variation between They are often useful for comparing the points of two or more different data sets. +{% chartjs %} +{ + "type": "radar", + "data": { + "labels": [ + "Eating", + "Drinking", + ...
true
Other
chartjs
Chart.js
c96ad6694559f7f280c4727d1f5e52a296d933a2.json
Update line-customTooltips.html (Re issue #4038 ) Add window scroll position to tooltip position calculation so they show up in the intended place instead of potentially off-screen! Moved tooltips inside the canvas parent container since they are being positioned in terms of its location
samples/tooltips/custom-line.html
@@ -48,7 +48,7 @@ tooltipEl = document.createElement('div'); tooltipEl.id = 'chartjs-tooltip'; tooltipEl.innerHTML = "<table></table>" - document.body.appendChild(tooltipEl); + this._chart.canvas.parentNode.appendChild(tooltipEl); } // Hide if no tooltip @@ -95,12 +95,13 @@ tableRoot...
true
Other
chartjs
Chart.js
c96ad6694559f7f280c4727d1f5e52a296d933a2.json
Update line-customTooltips.html (Re issue #4038 ) Add window scroll position to tooltip position calculation so they show up in the intended place instead of potentially off-screen! Moved tooltips inside the canvas parent container since they are being positioned in terms of its location
samples/tooltips/custom-pie.html
@@ -36,11 +36,10 @@ <body> <div id="canvas-holder" style="width: 300px;"> - <canvas id="chart-area" width="300" height="300" /> - </div> - - <div id="chartjs-tooltip"> - <table></table> + <canvas id="chart-area" width="300" height="300"></canvas> + <div id="chartjs-tooltip"> + <table></table> + </div> </d...
true
Other
chartjs
Chart.js
c96ad6694559f7f280c4727d1f5e52a296d933a2.json
Update line-customTooltips.html (Re issue #4038 ) Add window scroll position to tooltip position calculation so they show up in the intended place instead of potentially off-screen! Moved tooltips inside the canvas parent container since they are being positioned in terms of its location
samples/tooltips/custom-points.html
@@ -37,13 +37,16 @@ <body> <div id="canvas-holder1" style="width:75%;"> <canvas id="chart1"></canvas> + <div class="chartjs-tooltip" id="tooltip-0"></div> + <div class="chartjs-tooltip" id="tooltip-1"></div> </div> - <div class="chartjs-tooltip" id="tooltip-0"></div> - <div class="chartjs-tooltip" id="tooltip...
true
Other
chartjs
Chart.js
da1d1ca5125b7fc6e90dd49b0656f3d82311e8e7.json
Avoid errors when rendering serverside (#3909)
src/chart.js
@@ -56,4 +56,7 @@ plugins.push(require('./plugins/plugin.filler.js')(Chart)); Chart.plugins.register(plugins); -window.Chart = module.exports = Chart; +module.exports = Chart; +if (typeof window !== 'undefined') { + window.Chart = Chart; +}
true
Other
chartjs
Chart.js
da1d1ca5125b7fc6e90dd49b0656f3d82311e8e7.json
Avoid errors when rendering serverside (#3909)
src/core/core.helpers.js
@@ -669,6 +669,11 @@ module.exports = function(Chart) { }; // Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ helpers.requestAnimFrame = (function() { + if (typeof window === 'undefined') { + return function(callback) { + callback(); + }; + } retur...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
.gitignore
@@ -1,13 +1,12 @@ +/_book /coverage /custom /dist /docs/index.md /node_modules - .DS_Store .idea .vscode bower.json - *.log *.swp
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
book.json
@@ -0,0 +1,19 @@ +{ + "root": "./docs", + "author": "chartjs", + "gitbook": "3.2.2", + "plugins": ["anchorjs", "chartjs"], + "pluginsConfig": { + "anchorjs": { + "icon": "#", + "placement": "left", + "visible": "always" + }, + "theme-default": { + "showLevel": false, + "styles": {...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/00-Getting-Started.md
@@ -1,126 +0,0 @@ ---- -title: Getting started -anchor: getting-started ---- - -### Download Chart.js - -You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest) or just use these [Chart.js CDN](https://cdnjs.com/libraries/Chart.js) links. -If you download or clon...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/01-Chart-Configuration.md
@@ -1,511 +0,0 @@ ---- -title: Chart Configuration -anchor: chart-configuration ---- - -Chart.js provides a number of options for changing the behaviour of created charts. These configuration options can be changed on a per chart basis by passing in an options object when creating the chart. Alternatively, the global c...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/02-Scales.md
@@ -1,370 +0,0 @@ ---- -title: Scales -anchor: scales ---- - -Scales in v2.0 of Chart.js are significantly more powerful, but also different than those of v1.0. -* Multiple X & Y axes are supported. -* A built-in label auto-skip feature detects would-be overlapping ticks and labels and removes every nth label to keep t...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/03-Line-Chart.md
@@ -1,187 +0,0 @@ ---- -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. - -<div class="canvas-holder"> - <canvas width="250" height="125"></canvas> -</div> - -### Example Usa...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/04-Bar-Chart.md
@@ -1,176 +0,0 @@ ---- -title: Bar Chart -anchor: bar-chart ---- - -### Introduction -A bar chart is a way of showing data as bars. - -It is sometimes used to show trend data, and the comparison of multiple data sets side by side. - -<div class="canvas-holder"> - <canvas width="250" height="125"></canvas> -</div> - -##...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/05-Radar-Chart.md
@@ -1,125 +0,0 @@ ---- -title: Radar Chart -anchor: radar-chart ---- - -### Introduction -A radar chart is a way of showing multiple data points and the variation between them. - -They are often useful for comparing the points of two or more different data sets. - -<div class="canvas-holder"> - <canvas width="250" heig...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/06-Polar-Area-Chart.md
@@ -1,108 +0,0 @@ ---- -title: Polar Area Chart -anchor: polar-area-chart ---- -### Introduction -Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value. - -This type of chart is often useful when we want to show a comparison data simi...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/07-Pie-Doughnut-Chart.md
@@ -1,115 +0,0 @@ ---- -title: Pie & Doughnut Charts -anchor: doughnut-pie-chart ---- -### Introduction -Pie and doughnut charts are probably the most commonly used charts there are. They are divided into segments, the arc of each segment shows the proportional value of each piece of data. - -They are excellent at show...
true