diff --git a/android/gradle.properties b/android/gradle.properties index 357cef39a7f1619a4f0ba1c191a85a0dd10b7266..f0fcf6cdd8fc72bc76b35e7be0dc622b20c03b0f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ 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 diff --git a/fastlane/metadata/android/en-US/changelogs/26.txt b/fastlane/metadata/android/en-US/changelogs/26.txt new file mode 100644 index 0000000000000000000000000000000000000000..a136710528db59282491c8c1cc43c607dc07cf78 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/26.txt @@ -0,0 +1 @@ +Fix/improve charts display. diff --git a/fastlane/metadata/android/fr-FR/changelogs/26.txt b/fastlane/metadata/android/fr-FR/changelogs/26.txt new file mode 100644 index 0000000000000000000000000000000000000000..2219018978e41de26b78b762763b7b586a7fddff --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/26.txt @@ -0,0 +1 @@ +Améliorations visuelles des graphiques. diff --git a/lib/ui/widgets/main_screen/discoveries_chart.dart b/lib/ui/widgets/main_screen/discoveries_chart.dart index 991f7c3e659af8cf6a71432eb6ece1833b9b4e1d..4e5ed7d2bddf8ac374efc4adb2fd7fe4f9612d76 100644 --- a/lib/ui/widgets/main_screen/discoveries_chart.dart +++ b/lib/ui/widgets/main_screen/discoveries_chart.dart @@ -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( diff --git a/lib/ui/widgets/main_screen/timeline_chart_counts.dart b/lib/ui/widgets/main_screen/timeline_chart_counts.dart index c5bf7ebb38df7fa26fae341104c2b79a72eeb813..bdfa0c575b3785bd8e2fe0930ebe927d45532f73 100644 --- a/lib/ui/widgets/main_screen/timeline_chart_counts.dart +++ b/lib/ui/widgets/main_screen/timeline_chart_counts.dart @@ -10,7 +10,6 @@ class ChartTimelineCounts extends CustomBarChart { ChartTimelineCounts({super.key, required this.chartData}); - final double chartHeight = 120.0; final double verticalTicksInterval = 50; @override diff --git a/lib/ui/widgets/main_screen/topartists_chart.dart b/lib/ui/widgets/main_screen/topartists_chart.dart index 776508d2f16f1e5364e61bf70a34035561ce318f..0a6bcd87d72b992e9e0341c8cc995eb96835f788 100644 --- a/lib/ui/widgets/main_screen/topartists_chart.dart +++ b/lib/ui/widgets/main_screen/topartists_chart.dart @@ -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( diff --git a/pubspec.yaml b/pubspec.yaml index 61d36396f230846a63ad5b5f8591955f19db32cd..c6d571c0e88084b66cd5d4a18acc2ea030ef9fb7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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'