Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(246)

Issue 194400043: Small style tweaks to charts package that should not have a runtime impact. Make implementation cla…

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 3 months ago by jacobr
Modified:
9 years, 2 months ago
Reviewers:
midoringo, prsd, ferhat
CC:
sigmund, vsm, leafp_google.com
Base URL:
git@github.com:google/charted.git@master
Visibility:
Public.

Description

Small style tweaks to charts package that should not have a runtime impact. Make implementation classes match the type signatures of base classes. Add a few generic types that weren't specified. Cleanup cases where a double was used as an index. Move super calls to end of constructor initialization list matching the Dart style guide. https://www.dartlang.org/articles/style-guide/#do-place-the-super-call-last-in-a-constructor-initialization-list BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -47 lines) Patch
M lib/charts/renderers/stackedbar_chart_renderer.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/charts/renderers/waterfall_chart_renderer.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/charts/src/chart_area_impl.dart View 2 chunks +8 lines, -7 lines 0 comments Download
M lib/charts/src/chart_config_impl.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/charts/src/chart_data_impl.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/charts/transformers/aggregation.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M lib/charts/transformers/aggregation_transformer.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M lib/charts/transformers/transpose_transformer.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/core/core.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M lib/core/lists.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/core/rect.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M lib/locale/number_format.dart View 3 chunks +6 lines, -9 lines 0 comments Download
M lib/locale/time_scale.dart View 2 chunks +7 lines, -4 lines 0 comments Download
M lib/selection/selection_impl.dart View 6 chunks +7 lines, -7 lines 0 comments Download
M lib/svg/svg_line.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4
jacobr
Small style tweaks to charts package that should not have a runtime impact. Make implementation ...
9 years, 3 months ago (2015-01-23 23:01:24 UTC) #1
jacobr
ping? On Fri, Jan 23, 2015 at 3:01 PM, <jacobr@google.com> wrote: > Reviewers: midoringo_google.com, ferhat_google.com, ...
9 years, 2 months ago (2015-02-02 18:54:08 UTC) #2
prsd_google.com
Hi Jacob, The changes look good. Will you be able to submit a pull-request on ...
9 years, 2 months ago (2015-02-02 19:12:28 UTC) #3
jacobr
9 years, 2 months ago (2015-02-02 21:40:01 UTC) #4
Done. Created a pull request.
https://github.com/google/charted/pull/76

i tweaked the cl slightly since the original fixing an additional missed
style nit and fixing some internal charted library code that depended on
axes being mutable when the base class definition was immutable.

On Mon, Feb 2, 2015 at 11:12 AM, Prasad Sunkari <prsd@google.com> wrote:

