buttons for plot
This commit is contained in:
parent
8070381db4
commit
3562bd6c61
@ -21,7 +21,7 @@ import jscl.math.function.Constant;
|
|||||||
import jscl.text.ParseException;
|
import jscl.text.ParseException;
|
||||||
import org.achartengine.ChartFactory;
|
import org.achartengine.ChartFactory;
|
||||||
import org.achartengine.GraphicalView;
|
import org.achartengine.GraphicalView;
|
||||||
import org.achartengine.chart.LineChart;
|
import org.achartengine.chart.CubicLineChart;
|
||||||
import org.achartengine.chart.PointStyle;
|
import org.achartengine.chart.PointStyle;
|
||||||
import org.achartengine.chart.XYChart;
|
import org.achartengine.chart.XYChart;
|
||||||
import org.achartengine.model.XYMultipleSeriesDataset;
|
import org.achartengine.model.XYMultipleSeriesDataset;
|
||||||
@ -46,6 +46,8 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class CalculatorPlotActivity extends Activity {
|
public class CalculatorPlotActivity extends Activity {
|
||||||
|
|
||||||
|
private static final String TAG = CalculatorPlotActivity.class.getSimpleName();
|
||||||
|
|
||||||
private static final int DEFAULT_NUMBER_OF_STEPS = 100;
|
private static final int DEFAULT_NUMBER_OF_STEPS = 100;
|
||||||
|
|
||||||
private static final int DEFAULT_MIN_NUMBER = -10;
|
private static final int DEFAULT_MIN_NUMBER = -10;
|
||||||
@ -160,6 +162,7 @@ public class CalculatorPlotActivity extends Activity {
|
|||||||
graphicalView.addPanListener(new PanListener() {
|
graphicalView.addPanListener(new PanListener() {
|
||||||
@Override
|
@Override
|
||||||
public void panApplied() {
|
public void panApplied() {
|
||||||
|
Log.d(TAG, "org.achartengine.tools.PanListener.panApplied");
|
||||||
updateDataSets(chart);
|
updateDataSets(chart);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,6 +185,9 @@ public class CalculatorPlotActivity extends Activity {
|
|||||||
synchronized (pendingOperation) {
|
synchronized (pendingOperation) {
|
||||||
//lock all operations with history
|
//lock all operations with history
|
||||||
if (pendingOperation.getObject() == this) {
|
if (pendingOperation.getObject() == this) {
|
||||||
|
|
||||||
|
Log.d(TAG, "org.solovyev.android.calculator.plot.CalculatorPlotActivity.updateDataSets");
|
||||||
|
|
||||||
final XYMultipleSeriesRenderer dr = chart.getRenderer();
|
final XYMultipleSeriesRenderer dr = chart.getRenderer();
|
||||||
|
|
||||||
//Log.d(CalculatorPlotActivity.class.getName(), "x = [" + dr.getXAxisMin() + ", " + dr.getXAxisMax() + "], y = [" + dr.getYAxisMin() + ", " + dr.getYAxisMax() + "]");
|
//Log.d(CalculatorPlotActivity.class.getName(), "x = [" + dr.getXAxisMin() + ", " + dr.getXAxisMax() + "], y = [" + dr.getYAxisMin() + ", " + dr.getYAxisMax() + "]");
|
||||||
@ -259,7 +265,7 @@ public class CalculatorPlotActivity extends Activity {
|
|||||||
renderer.addSeriesRenderer(createImagRenderer());
|
renderer.addSeriesRenderer(createImagRenderer());
|
||||||
}
|
}
|
||||||
|
|
||||||
return new LineChart(data, renderer);
|
return new CubicLineChart(data, renderer, 0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static XYSeriesRenderer createImagRenderer() {
|
private static XYSeriesRenderer createImagRenderer() {
|
||||||
|
Loading…
Reference in New Issue
Block a user