aboutsummaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1435320
blob: 0a56c51027f70486834eda430a73cbe0d3c8109a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
commit 8b513c9c65e5
Author: Ian Moody <moz-ian@perix.co.uk>
Date:   Fri Feb 2 17:50:09 2018 +0000

    Bug 1435320 - Specify a default empty object for the Chart.js table header. r=Honza a=lizzard
    
    So it doesn't break if one isn't supplied.
    Also document the header argument.
    
    MozReview-Commit-ID: 8UAVztN12Gw
    
    --HG--
    extra : source : 353a5c7a0bb3e975a299a340692a79342a87adcb
---
 devtools/client/shared/widgets/Chart.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git devtools/client/shared/widgets/Chart.js devtools/client/shared/widgets/Chart.js
index 069fc673e8f6..acc7bfa28a25 100644
--- devtools/client/shared/widgets/Chart.js
+++ devtools/client/shared/widgets/Chart.js
@@ -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.