Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New config parameter options.legend.align, for controlling alignment of legend blocks in horizontal/vertical legends. - Maintains backward compatibility for legends positioned on the left/right by defaulting to 'start'. - Replacing nearby pixel unit tests for legend with image based tests - Documentation for options.legend.align
- Loading branch information
Dave Kichler
committed
Mar 18, 2019
1 parent
75e76cf
commit c05a2a6
Showing
19 changed files
with
231 additions
and
361 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
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-left-center-mulitiline.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], | ||
"datasets": [{ | ||
"data": [10, 20, 30, 40, 50, 60, 70, 10, 20, 30, 40, 50, 60, 70, 10, 20, 30] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "left", | ||
"align": "center" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Binary file added
BIN
+35.9 KB
test/fixtures/plugin.legend/legend-doughnut-left-center-mulitiline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-left-center-single.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0"], | ||
"datasets": [{ | ||
"data": [10] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "left", | ||
"align": "center" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-left-end-mulitiline.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], | ||
"datasets": [{ | ||
"data": [10, 20, 30, 40, 50, 60, 70, 10, 20, 30, 40, 50, 60, 70, 10, 20, 30] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "left", | ||
"align": "end" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-left-start-mulitiline.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], | ||
"datasets": [{ | ||
"data": [10, 20, 30, 40, 50, 60, 70, 10, 20, 30, 40, 50, 60, 70, 10, 20, 30] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "left", | ||
"align": "start" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Binary file added
BIN
+36.1 KB
test/fixtures/plugin.legend/legend-doughnut-left-start-mulitiline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-top-center-mulitiline.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], | ||
"datasets": [{ | ||
"data": [10, 20, 30, 40, 50, 60, 70, 10, 20, 30, 40, 50, 60, 70, 10, 20, 30] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "top", | ||
"align": "center" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Binary file added
BIN
+28.9 KB
test/fixtures/plugin.legend/legend-doughnut-top-center-mulitiline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-top-center-single.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0"], | ||
"datasets": [{ | ||
"data": [10] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "top", | ||
"align": "center" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-top-end-mulitiline.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], | ||
"datasets": [{ | ||
"data": [10, 20, 30, 40, 50, 60, 70, 10, 20, 30, 40, 50, 60, 70, 10, 20, 30] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "top", | ||
"align": "end" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
test/fixtures/plugin.legend/legend-doughnut-top-start-mulitiline.json
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,24 @@ | ||
{ | ||
"config": { | ||
"type": "doughnut", | ||
"data": { | ||
"labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"], | ||
"datasets": [{ | ||
"data": [10, 20, 30, 40, 50, 60, 70, 10, 20, 30, 40, 50, 60, 70, 10, 20, 30] | ||
}] | ||
}, | ||
"options": { | ||
"responsive": false, | ||
"legend": { | ||
"position": "top", | ||
"align": "start" | ||
} | ||
} | ||
}, | ||
"options": { | ||
"canvas": { | ||
"height": 256, | ||
"width": 512 | ||
} | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.