Skip to content

Commit

Permalink
Configuration enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnil1104 committed Jan 16, 2020
1 parent 5df3e83 commit 3702745
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.lang.ref.WeakReference;
import java.text.DecimalFormat;
import java.util.ArrayList;

public class CurveGraphView extends View {

Expand Down Expand Up @@ -155,8 +154,9 @@ private void drawAxis(Canvas canvas) {
}

private void drawInterval(Canvas canvas) {
if (intervalCount == 0) return;
for (int i = 1; i <= intervalCount; i++) {
String msg = String.valueOf(df.format(i * ((float) xSpan / intervalCount)));
String msg = df.format(i * ((float) xSpan / intervalCount));
int xPos = (i * (graphWidth - (graphPadding) * 2)) / (intervalCount + 1);
int yPos = (int) (viewHeight - xAxisScalePaint.getTextSize());

Expand All @@ -165,6 +165,7 @@ private void drawInterval(Canvas canvas) {
}

private void drawGuideline(Canvas canvas) {
if (guidelineCount == 0) return;
for (int i = 1; i <= guidelineCount; i++) {
path.reset();

Expand All @@ -181,9 +182,7 @@ private void drawLineGraph(Canvas canvas) {
float f1, f2, f4;
float scaleFactor = maxVal / (morphedGraphHeight - graphPadding);

for (int graphDataIndex = 0; graphDataIndex < graphDataArray.length; graphDataIndex++) {
GraphData graphData = graphDataArray[graphDataIndex];

for (GraphData graphData : graphDataArray) {
updateStyleForGraphData(graphData);
PointMap pointMap = graphData.getGraphDataPoints();

Expand Down

0 comments on commit 3702745

Please sign in to comment.