mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1435320 - Specify a default empty object for the Chart.js table header. r=Honza
So it doesn't break if one isn't supplied. Also document the header argument. MozReview-Commit-ID: 8UAVztN12Gw --HG-- extra : rebase_source : dc9485d8326d32027dfa9ad05fce71e600eb2988
This commit is contained in:
parent
122bb9bfa7
commit
6d73d668f5
7
devtools/client/shared/widgets/Chart.js
vendored
7
devtools/client/shared/widgets/Chart.js
vendored
@ -322,6 +322,12 @@ function createPieChart(document, { data, width, height, centerX, centerY, radiu
|
||||
* label1: total => l10n.getFormatStr("...", total), // 5
|
||||
* label2: total => l10n.getFormatStr("...", total), // 9
|
||||
* }
|
||||
* - header: an object specifying strings to use for table column
|
||||
* headers
|
||||
* e.g. {
|
||||
* label1: l10n.getStr(...),
|
||||
* label2: l10n.getStr(...),
|
||||
* }
|
||||
* @return TableChart
|
||||
* A table chart proxy instance, which emits the following events:
|
||||
* - "mouseover", when the mouse enters a row
|
||||
@ -331,6 +337,7 @@ function createPieChart(document, { data, width, height, centerX, centerY, radiu
|
||||
function createTableChart(document, { title, data, strings, totals, header }) {
|
||||
strings = strings || {};
|
||||
totals = totals || {};
|
||||
header = header || {};
|
||||
let isPlaceholder = false;
|
||||
|
||||
// If there's no data available, display an empty placeholder.
|
||||
|
Loading…
Reference in New Issue
Block a user