<commit_before>// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

part of playfair;

class ChartData {
  const ChartData({ this.startX, this.endX, this.startY, this.endY, this.dataSet });
  final double startX;
  final double endX;
  final double startY;
  final double endY;
  final List<Point> dataSet;
}

class Chart extends LeafRenderObjectWrapper {
  Chart({ Key key, this.data }) : super(key: key);

  final ChartData data;

  RenderChart createNode() => new RenderChart(data: data);
  RenderChart get root => super.root;

  void syncRenderObject(Widget old) {
    super.syncRenderObject(old);
    root.textTheme = Theme.of(this).text;
    root.data = data;
  }
}

class RenderChart extends RenderConstrainedBox {

  RenderChart({
    ChartData data
  }) : _painter = new ChartPainter(data),
       super(child: null, additionalConstraints: BoxConstraints.expand);

  final ChartPainter _painter;

  ChartData get data => _painter.data;
  void set data(ChartData value) {
    assert(value != null);
    if (value == _painter.data)
      return;
    _painter.data = value;
    markNeedsPaint();
  }

  TextTheme get textTheme => _painter.textTheme;
  void set textTheme(TextTheme value) {
    assert(value != null);
    if (value == _painter.textTheme)
      return;
    _painter.textTheme = value;
    markNeedsPaint();
  }<commit_msg>Update Chart to use new LeafRenderObjectWrapper API<commit_after>// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

part of playfair;

class ChartData {
  const ChartData({ this.startX, this.endX, this.startY, this.endY, this.dataSet });
  final double startX;
  final double endX;
  final double startY;
  final double endY;
  final List<Point> dataSet;
}

class Chart extends LeafRenderObjectWrapper {
  Chart({ Key key, this.data }) : super(key: key);

  final ChartData data;

  RenderChart createNode() => new RenderChart(data: data);
  RenderChart get root => super.root;

  void syncRenderObject(Widget old) {
    super.syncRenderObject(old);
    renderObject.textTheme = Theme.of(this).text;
    renderObject.data = data;
  }
}

class RenderChart extends RenderConstrainedBox {

  RenderChart({
    ChartData data
  }) : _painter = new ChartPainter(data),
       super(child: null, additionalConstraints: BoxConstraints.expand);

  final ChartPainter _painter;

  ChartData get data => _painter.data;
  void set data(ChartData value) {
    assert(value != null);
    if (value == _painter.data)
      return;
    _painter.data = value;
    markNeedsPaint();
  }

  TextTheme get textTheme => _painter.textTheme;
  void set textTheme(TextTheme value) {
    assert(value != null);
    if (value == _painter.textTheme)
      return;
    _painter.textTheme = value;
    markNeedsPaint();
  }
{'fraction_non_alphanumeric': 0.100472016183412, 'fraction_numerical': 0.0026972353337828725, 'mean_word_length': 3.6577708006279437, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3611323', 'n_tokens_mistral': 951, 'n_tokens_neox': 906, 'n_words': 278}