Skip to content

Commit

Permalink
Fixed bar chart demo first value being empty
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Oct 18, 2016
1 parent 730e5d3 commit d65ffb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void onStopTrackingTouch(SeekBar seekBar) {

private void setData(int count, float range) {

float start = 0f;
float start = 1f;

ArrayList<BarEntry> yVals1 = new ArrayList<BarEntry>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ private int determineMonth(int dayOfYear) {
return Math.max(month, 0);
}

private int determineDayOfMonth(int dayOfYear, int month) {
private int determineDayOfMonth(int days, int month) {

int count = 0;
int days = 0;
int daysForMonths = 0;

while (count < month) {

int year = determineYear(days);
days += getDaysForMonth(count % 12, year);
int year = determineYear(daysForMonths);
daysForMonths += getDaysForMonth(count % 12, year);
count++;
}

return dayOfYear - days;
return days - daysForMonths;
}

private int determineYear(int days) {
Expand Down

0 comments on commit d65ffb8

Please sign in to comment.