1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 tvcm.require('tvcm.ui.bar_chart');
9 tvcm.testSuite('tvcm.ui.bar_chart_test', function() {
10 test('singleSeries', function() {
11 var chart = new tvcm.ui.BarChart();
14 chart.chartTitle = 'Chart title';
16 {label: 'a', value: 100},
17 {label: 'b', value: 40},
18 {label: 'c', value: 20}
20 chart.setDataAndXLabelKey(data, 'label');
21 this.addHTMLOutput(chart);
24 test('twoSeries', function() {
25 var chart = new tvcm.ui.BarChart();
28 chart.chartTitle = 'Chart title';
30 {label: 'a', value1: 100, value2: 50},
31 {label: 'b', value1: 75, value2: 10},
32 {label: 'c', value1: 50, value2: 125}
34 chart.setDataAndXLabelKey(data, 'label');
35 this.addHTMLOutput(chart);