-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clip option to scale configuration to allow unclipped scales (#11404
) * Add clip option to scale configuration to allow unclipped scales * add images * fix cc * change name of function
- Loading branch information
1 parent
095a984
commit 79f1a0a
Showing
8 changed files
with
249 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
test/fixtures/core.layouts/stacked-boxes-max-index-without-clip.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
module.exports = { | ||
config: { | ||
type: 'line', | ||
data: { | ||
datasets: [ | ||
{data: [{x: 5, y: 1}, {x: 10, y: 2}, {x: 5, y: 3}], borderColor: 'red'}, | ||
{data: [{x: 5, y: 1}, {x: 10, y: 2}, {x: 5, y: 3}], yAxisID: 'y1', xAxisID: 'x1', borderColor: 'green'}, | ||
{data: [{x: 5, y: 1}, {x: 10, y: 2}, {x: 5, y: 3}], yAxisID: 'y2', xAxisID: 'x2', borderColor: 'blue'}, | ||
], | ||
labels: ['tick1', 'tick2', 'tick3'] | ||
}, | ||
options: { | ||
plugins: false, | ||
scales: { | ||
x: { | ||
type: 'linear', | ||
position: 'bottom', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
bounds: 'data', | ||
border: { | ||
color: 'red' | ||
}, | ||
ticks: { | ||
autoSkip: false, | ||
maxRotation: 0, | ||
count: 3 | ||
}, | ||
max: 7 | ||
}, | ||
x1: { | ||
type: 'linear', | ||
position: 'bottom', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
bounds: 'data', | ||
border: { | ||
color: 'green' | ||
}, | ||
ticks: { | ||
autoSkip: false, | ||
maxRotation: 0, | ||
count: 3 | ||
}, | ||
max: 7 | ||
}, | ||
x2: { | ||
type: 'linear', | ||
position: 'bottom', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
bounds: 'data', | ||
border: { | ||
color: 'blue' | ||
}, | ||
ticks: { | ||
autoSkip: false, | ||
maxRotation: 0, | ||
count: 3 | ||
}, | ||
max: 7 | ||
}, | ||
y: { | ||
type: 'linear', | ||
position: 'left', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
border: { | ||
color: 'red' | ||
}, | ||
ticks: { | ||
precision: 0 | ||
} | ||
}, | ||
y1: { | ||
type: 'linear', | ||
position: 'left', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
border: { | ||
color: 'green' | ||
}, | ||
ticks: { | ||
precision: 0 | ||
} | ||
}, | ||
y2: { | ||
type: 'linear', | ||
position: 'left', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
border: { | ||
color: 'blue', | ||
}, | ||
ticks: { | ||
precision: 0 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
options: { | ||
spriteText: true, | ||
canvas: { | ||
height: 384, | ||
width: 384 | ||
} | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions
115
test/fixtures/core.layouts/stacked-boxes-max-without-clip.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
module.exports = { | ||
config: { | ||
type: 'line', | ||
data: { | ||
datasets: [ | ||
{data: [{x: 1, y: 5}, {x: 2, y: 10}, {x: 3, y: 5}], borderColor: 'red'}, | ||
{data: [{x: 1, y: 5}, {x: 2, y: 10}, {x: 3, y: 5}], yAxisID: 'y1', xAxisID: 'x1', borderColor: 'green'}, | ||
{data: [{x: 1, y: 5}, {x: 2, y: 10}, {x: 3, y: 5}], yAxisID: 'y2', xAxisID: 'x2', borderColor: 'blue'}, | ||
], | ||
labels: ['tick1', 'tick2', 'tick3'] | ||
}, | ||
options: { | ||
plugins: false, | ||
scales: { | ||
x: { | ||
type: 'linear', | ||
position: 'bottom', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
bounds: 'data', | ||
border: { | ||
color: 'red' | ||
}, | ||
ticks: { | ||
autoSkip: false, | ||
maxRotation: 0, | ||
count: 3 | ||
} | ||
}, | ||
x1: { | ||
type: 'linear', | ||
position: 'bottom', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
bounds: 'data', | ||
border: { | ||
color: 'green' | ||
}, | ||
ticks: { | ||
autoSkip: false, | ||
maxRotation: 0, | ||
count: 3 | ||
} | ||
}, | ||
x2: { | ||
type: 'linear', | ||
position: 'bottom', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
bounds: 'data', | ||
border: { | ||
color: 'blue' | ||
}, | ||
ticks: { | ||
autoSkip: false, | ||
maxRotation: 0, | ||
count: 3 | ||
} | ||
}, | ||
y: { | ||
type: 'linear', | ||
position: 'left', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
border: { | ||
color: 'red' | ||
}, | ||
ticks: { | ||
precision: 0 | ||
}, | ||
max: 7 | ||
}, | ||
y1: { | ||
type: 'linear', | ||
position: 'left', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
border: { | ||
color: 'green' | ||
}, | ||
ticks: { | ||
precision: 0 | ||
}, | ||
max: 7 | ||
}, | ||
y2: { | ||
type: 'linear', | ||
position: 'left', | ||
stack: '1', | ||
offset: true, | ||
clip: false, | ||
border: { | ||
color: 'blue', | ||
}, | ||
ticks: { | ||
precision: 0 | ||
}, | ||
max: 7 | ||
} | ||
} | ||
} | ||
}, | ||
options: { | ||
spriteText: true, | ||
canvas: { | ||
height: 384, | ||
width: 384 | ||
} | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.