From: Jukka Kurkela Date: Wed, 30 Oct 2019 22:41:41 +0000 (+0200) Subject: Update deprecated constructors (#6647) X-Git-Tag: v3.0.0-alpha~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63b7bd7a5b410329701efd7382e7721eddd6fedf;p=thirdparty%2FChart.js.git Update deprecated constructors (#6647) --- diff --git a/samples/charts/line/multi-axis.html b/samples/charts/line/multi-axis.html index d668205b3..8e9154793 100644 --- a/samples/charts/line/multi-axis.html +++ b/samples/charts/line/multi-axis.html @@ -57,7 +57,8 @@ window.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); - window.myLine = Chart.Line(ctx, { + window.myLine = new Chart(ctx, { + type: 'line', data: lineChartData, options: { responsive: true, diff --git a/samples/charts/polar-area.html b/samples/charts/polar-area.html index a667f443b..4321e279f 100644 --- a/samples/charts/polar-area.html +++ b/samples/charts/polar-area.html @@ -30,6 +30,7 @@ var color = Chart.helpers.color; var config = { data: { + type: 'polarArea', datasets: [{ data: [ randomScalingFactor(), @@ -79,7 +80,7 @@ window.onload = function() { var ctx = document.getElementById('chart-area'); - window.myPolarArea = Chart.PolarArea(ctx, config); + window.myPolarArea = new Chart(ctx, config); }; document.getElementById('randomizeData').addEventListener('click', function() { diff --git a/samples/charts/scatter/basic.html b/samples/charts/scatter/basic.html index bb1d697a8..54f140b3d 100644 --- a/samples/charts/scatter/basic.html +++ b/samples/charts/scatter/basic.html @@ -48,7 +48,8 @@ window.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); - window.myScatter = Chart.Scatter(ctx, { + window.myScatter = new Chart(ctx, { + type: 'scatter', data: scatterChartData, options: { title: { diff --git a/samples/charts/scatter/multi-axis.html b/samples/charts/scatter/multi-axis.html index 934baed2d..8492dda9c 100644 --- a/samples/charts/scatter/multi-axis.html +++ b/samples/charts/scatter/multi-axis.html @@ -83,7 +83,8 @@ window.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); - window.myScatter = Chart.Scatter(ctx, { + window.myScatter = new Chart(ctx, { + type: 'scatter', data: scatterChartData, options: { responsive: true, diff --git a/samples/scales/logarithmic/scatter.html b/samples/scales/logarithmic/scatter.html index 30c5facda..6374b97c1 100644 --- a/samples/scales/logarithmic/scatter.html +++ b/samples/scales/logarithmic/scatter.html @@ -124,7 +124,8 @@ window.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); - window.myScatter = Chart.Scatter(ctx, { + window.myScatter = new Chart(ctx, { + type: 'scatter', data: scatterChartData, options: { title: {