shrinking charts

This commit is contained in:
andy 2022-03-23 17:47:56 +00:00
parent 3a68d3c892
commit 6cdafc4535
2 changed files with 8 additions and 4 deletions

View File

@ -338,7 +338,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 1130; LastSwiftUpdateCheck = 1130;
LastUpgradeCheck = 1130; LastUpgradeCheck = 1330;
ORGANIZATIONNAME = Sarsoo; ORGANIZATIONNAME = Sarsoo;
TargetAttributes = { TargetAttributes = {
E9EA690623F9A5430012C3E8 = { E9EA690623F9A5430012C3E8 = {
@ -510,6 +510,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -570,6 +571,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;

View File

@ -26,6 +26,8 @@ struct PlaylistView: View {
} }
} }
var chartSize = CGSize(width:140, height:220);
var body: some View { var body: some View {
Form { Form {
Section(header: Text("Stats")){ Section(header: Text("Stats")){
@ -74,13 +76,13 @@ struct PlaylistView: View {
title: "Tracks", title: "Tracks",
legend:"Listening", legend:"Listening",
style: chartStyle, style: chartStyle,
form: ChartForm.medium) form: chartSize)
PieChartView( PieChartView(
data: [Double(self.playlist.lastfm_stat_album_percent), Double(100 - self.playlist.lastfm_stat_album_percent)], data: [Double(self.playlist.lastfm_stat_album_percent), Double(100 - self.playlist.lastfm_stat_album_percent)],
title: "Albums", title: "Albums",
legend:"Listening", legend:"Listening",
style: chartStyle, style: chartStyle,
form: ChartForm.medium) form: chartSize)
Spacer() Spacer()
} }
PieChartView( PieChartView(
@ -88,7 +90,7 @@ struct PlaylistView: View {
title: "Artists", title: "Artists",
legend:"Listening", legend:"Listening",
style: chartStyle, style: chartStyle,
form: ChartForm.medium) form: chartSize)
} }
Section(header: Text("Options")){ Section(header: Text("Options")){