Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
838
2022-11-29 19:16:11 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2023-01-15 10:23:37 -0400
Commit
fe9fff9ac53356f1c8926641ad2ac9aad302c302
fe9fff9a
1 parent
63f86438
Add options to customise border in Dataset widget
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
10 deletions
pdf/CHANGELOG.md
pdf/lib/src/widgets/chart/bar_chart.dart
pdf/lib/src/widgets/chart/chart.dart
pdf/lib/src/widgets/chart/pie_chart.dart
pdf/lib/src/widgets/chart/point_chart.dart
pdf/CHANGELOG.md
View file @
fe9fff9
...
...
@@ -8,6 +8,7 @@
-
Fix unit tests
-
Update Image dependency
-
Fix lints
-
Add options to customise border in Dataset widget
[
838
]
## 3.8.4
...
...
pdf/lib/src/widgets/chart/bar_chart.dart
View file @
fe9fff9
...
...
@@ -27,8 +27,8 @@ class BarDataSet<T extends PointChartValue> extends PointDataSet<T> {
BarDataSet
({
required
List
<
T
>
data
,
String
?
legend
,
this
.
borderColor
,
this
.
borderWidth
=
1.5
,
PdfColor
?
borderColor
,
double
borderWidth
=
1.5
,
PdfColor
color
=
PdfColors
.
blue
,
bool
?
drawBorder
,
this
.
drawSurface
=
true
,
...
...
@@ -54,11 +54,11 @@ class BarDataSet<T extends PointChartValue> extends PointDataSet<T> {
pointSize:
pointSize
,
shape:
shape
,
valuePosition:
valuePosition
,
borderColor:
borderColor
,
borderWidth:
borderWidth
,
);
final
bool
drawBorder
;
final
PdfColor
?
borderColor
;
final
double
borderWidth
;
final
bool
drawSurface
;
...
...
pdf/lib/src/widgets/chart/chart.dart
View file @
fe9fff9
...
...
@@ -152,12 +152,18 @@ abstract class Dataset extends Widget {
Dataset
({
this
.
legend
,
this
.
color
,
this
.
borderColor
,
this
.
borderWidth
=
.
5
,
});
final
String
?
legend
;
final
PdfColor
?
color
;
final
PdfColor
?
borderColor
;
final
double
borderWidth
;
void
paintBackground
(
Context
context
)
{}
void
paintForeground
(
Context
context
)
{}
...
...
@@ -167,8 +173,8 @@ abstract class Dataset extends Widget {
decoration:
BoxDecoration
(
color:
color
,
border:
Border
.
all
(
color:
PdfColors
.
black
,
width:
.
5
,
color:
borderColor
??
PdfColors
.
black
,
width:
borderWidth
,
),
),
);
...
...
pdf/lib/src/widgets/chart/pie_chart.dart
View file @
fe9fff9
...
...
@@ -118,8 +118,8 @@ class PieDataSet extends Dataset {
required
this
.
value
,
String
?
legend
,
required
PdfColor
color
,
this
.
borderColor
=
PdfColors
.
white
,
this
.
borderWidth
=
1.5
,
PdfColor
?
borderColor
=
PdfColors
.
white
,
double
borderWidth
=
1.5
,
bool
?
drawBorder
,
this
.
drawSurface
=
true
,
this
.
surfaceOpacity
=
1
,
...
...
@@ -142,6 +142,8 @@ class PieDataSet extends Dataset {
super
(
legend:
legend
,
color:
color
,
borderColor:
borderColor
,
borderWidth:
borderWidth
,
);
final
num
value
;
...
...
@@ -151,8 +153,6 @@ class PieDataSet extends Dataset {
late
double
angleEnd
;
final
bool
drawBorder
;
final
PdfColor
?
borderColor
;
final
double
borderWidth
;
final
bool
drawSurface
;
...
...
pdf/lib/src/widgets/chart/point_chart.dart
View file @
fe9fff9
...
...
@@ -37,6 +37,8 @@ class PointDataSet<T extends PointChartValue> extends Dataset {
String
?
legend
,
this
.
pointSize
=
3
,
PdfColor
color
=
PdfColors
.
blue
,
PdfColor
?
borderColor
,
double
borderWidth
=
1.5
,
this
.
drawPoints
=
true
,
this
.
shape
,
this
.
buildValue
,
...
...
@@ -44,6 +46,8 @@ class PointDataSet<T extends PointChartValue> extends Dataset {
})
:
super
(
legend:
legend
,
color:
color
,
borderColor:
borderColor
,
borderWidth:
borderWidth
,
);
final
List
<
T
>
data
;
...
...
Please
register
or
login
to post a comment