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

Unified Diff: packages/charted/lib/svg/axis.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/charted/lib/selection/transition.dart ('k') | packages/charted/lib/svg/shapes/arc.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/charted/lib/svg/axis.dart
diff --git a/packages/charted/lib/svg/axis.dart b/packages/charted/lib/svg/axis.dart
index 81fc756f74f59a517b6d142d47a5a540ab7c57cc..474b4365ba273afe5efeb49ac3155905af297441 100644
--- a/packages/charted/lib/svg/axis.dart
+++ b/packages/charted/lib/svg/axis.dart
@@ -43,17 +43,17 @@ class SvgAxis {
/// Formatter for the tick labels
FormatFunction _tickFormat;
- SvgAxis({
- this.orientation: ORIENTATION_BOTTOM,
+ SvgAxis(
+ {this.orientation: ORIENTATION_BOTTOM,
this.innerTickSize: 6,
this.outerTickSize: 6,
this.tickPadding: 3,
Iterable tickValues,
FormatFunction tickFormat,
- Scale scale }) : scale = scale == null ? new LinearScale() : scale {
- _tickFormat = tickFormat == null
- ? this.scale.createTickFormatter()
- : tickFormat;
+ Scale scale})
+ : scale = scale == null ? new LinearScale() : scale {
+ _tickFormat =
+ tickFormat == null ? this.scale.createTickFormatter() : tickFormat;
_tickValues = isNullOrEmpty(tickValues) ? this.scale.ticks : tickValues;
}
@@ -63,13 +63,12 @@ class SvgAxis {
/// Draw an axis on each non-null element in selection
draw(Selection g, {SvgAxisTicks axisTicksBuilder, bool isRTL: false}) =>
- g.each((d, i, e) => create(
- e, g.scope, axisTicksBuilder: axisTicksBuilder, isRTL: isRTL));
+ g.each((d, i, e) =>
+ create(e, g.scope, axisTicksBuilder: axisTicksBuilder, isRTL: isRTL));
/// Create an axis on [element].
- create(Element element, SelectionScope scope, {
- SvgAxisTicks axisTicksBuilder, bool isRTL: false}) {
-
+ create(Element element, SelectionScope scope,
+ {SvgAxisTicks axisTicksBuilder, bool isRTL: false}) {
var group = scope.selectElements([element]),
older = _scales[element],
current = _scales[element] = scale.clone(),
@@ -101,10 +100,10 @@ class SvgAxis {
var enter = ticks.enter.appendWithCallback((d, i, e) {
var group = Namespace.createChildElement('g', e)
..attributes['class'] = 'tick'
- ..append(Namespace.createChildElement('line', e))
+ ..append(Namespace.createChildElement('line', e))
..append(Namespace.createChildElement('text', e)
- ..attributes['dy'] =
- isVertical ? '0.32em' : (isBottom ? '0.71em' : '0'));
+ ..attributes['dy'] =
+ isVertical ? '0.32em' : (isBottom ? '0.71em' : '0'));
if (!isInitialRender) {
group.style.setProperty('opacity', EPSILON.toString());
}
@@ -183,7 +182,7 @@ class SvgAxis {
range = current.rangeExtent;
if (path == null) {
path = Namespace.createChildElement('path', element)
- ..setAttribute('class', 'domain');
+ ..setAttribute('class', 'domain');
}
path.attributes['d'] = isLeft || isRight
? 'M${tickSize},${range.min}H0V${range.max}H${tickSize}'
« no previous file with comments | « packages/charted/lib/selection/transition.dart ('k') | packages/charted/lib/svg/shapes/arc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698