Skip to content

Commit

Permalink
change pie chart to a donut chart
Browse files Browse the repository at this point in the history
fixes GH-33
  • Loading branch information
tmathura committed Aug 20, 2020
1 parent 96f92e0 commit bd8f0d7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Spacearr.Common/Models/ComputerDriveModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public class ComputerDriveModel
public string TotalUsedSpaceString => DataSize.SizeSuffix(TotalSize - TotalFreeSpace, 2);
public long TotalSize { get; set; }
public string TotalSizeString => DataSize.SizeSuffix(TotalSize, 2);
public PieChart PieChart { get; set; }
public DonutChart Chart { get; set; }
}
}
2 changes: 1 addition & 1 deletion Spacearr.Core.Xamarin/Views/ComputerDriveDetailPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<microcharts:ChartView Grid.Row="0" HeightRequest="200" VerticalOptions="FillAndExpand" Chart="{Binding ComputerDriveModel.PieChart}"/>
<microcharts:ChartView Grid.Row="0" HeightRequest="200" VerticalOptions="FillAndExpand" Chart="{Binding ComputerDriveModel.Chart}"/>
<controls:FloatingLabel Grid.Row="1" LabelTopText="Name" LabelBottomText="{Binding ComputerDriveModel.Name}"/>
<controls:FloatingLabel Grid.Row="2" LabelTopText="Volume Label" LabelBottomText="{Binding ComputerDriveModel.VolumeLabel}"/>
<controls:FloatingLabel Grid.Row="3" LabelTopText="Drive Type" LabelBottomText="{Binding ComputerDriveModel.DriveType}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected override void OnAppearing()
TextColor = SKColor.Parse(textColorPrimary.ToHex())
}
};
_viewModel.ComputerDriveModel.PieChart = new PieChart { Entries = entries, BackgroundColor = SKColor.Parse(colorPrimaryLight.ToHex()) };
_viewModel.ComputerDriveModel.Chart = new DonutChart { Entries = entries, BackgroundColor = SKColor.Parse(colorPrimaryLight.ToHex()) };
}
}
}
2 changes: 1 addition & 1 deletion Spacearr.Core.Xamarin/Views/ComputerDrivesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" FontAttributes="Bold" Text="{Binding Name}" />
<forms:ChartView Grid.Row="1" HeightRequest="200" VerticalOptions="FillAndExpand" Chart="{Binding PieChart}"/>
<forms:ChartView Grid.Row="1" HeightRequest="200" VerticalOptions="FillAndExpand" Chart="{Binding Chart}"/>
</Grid>
</Grid>
</StackLayout>
Expand Down
2 changes: 1 addition & 1 deletion Spacearr.Core.Xamarin/Views/ComputerDrivesPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected override void OnAppearing()
}
};

computerDrive.PieChart = new PieChart { Entries = entries, BackgroundColor = SKColor.Parse(colorPrimaryLight.ToHex()) };
computerDrive.Chart = new DonutChart { Entries = entries, BackgroundColor = SKColor.Parse(colorPrimaryLight.ToHex()) };
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Spacearr.Core.Xamarin/Views/ComputersPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private async void OnItemSelected(object sender, SelectedItemChangedEventArgs ar
TextColor = SKColor.Parse(textColorPrimary.ToHex())
}
};
computerDrive.PieChart = new PieChart { Entries = entries, BackgroundColor = SKColor.Parse(colorPrimaryLight.ToHex()) };
computerDrive.Chart = new DonutChart { Entries = entries, BackgroundColor = SKColor.Parse(colorPrimaryLight.ToHex()) };
}

await Navigation.PushAsync(new ComputerDrivesPage(computerModel));
Expand Down

0 comments on commit bd8f0d7

Please sign in to comment.