> Hi Jacob,
>
> The changes look good.
> Will you be able to submit a pull-request on
> http://github.com/google/charted
>
> Thanks.
>
> On Mon, Feb 2, 2015 at 10:53 AM, Jacob Richman <jacobr@google.com> wrote:
>
>> ping?
>>
>> On Fri, Jan 23, 2015 at 3:01 PM, <jacobr@google.com> wrote:
>>
>>> Reviewers: midoringo_google.com, ferhat_google.com, prsd_google.com,
>>>
>>> Message:
>>> Small style tweaks to charts package that should not have a runtime
>>> impact. Make implementation classes match the type signatures of base
>>> classes. Add a few generic types that weren't specified. Cleanup cases
>>> where a double was used as an index. Move super calls to end of
>>> constructor initialization list matching the Dart style guide.
>>> https://www.dartlang.org/articles/style-guide/#do-
>>> place-the-super-call-last-in-a-constructor-initialization-list
>>>
>>> Description:
>>> Small style tweaks to charts package that should not have a runtime
>>> impact. Make implementation classes match the type signatures of base
>>> classes. Add a few generic types that weren't specified. Cleanup cases
>>> where a double was used as an index. Move super calls to end of
>>> constructor initialization list matching the Dart style guide.
>>> https://www.dartlang.org/articles/style-guide/#do-
>>> place-the-super-call-last-in-a-constructor-initialization-list
>>>
>>> BUG=
>>>
>>> Please review this at https://codereview.appspot.com/194400043/
>>>
>>> Affected files (+48, -47 lines):
>>>   M lib/charts/renderers/stackedbar_chart_renderer.dart
>>>   M lib/charts/renderers/waterfall_chart_renderer.dart
>>>   M lib/charts/src/chart_area_impl.dart
>>>   M lib/charts/src/chart_config_impl.dart
>>>   M lib/charts/src/chart_data_impl.dart
>>>   M lib/charts/transformers/aggregation.dart
>>>   M lib/charts/transformers/aggregation_transformer.dart
>>>   M lib/charts/transformers/transpose_transformer.dart
>>>   M lib/core/core.dart
>>>   M lib/core/lists.dart
>>>   M lib/core/rect.dart
>>>   M lib/locale/number_format.dart
>>>   M lib/locale/time_scale.dart
>>>   M lib/selection/selection_impl.dart
>>>   M lib/svg/svg_line.dart
>>>
>>>
>>> Index: lib/charts/renderers/stackedbar_chart_renderer.dart
>>> diff --git a/lib/charts/renderers/stackedbar_chart_renderer.dart
>>> b/lib/charts/renderers/stackedbar_chart_renderer.dart
>>> index 5d2e9db8e8c4144a648e82b4864ddf1b02613f02..
>>> 0edd82dbdf5f04de1a019d1cc5a6f5dd5ba4003e 100644
>>> --- a/lib/charts/renderers/stackedbar_chart_renderer.dart
>>> +++ b/lib/charts/renderers/stackedbar_chart_renderer.dart
>>> @@ -72,7 +72,7 @@ class StackedBarChartRenderer extends BaseRenderer {
>>>        ic = i;
>>>      });
>>>
>>> -    ic = 1e100;
>>> +    ic = 1000000000;
>>>      var enter = bar.enter.append('rect')
>>>        ..classed('bar')
>>>        ..styleWithCallback('fill', (d, i, c) =>
>>> colorForKey(_reverseIdx(i)))
>>> Index: lib/charts/renderers/waterfall_chart_renderer.dart
>>> diff --git a/lib/charts/renderers/waterfall_chart_renderer.dart
>>> b/lib/charts/renderers/waterfall_chart_renderer.dart
>>> index aa4333b054ca63f01152feda3361936a85562c56..
>>> 06bde5b96c8aed62b65535d0b517dc89c3c410aa 100644
>>> --- a/lib/charts/renderers/waterfall_chart_renderer.dart
>>> +++ b/lib/charts/renderers/waterfall_chart_renderer.dart
>>> @@ -96,7 +96,7 @@ class WaterfallChartRenderer extends BaseRenderer {
>>>        ic = i;
>>>      });
>>>
>>> -    ic = 1e100;
>>> +    ic = 1000000000;
>>>      var enter = bar.enter.append('rect')
>>>        ..classed('bar')
>>>        ..styleWithCallback('fill', (d, i, c) =>
>>> colorForKey(_reverseIdx(i)))
>>> Index: lib/charts/src/chart_area_impl.dart
>>> diff --git a/lib/charts/src/chart_area_impl.dart
>>> b/lib/charts/src/chart_area_impl.dart
>>> index b3211f9a5452c42b7cc2ddf793a015ced0d08b00..
>>> d7a4be09825a773f6581b5bc2e2b505c59f14fa2 100644
>>> --- a/lib/charts/src/chart_area_impl.dart
>>> +++ b/lib/charts/src/chart_area_impl.dart
>>> @@ -508,7 +508,7 @@ class _ChartArea implements ChartArea {
>>>      if (!_pendingLegendUpdate) return;
>>>      if (_config == null || _config.legend == null || _series.isEmpty)
>>> return;
>>>
>>> -    List legend = [];
>>> +    var legend = <ChartLegendItem>[];
>>>      List seriesByColumn =
>>>          new List.generate(data.columns.length, (i) => new List());
>>>
>>> @@ -596,12 +596,13 @@ class _ChartArea implements ChartArea {
>>>
>>>  class _ChartAreaLayout implements ChartAreaLayout {
>>>    @override
>>> -  final Map<String, Rect> axes = {
>>> -    ORIENTATION_LEFT: const Rect(),
>>> -    ORIENTATION_RIGHT: const Rect(),
>>> -    ORIENTATION_TOP: const Rect(),
>>> -    ORIENTATION_BOTTOM: const Rect()
>>> -  };
>>> +  final axes =
>>> +      new UnmodifiableMapView({
>>> +        ORIENTATION_LEFT: const Rect(),
>>> +        ORIENTATION_RIGHT: const Rect(),
>>> +        ORIENTATION_TOP: const Rect(),
>>> +        ORIENTATION_BOTTOM: const Rect()
>>> +      });
>>>
>>>    @override
>>>    Rect renderArea;
>>> Index: lib/charts/src/chart_config_impl.dart
>>> diff --git a/lib/charts/src/chart_config_impl.dart
>>> b/lib/charts/src/chart_config_impl.dart
>>> index b06c1b87f22c21cff3660cccfdcdfc384c1af184..
>>> bb4364b7d7b01d43c8846203546c44e0b1c5ad67 100644
>>> --- a/lib/charts/src/chart_config_impl.dart
>>> +++ b/lib/charts/src/chart_config_impl.dart
>>> @@ -30,7 +30,7 @@ class _ChartConfig extends ChangeNotifier implements
>>> ChartConfig {
>>>    ChartLegend legend;
>>>
>>>    @override
>>> -  List<String> displayedMeasureAxes;
>>> +  Iterable<String> displayedMeasureAxes;
>>>
>>>    @override
>>>    bool renderDimensionAxes = true;
>>> Index: lib/charts/src/chart_data_impl.dart
>>> diff --git a/lib/charts/src/chart_data_impl.dart
>>> b/lib/charts/src/chart_data_impl.dart
>>> index f01e2776f47eea09d1829784e722c022bcb9f3c4..
>>> 723b8eba3c6a8650aeb8f2802489d9e961b703d4 100644
>>> --- a/lib/charts/src/chart_data_impl.dart
>>> +++ b/lib/charts/src/chart_data_impl.dart
>>> @@ -26,7 +26,7 @@ class _ChartData extends ChangeNotifier implements
>>> ChartData {
>>>      // Create a copy of columns.  We do not currently support
>>>      // changes to the list of columns.  Any changes to the spec
>>>      // will be applied at the next ChartBase.draw();
>>> -    this._columns = new List.from(value);
>>> +    this._columns = new List<ChartColumnSpec>.from(value);
>>>    }
>>>
>>>    Iterable<ChartColumnSpec> get columns => _columns;
>>> Index: lib/charts/transformers/aggregation.dart
>>> diff --git a/lib/charts/transformers/aggregation.dart
>>> b/lib/charts/transformers/aggregation.dart
>>> index 5bdb7b62dd3eb4c2aa4c7ec5e1ce192ffdb9c3ab..
>>> 3a8978fb46e57dacd5d092b786c3c7352160d951 100644
>>> --- a/lib/charts/transformers/aggregation.dart
>>> +++ b/lib/charts/transformers/aggregation.dart
>>> @@ -254,9 +254,9 @@ class AggregationModel {
>>>
>>>      // Create both when object is created and groupBy is called
>>>      // Reuse dimension enumerations if possible.
>>> -    List<Map> oldDimToInt = _dimToIntMap;
>>> -    _dimToIntMap = new List.generate(_dimFields.length,
>>> -        (i) => i < _dimPrefixLength ? oldDimToInt[i] : new Map());
>>> +    var oldDimToInt = _dimToIntMap;
>>> +    _dimToIntMap = new List<Map<dynamic, int>>.generate(_dimFields.
>>> length,
>>> +        (i) => i < _dimPrefixLength ? oldDimToInt[i] : new Map<dynamic,
>>> int>());
>>>    }
>>>
>>>    /**
>>> Index: lib/charts/transformers/aggregation_transformer.dart
>>> diff --git a/lib/charts/transformers/aggregation_transformer.dart
>>> b/lib/charts/transformers/aggregation_transformer.dart
>>> index d48c4b4ae14d2f8c8285962ef0060c6757fe30d7..
>>> 81991757cf13559472ef9b5084d5aae285bbca3d 100644
>>> --- a/lib/charts/transformers/aggregation_transformer.dart
>>> +++ b/lib/charts/transformers/aggregation_transformer.dart
>>> @@ -98,14 +98,14 @@ class AggregationTransformer extends ChangeNotifier
>>>
>>>      // Process rows.
>>>      rows.clear();
>>> -    var transformedRows = [];
>>> +    var transformedRows = <Iterable>[];
>>>      for (var value in
_model.valuesForDimension(_dimensionColumnIndices[0]))
>>> {
>>>        _generateAggregatedRow(transformedRows, [value]);
>>>      }
>>>      rows.addAll(transformedRows);
>>>
>>>      // Process columns.
>>> -    columns = new List.generate(_selectedColumns.length, (index) =>
>>> +    columns = new List<ChartColumnSpec>.generate(_selectedColumns.length,
>>> (index) =>
>>>          _data.columns.elementAt(_selectedColumns[index]));
>>>    }
>>>
>>> @@ -116,7 +116,7 @@ class AggregationTransformer extends ChangeNotifier
>>>     * logic to include itself, just move the expand check around the
>>> else clause
>>>     * and always write a row of data whether it's expanded or not.
>>>     */
>>> -  _generateAggregatedRow(List aggregatedRows, List dimensionValues) {
>>> +  _generateAggregatedRow(List<Iterable> aggregatedRows, List
>>> dimensionValues) {
>>>      var entity = _model.facts(dimensionValues);
>>>      var dimensionLevel = dimensionValues.length - 1;
>>>      var currentDimValue = dimensionValues.last;
>>> Index: lib/charts/transformers/transpose_transformer.dart
>>> diff --git a/lib/charts/transformers/transpose_transformer.dart
>>> b/lib/charts/transformers/transpose_transformer.dart
>>> index cc3094367ba9450942ae2ae64ef9cb66fa30ed6f..
>>> e3acbcef7f75ee3db3bfdb24bfd685ddee8c30d4 100644
>>> --- a/lib/charts/transformers/transpose_transformer.dart
>>> +++ b/lib/charts/transformers/transpose_transformer.dart
>>> @@ -88,7 +88,7 @@ class TransposeTransformer extends ChangeNotifier
>>>
>>>      columns.clear();
>>>      rows.clear();
>>> -    rows.addAll(new List.generate(_data.columns.length - 1, (i) =>
>>> []));
>>> +    rows.addAll(new List<Iterable>.generate(_data.columns.length - 1,
>>> (i) => []));
>>>
>>>      // Populate the transposed rows' data, excluding the label column,
>>> visit
>>>      // each value in the original data once.
>>> Index: lib/core/core.dart
>>> diff --git a/lib/core/core.dart b/lib/core/core.dart
>>> index e1a344d5f0431ba5bbf0f96b1fa994bb47b0a29f..
>>> 8c1b0e98c67c115765a8ba4b54bb53b7c4ca5315 100644
>>> --- a/lib/core/core.dart
>>> +++ b/lib/core/core.dart
>>> @@ -53,8 +53,8 @@ class Pair<T1, T2> {
>>>
>>>    const Pair(this.first, this.last);
>>>
>>> -  bool operator==(Pair other) =>
>>> -      other != null && first == other.first && last == other.last;
>>> +  bool operator==(other) =>
>>> +      other is Pair && first == other.first && last == other.last;
>>>  }
>>>
>>>  /*
>>> Index: lib/core/lists.dart
>>> diff --git a/lib/core/lists.dart b/lib/core/lists.dart
>>> index 48d5e229252b28c1ba74a997706e7937f66e5f73..
>>> e731df015f3f5e03be3cefdab6577bb291c39623 100644
>>> --- a/lib/core/lists.dart
>>> +++ b/lib/core/lists.dart
>>> @@ -91,7 +91,7 @@ class Range extends IterableBase<num> {
>>>    num elementAt(int index) => _range.elementAt(index);
>>>
>>>    @override
>>> -  Iterator get iterator => _range.iterator;
>>> +  Iterator<num> get iterator => _range.iterator;
>>>
>>>    static int _integerConversionFactor(num val) {
>>>      int k = 1;
>>> Index: lib/core/rect.dart
>>> diff --git a/lib/core/rect.dart b/lib/core/rect.dart
>>> index a7986c4907e23dca2276e1f0ee0f2433bec47220..
>>> 8e1e8e621a75736c8790322b82247cb453afcf91 100644
>>> --- a/lib/core/rect.dart
>>> +++ b/lib/core/rect.dart
>>> @@ -19,8 +19,8 @@ class Rect {
>>>    const Rect.size(this.width, this.height) : x = 0, y = 0;
>>>    const Rect.position(this.x, this.y) : width = 0, height = 0;
>>>
>>> -  bool operator==(Rect other) =>
>>> -      isSameSizeAs(other) && isSamePositionAs(other);
>>> +  bool operator==(other) =>
>>> +      other is Rect && isSameSizeAs(other) && isSamePositionAs(other);
>>>
>>>    bool isSameSizeAs(Rect other) =>
>>>        other != null && width == other.width && height == other.height;
>>> @@ -49,8 +49,8 @@ class EditableRect implements Rect {
>>>    EditableRect.size(this.width, this.height);
>>>    EditableRect.position(this.x, this.y);
>>>
>>> -  bool operator==(Rect other) =>
>>> -      isSameSizeAs(other) && isSamePositionAs(other);
>>> +  bool operator==(other) =>
>>> +      other is Rect && isSameSizeAs(other) && isSamePositionAs(other);
>>>
>>>    bool isSameSizeAs(Rect other) =>
>>>        other != null && width == other.width && height == other.height;
>>> Index: lib/locale/number_format.dart
>>> diff --git a/lib/locale/number_format.dart b/lib/locale/number_format.
>>> dart
>>> index 5b866fcd1ad6e3ceece81dbb7d01a5e79d5778af..
>>> fcdf29dbd3499c3a1c173a2bc0d1198a0f120b16 100644
>>> --- a/lib/locale/number_format.dart
>>> +++ b/lib/locale/number_format.dart
>>> @@ -74,22 +74,19 @@ class NumberFormat {
>>>          symbol = match.group(4) != null ? match.group(4) : '',
>>>          zfill = match.group(5),
>>>          width = match.group(6) != null ? int.parse(match.group(6)) : 0,
>>> -        comma = match.group(7),
>>> -        precision = match.group(8),
>>> +        comma = match.group(7) != null,
>>> +        precision = match.group(8) != null ?
>>> +            int.parse(match.group(8).substring(1)) : null,
>>>          type = match.group(9),
>>>          scale = 1,
>>>          prefix = '',
>>>          suffix = '',
>>>          integer = false;
>>>
>>> -    if (precision != null) {
>>> -      precision = int.parse(precision.substring(1));
>>> -    }
>>> -
>>>      if (zfill != null || fill == '0' && align == '=') {
>>>        zfill = fill = '0';
>>>        align = '=';
>>> -      if (comma != null) {
>>> +      if (comma) {
>>>          width -= ((width - 1) / 4).floor();
>>>        }
>>>      }
>>> @@ -128,7 +125,7 @@ class NumberFormat {
>>>
>>>      NumberFormatFunction formatFunction = _getFormatFunction(type);
>>>
>>> -    var zcomma = (zfill != null) && (comma != null);
>>> +    var zcomma = (zfill != null) && comma;
>>>
>>>      return (value) {
>>>        var fullSuffix = suffix;
>>> @@ -172,7 +169,7 @@ class NumberFormat {
>>>
>>>        // If the fill character is not '0', grouping is applied before
>>>        //padding.
>>> -      if (zfill == null && comma != null) {
>>> +      if (zfill == null && comma) {
>>>          before = formatGroup(before);
>>>        }
>>>
>>> Index: lib/locale/time_scale.dart
>>> diff --git a/lib/locale/time_scale.dart b/lib/locale/time_scale.dart
>>> index a5201fef16cf984a5d9928d6bb57bef114d06ca0..
>>> 02a5ad45958fe3b7d8c33a3d2b63557749059f0e 100644
>>> --- a/lib/locale/time_scale.dart
>>> +++ b/lib/locale/time_scale.dart
>>> @@ -121,8 +121,7 @@ class TimeScale extends LinearScale {
>>>    TimeScale copy() => new TimeScale(domain, range, interpolator, clamp);
>>>
>>>    List niceInterval(var interval, [int skip = 1]) {
>>> -    var extent = scaleExtent(domain);
>>> -    extent = new Extent(extent[0], extent[1]);
>>> +    var extent = _scaleDomainExtent();
>>>
>>>      var method = interval == null ? _tickMethod(extent, 10) :
>>>                   interval is int ? _tickMethod(extent, interval) : null;
>>> @@ -166,9 +165,13 @@ class TimeScale extends LinearScale {
>>>      domain = niceInterval(ticks);
>>>    }
>>>
>>> -  List ticksInterval(var interval, [int skip = 1]) {
>>> +  Extent _scaleDomainExtent() {
>>>      var extent = scaleExtent(domain);
>>> -    extent = new Extent(extent[0], extent[1]);
>>> +    return new Extent(extent[0], extent[1]);
>>> +  }
>>> +
>>> +  List ticksInterval(var interval, [int skip = 1]) {
>>> +    var extent = _scaleDomainExtent();
>>>      var method = interval == null ? _tickMethod(extent, 10) :
>>>          interval is int ? _tickMethod(extent, interval) :
>>>          [interval, skip];
>>> Index: lib/selection/selection_impl.dart
>>> diff --git a/lib/selection/selection_impl.dart
>>> b/lib/selection/selection_impl.dart
>>> index 727efccfefbebfcb17c9c1ff4e11e98f2ce8162e..
>>> 55a8e5a84f59dba95255507e62396f8c0863aeb9 100644
>>> --- a/lib/selection/selection_impl.dart
>>> +++ b/lib/selection/selection_impl.dart
>>> @@ -43,7 +43,7 @@ class _SelectionImpl implements Selection {
>>>            c.querySelectorAll(selector);
>>>      }
>>>
>>> -    var tmpGroups = new List(),
>>> +    var tmpGroups = new List<SelectionGroup>(),
>>>          index = 0;
>>>      if (source != null) {
>>>        scope = source.scope;
>>> @@ -82,7 +82,7 @@ class _SelectionImpl implements Selection {
>>>
>>>      if (source != null) {
>>>        scope = source.scope;
>>> -      groups = new List.generate(source.groups.length, (gi) {
>>> +      groups = new List<SelectionGroup>.generate(source.groups.length,
>>> (gi) {
>>>          SelectionGroup g = source.groups.elementAt(gi);
>>>          return new _SelectionGroupImpl(
>>>              new List.generate(g.elements.length, (ei) {
>>> @@ -100,7 +100,7 @@ class _SelectionImpl implements Selection {
>>>          }), parent: g.parent);
>>>        });
>>>      } else {
>>> -      groups = new List.generate(1,
>>> +      groups = new List<SelectionGroup>.generate(1,
>>>            (_) => new _SelectionGroupImpl(new List.generate(1,
>>>                (_) => fn(null, 0, null), growable: false)), growable:
>>> false);
>>>      }
>>> @@ -115,7 +115,7 @@ class _SelectionImpl implements Selection {
>>>     * be part of the same group, with [SelectionScope.root] as the
>>> group's parent
>>>     */
>>>    _SelectionImpl.elements(Iterable elements, SelectionScope
>>> this.scope) {
>>> -    groups = new List()..add(new _SelectionGroupImpl(elements));
>>> +    groups = new List<SelectionGroup>()..add(new
>>> _SelectionGroupImpl(elements));
>>>    }
>>>
>>>    /**
>>> @@ -227,10 +227,10 @@ class _SelectionImpl implements Selection {
>>>          v == false ? e.classes.remove(name) : e.classes.add(name));
>>>    }
>>>
>>> -  void style(String property, String val, {String priority}) {
>>> +  void style(String property, val, {String priority}) {
>>>      assert(property != null && property.isNotEmpty);
>>>      styleWithCallback(property,
>>> -        toCallback(val), priority: priority);
>>> +        toCallback(val as String), priority: priority);
>>>    }
>>>
>>>    void styleWithCallback(String property,
>>> @@ -538,7 +538,7 @@ class _EnterSelectionImpl implements EnterSelection {
>>>  class _ExitSelectionImpl extends _SelectionImpl implements
>>> ExitSelection {
>>>    final DataSelection update;
>>>    _ExitSelectionImpl(Iterable groups, DataSelection update)
>>> -      :super.selectionGroups(groups, update.scope), update = update;
>>> +      : update = update, super.selectionGroups(groups, update.scope);
>>>  }
>>>
>>>  class _SelectionGroupImpl implements SelectionGroup {
>>> Index: lib/svg/svg_line.dart
>>> diff --git a/lib/svg/svg_line.dart b/lib/svg/svg_line.dart
>>> index 6ba595f701b31df1128dcaa1c4e25655734c4ba0..
>>> d99d6ada266844e7a8ee7b37ae0ddfc8657201db 100644
>>> --- a/lib/svg/svg_line.dart
>>> +++ b/lib/svg/svg_line.dart
>>> @@ -73,10 +73,10 @@ class SvgLine implements SvgPathGenerator {
>>>     * Get Svg path description for the given [data], element index
>>> [index]
>>>     * and element [e] to which the data is associated.
>>>     */
>>> -  String path(List data, int index, Element e) {
>>> +  String path(data, int index, Element e) {
>>>      var segments = [],
>>>          points = [];
>>> -
>>> +    assert(data is List);
>>>      data.asMap().forEach((int i, d) {
>>>        if (defined(d, i, e)) {
>>>          points.add(new math.Point(xAccessor(d, i), yAccessor(d, i)));
>>>
>>>
>>>
>>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b