Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(621)

Side by Side Diff: pkg/js/example/chart.dart

Issue 1449053004: pkg/js: moved example code to https://github.com/google/chartjs.dart/ (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/js/example/README.md ('k') | pkg/js/example/chart_js_example.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library chart;
6
7 import 'dart:html';
8 import 'package:js/js.dart';
9
10 @JS()
11 class Chart {
12 external Chart(CanvasRenderingContext2D ctx);
13
14 external dynamic Line(Data data, Options options);
15 }
16
17 @JS()
18 @anonymous
19 class Data {
20 external List get labels;
21 external List<DataSet> get datasets;
22
23 external factory Data({List<String> labels, List<DataSet> datasets});
24 }
25
26 /// Minimal implementation of dataset for line chart
27 ///
28 /// http://www.chartjs.org/docs/#line-chart-data-structure
29 @JS()
30 @anonymous
31 class DataSet {
32 external String get label;
33 external String get fillColor;
34 external String get strokeColor;
35 external String get pointColor;
36 external String get pointStrokeColor;
37 external String get pointHighlightFill;
38 external String get pointHighlightStroke;
39
40 external List<num> get data;
41
42 external factory DataSet(
43 {String label,
44 String fillColor,
45 String strokeColor,
46 String pointColor,
47 String pointStrokeColor,
48 String pointHighlightFill,
49 String pointHighlightStroke,
50 List<num> data});
51 }
52
53 /// Minimal implementation of options
54 ///
55 /// http://www.chartjs.org/docs/#getting-started-global-chart-configuration
56 @JS()
57 @anonymous
58 class Options {
59 external bool get responsive;
60
61 external factory Options({bool responsive});
62 }
OLDNEW
« no previous file with comments | « pkg/js/example/README.md ('k') | pkg/js/example/chart_js_example.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698