Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
9153e7bb
Commit
9153e7bb
authored
Oct 29, 2015
by
Lex Berezhny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update playfair to match flutter/painting module refactoring
parent
9b46c2d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
playfair.dart
packages/playfair/lib/playfair.dart
+1
-0
base.dart
packages/playfair/lib/src/base.dart
+5
-5
No files found.
packages/playfair/lib/playfair.dart
View file @
9153e7bb
...
...
@@ -9,5 +9,6 @@ import 'dart:math' as math;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/painting.dart'
;
part
'src/base.dart'
;
packages/playfair/lib/src/base.dart
View file @
9153e7bb
...
...
@@ -171,7 +171,7 @@ class ChartPainter {
..
maxWidth
=
_rect
.
width
..
layout
();
_horizontalGridlines
.
add
(
gridline
);
yScaleWidth
=
math
.
max
(
yScaleWidth
,
gridline
.
labelPainter
.
max
Content
Width
);
yScaleWidth
=
math
.
max
(
yScaleWidth
,
gridline
.
labelPainter
.
maxWidth
);
}
yScaleWidth
+=
kScaleMargin
;
...
...
@@ -190,7 +190,7 @@ class ChartPainter {
gridline
.
end
=
_convertPointToRectSpace
(
new
Point
(
data
.
endX
,
gridline
.
value
),
markerRect
);
gridline
.
labelPosition
=
new
Point
(
gridline
.
end
.
x
+
kScaleMargin
,
gridline
.
end
.
y
-
gridline
.
labelPainter
.
height
/
2.0
gridline
.
end
.
y
-
gridline
.
labelPainter
.
size
.
height
/
2.0
);
}
...
...
@@ -218,8 +218,8 @@ class ChartPainter {
..
maxWidth
=
markerRect
.
width
..
layout
();
_indicator
.
labelPosition
=
new
Point
(
((
_indicator
.
start
.
x
+
_indicator
.
end
.
x
)
/
2.0
)
-
_indicator
.
labelPainter
.
max
Content
Width
/
2.0
,
_indicator
.
start
.
y
-
_indicator
.
labelPainter
.
height
-
kIndicatorMargin
((
_indicator
.
start
.
x
+
_indicator
.
end
.
x
)
/
2.0
)
-
_indicator
.
labelPainter
.
maxWidth
/
2.0
,
_indicator
.
start
.
y
-
_indicator
.
labelPainter
.
size
.
height
-
kIndicatorMargin
);
}
}
else
{
...
...
@@ -256,7 +256,7 @@ class ChartPainter {
canvas
.
drawCircle
(
marker
,
kMarkerRadius
,
paint
);
path
.
lineTo
(
marker
.
x
,
marker
.
y
);
}
paint
.
s
etStyle
(
ui
.
PaintingStyle
.
stroke
)
;
paint
.
s
tyle
=
ui
.
PaintingStyle
.
stroke
;
canvas
.
drawPath
(
path
,
paint
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment