OLD | NEW |
1 // | 1 // |
2 // Copyright 2014 Google Inc. All rights reserved. | 2 // Copyright 2014 Google Inc. All rights reserved. |
3 // | 3 // |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file or at | 5 // license that can be found in the LICENSE file or at |
6 // https://developers.google.com/open-source/licenses/bsd | 6 // https://developers.google.com/open-source/licenses/bsd |
7 // | 7 // |
8 | 8 |
9 library charted.svg.shapes; | 9 library charted.svg.shapes; |
10 | 10 |
11 import "dart:html" show Element; | 11 import "dart:html" show Element; |
12 import "dart:math" as math; | 12 import "dart:math" as math; |
13 | 13 |
14 import "package:charted/core/utils.dart"; | 14 import "package:charted/core/utils.dart"; |
15 import "package:charted/core/interpolators.dart"; | 15 import "package:charted/core/interpolators.dart"; |
16 import "package:charted/selection/selection.dart"; | 16 import "package:charted/selection/selection.dart"; |
17 | 17 |
18 part 'shapes/arc.dart'; | 18 part 'shapes/arc.dart'; |
19 part 'shapes/line.dart'; | 19 part 'shapes/line.dart'; |
20 part 'shapes/area.dart'; | 20 part 'shapes/area.dart'; |
21 part 'shapes/rect.dart'; | 21 part 'shapes/rect.dart'; |
22 | 22 |
23 /// Common interface provided by all shape implementations. | 23 /// Common interface provided by all shape implementations. |
24 abstract class SvgShape { | 24 abstract class SvgShape { |
25 /// Generate the path based on the passed data [d], element index [i] | 25 /// Generate the path based on the passed data [d], element index [i] |
26 /// and the element [e]. This method follows the same signature as the | 26 /// and the element [e]. This method follows the same signature as the |
27 /// other callbacks used by selection API - [ChartedCallback<String>] | 27 /// other callbacks used by selection API - [ChartedCallback<String>] |
28 String path(d, int i, Element e); | 28 String path(d, int i, Element e); |
29 } | 29 } |
OLD | NEW |