Rename 'scaleType' property to 'type; throughout samples & code

This commit is contained in:
Evert Timberg 2015-06-12 18:24:51 -04:00
parent 63b7b18b17
commit c5e4912319
8 changed files with 30 additions and 30 deletions

16
Chart.js vendored
View File

@ -4945,7 +4945,7 @@
var defaultConfig = {
scale: {
scaleType: "radialLinear",
type: "radialLinear",
display: true,
//Boolean - Whether to animate scaling the chart from the centre
@ -5002,7 +5002,7 @@
// Scale setup
var self = this;
var ScaleClass = Chart.scales.getScaleConstructor(this.options.scale.scaleType);
var ScaleClass = Chart.scales.getScaleConstructor(this.options.scale.type);
this.scale = new ScaleClass({
options: this.options.scale,
lineArc: true,
@ -5349,7 +5349,7 @@
defaults: {
scale: {
scaleType: "radialLinear",
type: "radialLinear",
display: true,
//Boolean - Whether to animate scaling the chart from the centre
@ -5639,7 +5639,7 @@
buildScale: function() {
var self = this;
var ScaleConstructor = Chart.scales.getScaleConstructor(this.options.scale.scaleType);
var ScaleConstructor = Chart.scales.getScaleConstructor(this.options.scale.type);
this.scale = new ScaleConstructor({
options: this.options.scale,
height: this.chart.height,
@ -5867,7 +5867,7 @@
scales: {
xAxes: [{
scaleType: "linear", // scatter should not use a dataset axis
type: "linear", // scatter should not use a dataset axis
display: true,
position: "bottom",
id: "x-axis-1", // need an ID so datasets can reference the scale
@ -5899,7 +5899,7 @@
},
}],
yAxes: [{
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: true,
position: "left",
id: "y-axis-1",
@ -6257,7 +6257,7 @@
this.scales = {};
helpers.each(this.options.scales.xAxes, function(xAxisOptions) {
var ScaleClass = Chart.scales.getScaleConstructor(xAxisOptions.scaleType);
var ScaleClass = Chart.scales.getScaleConstructor(xAxisOptions.type);
var scale = new ScaleClass({
ctx: this.chart.ctx,
options: xAxisOptions,
@ -6269,7 +6269,7 @@
}, this);
helpers.each(this.options.scales.yAxes, function(yAxisOptions) {
var ScaleClass = Chart.scales.getScaleConstructor(yAxisOptions.scaleType);
var ScaleClass = Chart.scales.getScaleConstructor(yAxisOptions.type);
var scale = new ScaleClass({
ctx: this.chart.ctx,
options: yAxisOptions,

16
Chart.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,7 @@
stacked: false,
scales: {
yAxes: [{
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: true,
position: "left",
id: "y-axis-1",
@ -85,7 +85,7 @@
fontFamily: "Helvetica Neue",
}
}, {
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: true,
position: "right",
id: "y-axis-2",

View File

@ -59,7 +59,7 @@
}
}],
yAxes: [{
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: false,
position: "left",
id: "y-axis-1",
@ -90,7 +90,7 @@
fontFamily: "Helvetica Neue",
}
}, {
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: false,
position: "right",
id: "y-axis-2",

View File

@ -103,7 +103,7 @@
}
}],
yAxes: [{
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: true,
position: "left",
id: "y-axis-1",
@ -134,7 +134,7 @@
fontFamily: "Helvetica Neue",
}
}, {
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: true,
position: "right",
id: "y-axis-2",

View File

@ -9,7 +9,7 @@
var defaultConfig = {
scale: {
scaleType: "radialLinear",
type: "radialLinear",
display: true,
//Boolean - Whether to animate scaling the chart from the centre
@ -66,7 +66,7 @@
// Scale setup
var self = this;
var ScaleClass = Chart.scales.getScaleConstructor(this.options.scale.scaleType);
var ScaleClass = Chart.scales.getScaleConstructor(this.options.scale.type);
this.scale = new ScaleClass({
options: this.options.scale,
lineArc: true,

View File

@ -12,7 +12,7 @@
defaults: {
scale: {
scaleType: "radialLinear",
type: "radialLinear",
display: true,
//Boolean - Whether to animate scaling the chart from the centre
@ -302,7 +302,7 @@
buildScale: function() {
var self = this;
var ScaleConstructor = Chart.scales.getScaleConstructor(this.options.scale.scaleType);
var ScaleConstructor = Chart.scales.getScaleConstructor(this.options.scale.type);
this.scale = new ScaleConstructor({
options: this.options.scale,
height: this.chart.height,

View File

@ -12,7 +12,7 @@
scales: {
xAxes: [{
scaleType: "linear", // scatter should not use a dataset axis
type: "linear", // scatter should not use a dataset axis
display: true,
position: "bottom",
id: "x-axis-1", // need an ID so datasets can reference the scale
@ -44,7 +44,7 @@
},
}],
yAxes: [{
scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
type: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
display: true,
position: "left",
id: "y-axis-1",
@ -402,7 +402,7 @@
this.scales = {};
helpers.each(this.options.scales.xAxes, function(xAxisOptions) {
var ScaleClass = Chart.scales.getScaleConstructor(xAxisOptions.scaleType);
var ScaleClass = Chart.scales.getScaleConstructor(xAxisOptions.type);
var scale = new ScaleClass({
ctx: this.chart.ctx,
options: xAxisOptions,
@ -414,7 +414,7 @@
}, this);
helpers.each(this.options.scales.yAxes, function(yAxisOptions) {
var ScaleClass = Chart.scales.getScaleConstructor(yAxisOptions.scaleType);
var ScaleClass = Chart.scales.getScaleConstructor(yAxisOptions.type);
var scale = new ScaleClass({
ctx: this.chart.ctx,
options: yAxisOptions,