Chromium Code Reviews| Index: runtime/bin/vmservice/observatory/lib/src/app/chart.dart |
| diff --git a/runtime/bin/vmservice/observatory/lib/src/app/chart.dart b/runtime/bin/vmservice/observatory/lib/src/app/chart.dart |
| index 3e6205ce43b852df5f11ab71ec60204f90e96566..0f1d310fccfab35b430f34c35b568f258100274e 100644 |
| --- a/runtime/bin/vmservice/observatory/lib/src/app/chart.dart |
| +++ b/runtime/bin/vmservice/observatory/lib/src/app/chart.dart |
| @@ -56,7 +56,7 @@ class DataTable { |
| } |
| /// Add a new column with [type], [label] and [role]. |
| - /// Roles are used for metadata such as 'interval' or 'annotation'. |
| + /// Roles are used for metadata such as 'interval', 'annotation', or 'domain'. |
| /// type must be: 'string', 'number', or 'boolean'. |
| void addRoleColumn(String type, String label, String role) { |
| _table.callMethod('addColumn', [new JsObject.jsify({ |
| @@ -66,9 +66,23 @@ class DataTable { |
| })]); |
| } |
| - /// Remove rows [start, end). |
| - void removeRows(int start, int end) { |
| - _table.callMethod('removeRows', [start, end]); |
| + int findColumnIndexWithLabel(String label) { |
|
koda
2014/08/11 16:34:53
Is this used? Implementation suggests not.
Cutch
2014/08/27 22:25:39
Done.
|
| + return 0; |
| + } |
| + |
| + /// Remove [count] columns starting with [start]. |
| + void removeColumns(int start, int count) { |
| + _table.callMethod('removeColumns', [start, count]); |
| + } |
| + |
| + /// Remove all columns in the table. |
| + void clearColumns() { |
| + removeColumns(0, columns); |
| + } |
| + |
| + /// Remove [count] rows starting with [start]. |
| + void removeRows(int start, int count) { |
| + _table.callMethod('removeRows', [start, count]); |
| } |
| /// Remove all rows in the table. |
| @@ -81,6 +95,11 @@ class DataTable { |
| void addRow(List row) { |
| _table.callMethod('addRow', [new JsArray.from(row)]); |
| } |
| + |
| + void addTimeOfDayValue(DateTime dt, value) { |
| + var array = new JsArray.from([dt.hour, dt.minute, dt.second]); |
| + addRow([array, value]); |
| + } |
| } |
| class Chart { |