Skip to content

Commit

Permalink
Added dialog for example that the feature drawing into the chart by g…
Browse files Browse the repository at this point in the history
…esture is currenlty not available.
  • Loading branch information
PhilJay committed Aug 15, 2014
1 parent 81b883f commit 35faecc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
tvY.setText("" + (mSeekBarY.getProgress()));

ArrayList<String> xVals = new ArrayList<String>();
for (int i = 0; i < mSeekBarX.getProgress(); i++) {
for (int i = 0; i < mSeekBarX.getProgress()+1; i++) {
xVals.add(mMonths[i % 12]);
}

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

for (int i = 0; i < mSeekBarX.getProgress(); i++) {
for (int i = 0; i < mSeekBarX.getProgress()+1; i++) {
float mult = (mSeekBarY.getProgress() + 1);
float val = (float) (Math.random() * mult) + 3;
yVals1.add(new Entry(val, i));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package com.xxmassdeveloper.mpchartexample.notimportant;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
Expand All @@ -22,7 +23,6 @@
import com.xxmassdeveloper.mpchartexample.AnotherBarActivity;
import com.xxmassdeveloper.mpchartexample.BarChartActivity;
import com.xxmassdeveloper.mpchartexample.BarChartActivityMultiDataset;
import com.xxmassdeveloper.mpchartexample.DrawChartActivity;
import com.xxmassdeveloper.mpchartexample.InvertedLineChartActivity;
import com.xxmassdeveloper.mpchartexample.LineChartActivity;
import com.xxmassdeveloper.mpchartexample.ListViewBarChartActivity;
Expand All @@ -48,7 +48,7 @@ protected void onCreate(Bundle savedInstanceState) {

// initialize the utilities
Utils.init(getResources());

ArrayList<ContentItem> objects = new ArrayList<ContentItem>();

objects.add(new ContentItem("Line Chart", "A simple demonstration of the linechart."));
Expand Down Expand Up @@ -126,8 +126,14 @@ public void onItemClick(AdapterView<?> av, View v, int pos, long arg3) {
startActivity(i);
break;
case 8:
i = new Intent(this, DrawChartActivity.class);
startActivity(i);
// i = new Intent(this, DrawChartActivity.class);
// startActivity(i);

AlertDialog.Builder b = new AlertDialog.Builder(this);
b.setTitle("Feature not available");
b.setMessage("Due to recent changes to the data model of the library, this feature is temporarily not available.");
b.setPositiveButton("OK", null);
b.create().show();
break;
case 9:
i = new Intent(this, SimpleChartDemo.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,8 @@ protected void drawMarkers() {

int xIndex = mIndicesToHightlight[i].getXIndex();

drawMarkerView(xIndex, mIndicesToHightlight[i].getDataSetIndex());
if (xIndex < mCurrentData.getXVals().size())
drawMarkerView(xIndex, mIndicesToHightlight[i].getDataSetIndex());
}
}

Expand Down

0 comments on commit 35faecc

Please sign in to comment.