Commit 16f4f836 authored by Adam Barth's avatar Adam Barth

Update playfair after TextPainter rename

parent 03cc05ac
...@@ -44,7 +44,7 @@ class Chart extends LeafRenderObjectWrapper { ...@@ -44,7 +44,7 @@ class Chart extends LeafRenderObjectWrapper {
final ChartData data; final ChartData data;
RenderChart createNode() => new RenderChart(data: data); RenderChart createNode() => new RenderChart(data: data);
RenderChart get root => super.root; RenderChart get renderObject => super.renderObject;
void syncRenderObject(Widget old) { void syncRenderObject(Widget old) {
super.syncRenderObject(old); super.syncRenderObject(old);
...@@ -90,7 +90,7 @@ class RenderChart extends RenderConstrainedBox { ...@@ -90,7 +90,7 @@ class RenderChart extends RenderConstrainedBox {
class Gridline { class Gridline {
double value; double value;
ParagraphPainter labelPainter; TextPainter labelPainter;
Point labelPosition; Point labelPosition;
Point start; Point start;
Point end; Point end;
...@@ -99,12 +99,12 @@ class Gridline { ...@@ -99,12 +99,12 @@ class Gridline {
class Indicator { class Indicator {
Point start; Point start;
Point end; Point end;
ParagraphPainter labelPainter; TextPainter labelPainter;
Point labelPosition; Point labelPosition;
} }
class ChartPainter { class ChartPainter {
ChartPainter(ChartData data) : _data = data; ChartPainter(this._data);
ChartData _data; ChartData _data;
ChartData get data => _data; ChartData get data => _data;
...@@ -157,7 +157,7 @@ class ChartPainter { ...@@ -157,7 +157,7 @@ class ChartPainter {
_textTheme.body1, _textTheme.body1,
[new PlainTextSpan("${gridline.value}")] [new PlainTextSpan("${gridline.value}")]
); );
gridline.labelPainter = new ParagraphPainter(text) gridline.labelPainter = new TextPainter(text)
..maxWidth = _rect.width ..maxWidth = _rect.width
..layout(); ..layout();
_horizontalGridlines.add(gridline); _horizontalGridlines.add(gridline);
...@@ -204,7 +204,7 @@ class ChartPainter { ...@@ -204,7 +204,7 @@ class ChartPainter {
_textTheme.body1, _textTheme.body1,
[new PlainTextSpan("${data.indicatorText}")] [new PlainTextSpan("${data.indicatorText}")]
); );
_indicator.labelPainter = new ParagraphPainter(text) _indicator.labelPainter = new TextPainter(text)
..maxWidth = markerRect.width ..maxWidth = markerRect.width
..layout(); ..layout();
_indicator.labelPosition = new Point( _indicator.labelPosition = new Point(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment