Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • android/org.benoitharrault.scrobbles
1 result
Show changes
Commits on Source (2)
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.0.25
app.versionCode=25
app.versionName=0.0.26
app.versionCode=26
Fix/improve charts display.
Améliorations visuelles des graphiques.
......@@ -11,9 +11,6 @@ class ChartDiscoveries extends CustomBarChart {
ChartDiscoveries({super.key, required this.chartData});
final double chartHeight = 120.0;
final double verticalTicksInterval = 10;
@override
Widget build(BuildContext context) {
return Container(
......
......@@ -10,7 +10,6 @@ class ChartTimelineCounts extends CustomBarChart {
ChartTimelineCounts({super.key, required this.chartData});
final double chartHeight = 120.0;
final double verticalTicksInterval = 50;
@override
......
......@@ -22,7 +22,7 @@ class ChartTopArtists extends StatelessWidget {
child: PieChart(
PieChartData(
sections: getPieChartData(),
sectionsSpace: 1,
sectionsSpace: 2,
centerSpaceRadius: 40,
startDegreeOffset: -45,
pieTouchData: PieTouchData(enabled: false),
......@@ -53,7 +53,7 @@ class ChartTopArtists extends StatelessWidget {
0xffed6f,
];
return Color(hexValues[index] + 0xff000000);
return Color(hexValues[index % hexValues.length] + 0xff000000);
}
List<PieChartSectionData> getPieChartData() {
......@@ -66,17 +66,25 @@ class ChartTopArtists extends StatelessWidget {
int index = 0;
this.chartData.topArtists.forEach((element) {
items.add(PieChartSectionData(
Color baseColor = getColorIndex(index++);
final PieChartSectionData item = PieChartSectionData(
value: element.count.toDouble(),
title: element.artistName,
color: getColorIndex(index++).darken(20),
color: baseColor.darken(20),
borderSide: BorderSide(
color: baseColor.darken(40),
width: 1,
),
radius: radius,
titleStyle: TextStyle(
fontSize: fontSize,
color: AppColors.mainTextColor1,
shadows: shadows,
),
));
);
items.add(item);
});
return items;
......@@ -89,14 +97,20 @@ class ChartTopArtists extends StatelessWidget {
int index = 0;
this.chartData.topArtists.forEach((element) {
items.add(Row(
Color baseColor = getColorIndex(index++);
final Widget item = Row(
children: <Widget>[
Container(
width: itemSize,
height: itemSize,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: getColorIndex(index++).darken(20),
color: baseColor.darken(20),
border: Border.all(
color: baseColor.darken(40),
width: 1,
),
),
),
const SizedBox(
......@@ -110,7 +124,9 @@ class ChartTopArtists extends StatelessWidget {
),
)
],
));
);
items.add(item);
});
return Column(
......
......@@ -3,7 +3,7 @@ description: Display scrobbles data and charts
publish_to: 'none'
version: 0.0.25+25
version: 0.0.26+26
environment:
sdk: '^3.0.0'
......