Skip to content

Commit a0d39b9

Browse files
committed
Work on highlighting
1 parent 0221ddf commit a0d39b9

File tree

128 files changed

+813
-832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+813
-832
lines changed

MPChartExample/src/com/xxmassdeveloper/mpchartexample/AnotherBarActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected void onCreate(Bundle savedInstanceState) {
5454
// drawn
5555
mChart.setMaxVisibleValueCount(60);
5656

57-
// scaling can now only be done on x- and y-axis separately
57+
// scaling can now only be done on xPx- and yPx-axis separately
5858
mChart.setPinchZoom(false);
5959

6060
mChart.setDrawBarShadow(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected void onCreate(Bundle savedInstanceState) {
7474
// drawn
7575
mChart.setMaxVisibleValueCount(60);
7676

77-
// scaling can now only be done on x- and y-axis separately
77+
// scaling can now only be done on xPx- and yPx-axis separately
7878
mChart.setPinchZoom(false);
7979

8080
mChart.setDrawGridBackground(false);
@@ -282,7 +282,7 @@ public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {
282282
Log.i("bounds", bounds.toString());
283283
Log.i("position", position.toString());
284284

285-
Log.i("x-index",
285+
Log.i("xPx-index",
286286
"low: " + mChart.getLowestVisibleX() + ", high: "
287287
+ mChart.getHighestVisibleX());
288288
}

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartActivityMultiDataset.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected void onCreate(Bundle savedInstanceState) {
6262

6363
// mChart.setDrawBorders(true);
6464

65-
// scaling can now only be done on x- and y-axis separately
65+
// scaling can now only be done on xPx- and yPx-axis separately
6666
mChart.setPinchZoom(false);
6767

6868
mChart.setDrawBarShadow(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartActivitySinus.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ protected void onCreate(Bundle savedInstanceState) {
6363
// drawn
6464
mChart.setMaxVisibleValueCount(60);
6565

66-
// scaling can now only be done on x- and y-axis separately
66+
// scaling can now only be done on xPx- and yPx-axis separately
6767
mChart.setPinchZoom(false);
6868

69-
// draw shadows for each bar that show the maximum value
69+
// draw shadows for each bar that show the maximum yValue
7070
// mChart.setDrawBarShadow(true);
7171

7272
// mChart.setDrawXLabels(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartPositiveNegative.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected void onCreate(Bundle savedInstanceState) {
4747

4848
mChart.setDescription("");
4949

50-
// scaling can now only be done on x- and y-axis separately
50+
// scaling can now only be done on xPx- and yPx-axis separately
5151
mChart.setPinchZoom(false);
5252

5353
mChart.setDrawGridBackground(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/CandleStickChartActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected void onCreate(Bundle savedInstanceState) {
5757
// drawn
5858
mChart.setMaxVisibleValueCount(60);
5959

60-
// scaling can now only be done on x- and y-axis separately
60+
// scaling can now only be done on xPx- and yPx-axis separately
6161
mChart.setPinchZoom(false);
6262

6363
mChart.setDrawGridBackground(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/CubicLineChartActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected void onCreate(Bundle savedInstanceState) {
7373
mChart.setDragEnabled(true);
7474
mChart.setScaleEnabled(true);
7575

76-
// if disabled, scaling can be done on x- and y-axis separately
76+
// if disabled, scaling can be done on xPx- and yPx-axis separately
7777
mChart.setPinchZoom(false);
7878

7979
mChart.setDrawGridBackground(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/DrawChartActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected void onCreate(Bundle savedInstanceState) {
6969
mChart.getLegend().setEnabled(false);
7070

7171
// mChart.setYRange(-40f, 40f, true);
72-
// call this to reset the changed y-range
72+
// call this to reset the changed yPx-range
7373
// mChart.resetYRange(true);
7474
}
7575

MPChartExample/src/com/xxmassdeveloper/mpchartexample/DynamicalAddingActivity.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private void addEntry() {
6262
data.addDataSet(set);
6363
}
6464

65-
// add a new x-value first
65+
// add a new xPx-yValue first
6666
data.addXValue(new XAxisValue(set.getEntryCount(), set.getEntryCount() + ""));
6767

6868
// choose a random dataSet
@@ -111,11 +111,11 @@ private void addDataSet() {
111111

112112
int count = (data.getDataSetCount() + 1);
113113

114-
// create 10 y-vals
114+
// create 10 yPx-vals
115115
ArrayList<Entry> yVals = new ArrayList<Entry>();
116116

117117
if(data.getXValCount() == 0) {
118-
// add 10 x-entries
118+
// add 10 xPx-entries
119119
for (int i = 0; i < 10; i++) {
120120
data.addXValue(new XAxisValue(i, i + ""));
121121
}

MPChartExample/src/com/xxmassdeveloper/mpchartexample/HorizontalBarChartActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ protected void onCreate(Bundle savedInstanceState) {
7272
// drawn
7373
mChart.setMaxVisibleValueCount(60);
7474

75-
// scaling can now only be done on x- and y-axis separately
75+
// scaling can now only be done on xPx- and yPx-axis separately
7676
mChart.setPinchZoom(false);
7777

78-
// draw shadows for each bar that show the maximum value
78+
// draw shadows for each bar that show the maximum yValue
7979
// mChart.setDrawBarShadow(true);
8080

8181
// mChart.setDrawXLabels(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/InvertedLineChartActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected void onCreate(Bundle savedInstanceState) {
6969
mChart.setDragEnabled(true);
7070
mChart.setScaleEnabled(true);
7171

72-
// if disabled, scaling can be done on x- and y-axis separately
72+
// if disabled, scaling can be done on xPx- and yPx-axis separately
7373
mChart.setPinchZoom(true);
7474

7575
// set an alternative background color

MPChartExample/src/com/xxmassdeveloper/mpchartexample/LineChartActivity1.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected void onCreate(Bundle savedInstanceState) {
8484
// mChart.setScaleXEnabled(true);
8585
// mChart.setScaleYEnabled(true);
8686

87-
// if disabled, scaling can be done on x- and y-axis separately
87+
// if disabled, scaling can be done on xPx- and yPx-axis separately
8888
mChart.setPinchZoom(true);
8989

9090
// set an alternative background color
@@ -97,7 +97,7 @@ protected void onCreate(Bundle savedInstanceState) {
9797
// set the marker to the chart
9898
mChart.setMarkerView(mv);
9999

100-
// x-axis limit line
100+
// xPx-axis limit line
101101
LimitLine llXAxis = new LimitLine(10f, "Index 10");
102102
llXAxis.setLineWidth(4f);
103103
llXAxis.enableDashedLine(10f, 10f, 0f);
@@ -106,7 +106,7 @@ protected void onCreate(Bundle savedInstanceState) {
106106

107107
XAxis xAxis = mChart.getXAxis();
108108
//xAxis.setValueFormatter(new MyCustomXAxisValueFormatter());
109-
//xAxis.addLimitLine(llXAxis); // add x-axis limit line
109+
//xAxis.addLimitLine(llXAxis); // add xPx-axis limit line
110110

111111
Typeface tf = Typeface.createFromAsset(getAssets(), "OpenSans-Regular.ttf");
112112

@@ -346,7 +346,7 @@ private void setData(int count, float range) {
346346
float mult = (range + 1);
347347
float val = (float) (Math.random() * mult) + 3;// + (float)
348348
// ((mult *
349-
// 0.1) / 10);x
349+
// 0.1) / 10);xPx
350350
yVals.add(new Entry(i, val));
351351
xVals.add(new XAxisValue(i, i + ""));
352352
}
@@ -400,7 +400,7 @@ private void setData(int count, float range) {
400400

401401
@Override
402402
public void onChartGestureStart(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
403-
Log.i("Gesture", "START, x: " + me.getX() + ", y: " + me.getY());
403+
Log.i("Gesture", "START, xPx: " + me.getX() + ", yPx: " + me.getY());
404404
}
405405

406406
@Override

MPChartExample/src/com/xxmassdeveloper/mpchartexample/LineChartActivity2.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected void onCreate(Bundle savedInstanceState) {
7676
mChart.setDrawGridBackground(false);
7777
mChart.setHighlightPerDragEnabled(true);
7878

79-
// if disabled, scaling can be done on x- and y-axis separately
79+
// if disabled, scaling can be done on xPx- and yPx-axis separately
8080
mChart.setPinchZoom(true);
8181

8282
// set an alternative background color

MPChartExample/src/com/xxmassdeveloper/mpchartexample/LineChartActivityColored.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private void setupChart(LineChart chart, LineData data, int color) {
7474
chart.setDragEnabled(true);
7575
chart.setScaleEnabled(true);
7676

77-
// if disabled, scaling can be done on x- and y-axis separately
77+
// if disabled, scaling can be done on xPx- and yPx-axis separately
7878
chart.setPinchZoom(false);
7979

8080
chart.setBackgroundColor(color);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/LineChartTime.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected void onCreate(Bundle savedInstanceState) {
7373
mChart.setDrawGridBackground(false);
7474
mChart.setHighlightPerDragEnabled(true);
7575

76-
// if disabled, scaling can be done on x- and y-axis separately
76+
// if disabled, scaling can be done on xPx- and yPx-axis separately
7777
mChart.setPinchZoom(true);
7878

7979
// set an alternative background color
@@ -104,7 +104,7 @@ protected void onCreate(Bundle savedInstanceState) {
104104
xAxis.setDrawAxisLine(false);
105105
xAxis.setSpaceBetweenLabels(1);
106106

107-
// custom x-axis min / max
107+
// custom xPx-axis min / max
108108
xAxis.setAxisMinValue(5000);
109109
xAxis.setAxisMaxValue(30000);
110110

MPChartExample/src/com/xxmassdeveloper/mpchartexample/MultiLineChartActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected void onCreate(Bundle savedInstanceState) {
6969
mChart.setDragEnabled(true);
7070
mChart.setScaleEnabled(true);
7171

72-
// if disabled, scaling can be done on x- and y-axis separately
72+
// if disabled, scaling can be done on xPx- and yPx-axis separately
7373
mChart.setPinchZoom(false);
7474

7575
mSeekBarX.setProgress(20);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/PerformanceLineChart.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
5353
mChart.setDragEnabled(true);
5454
mChart.setScaleEnabled(true);
5555

56-
// if disabled, scaling can be done on x- and y-axis separately
56+
// if disabled, scaling can be done on xPx- and yPx-axis separately
5757
mChart.setPinchZoom(false);
5858

5959
mChart.getAxisLeft().setDrawGridLines(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/RealtimeLineChartActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
5353
mChart.setScaleEnabled(true);
5454
mChart.setDrawGridBackground(false);
5555

56-
// if disabled, scaling can be done on x- and y-axis separately
56+
// if disabled, scaling can be done on xPx- and yPx-axis separately
5757
mChart.setPinchZoom(true);
5858

5959
// set an alternative background color
@@ -139,7 +139,7 @@ private void addEntry() {
139139
data.addDataSet(set);
140140
}
141141

142-
// add a new x-value first
142+
// add a new xPx-yValue first
143143
data.addXValue(new XAxisValue(data.getXValCount() ,mMonths[data.getXValCount() % 12] + " "
144144
+ (year + data.getXValCount() / 12)));
145145
data.addEntry(new Entry((float) (Math.random() * 40) + 30f, set.getEntryCount()), 0);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/ScrollViewActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected void onCreate(Bundle savedInstanceState) {
3131

3232
mChart.setDescription("");
3333

34-
// scaling can now only be done on x- and y-axis separately
34+
// scaling can now only be done on xPx- and yPx-axis separately
3535
mChart.setPinchZoom(false);
3636

3737
mChart.setDrawBarShadow(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/StackedBarActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ protected void onCreate(Bundle savedInstanceState) {
6363
// drawn
6464
mChart.setMaxVisibleValueCount(40);
6565

66-
// scaling can now only be done on x- and y-axis separately
66+
// scaling can now only be done on xPx- and yPx-axis separately
6767
mChart.setPinchZoom(false);
6868

6969
mChart.setDrawGridBackground(false);
7070
mChart.setDrawBarShadow(false);
7171

7272
mChart.setDrawValueAboveBar(false);
7373

74-
// change the position of the y-labels
74+
// change the position of the yPx-labels
7575
YAxis leftAxis = mChart.getAxisLeft();
7676
leftAxis.setValueFormatter(new MyYAxisValueFormatter());
7777
leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true)

MPChartExample/src/com/xxmassdeveloper/mpchartexample/StackedBarActivityNegative.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected void onCreate(Bundle savedInstanceState) {
5151
mChart.setDrawGridBackground(false);
5252
mChart.setDescription("");
5353

54-
// scaling can now only be done on x- and y-axis separately
54+
// scaling can now only be done on xPx- and yPx-axis separately
5555
mChart.setPinchZoom(false);
5656

5757
mChart.setDrawBarShadow(false);

MPChartExample/src/com/xxmassdeveloper/mpchartexample/custom/MyCustomXAxisValueFormatter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public MyCustomXAxisValueFormatter() {
1515
@Override
1616
public String getXValue(String original, int index, ViewPortHandler viewPortHandler) {
1717

18-
//Log.i("TRANS", "x: " + viewPortHandler.getTransX() + ", y: " + viewPortHandler.getTransY());
18+
//Log.i("TRANS", "xPx: " + viewPortHandler.getTransX() + ", yPx: " + viewPortHandler.getTransY());
1919

20-
// e.g. adjust the x-axis values depending on scale / zoom level
20+
// e.g. adjust the xPx-axis values depending on scale / zoom level
2121
if (viewPortHandler.getScaleX() > 5)
2222
return "4";
2323
else if (viewPortHandler.getScaleX() > 3)

MPChartExample/src/com/xxmassdeveloper/mpchartexample/custom/MyMarkerView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public int getXOffset(float xpos) {
5050

5151
@Override
5252
public int getYOffset(float ypos) {
53-
// this will cause the marker-view to be above the selected value
53+
// this will cause the marker-view to be above the selected yValue
5454
return -getHeight();
5555
}
5656
}

MPChartExample/src/com/xxmassdeveloper/mpchartexample/custom/StackedBarsMarkerView.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void refreshContent(Entry e, Highlight highlight) {
3737

3838
if(be.getYVals() != null) {
3939

40-
// draw the stack value
40+
// draw the stack yValue
4141
tvContent.setText("" + Utils.formatNumber(be.getYVals()[highlight.getStackIndex()], 0, true));
4242
} else {
4343
tvContent.setText("" + Utils.formatNumber(be.getY(), 0, true));
@@ -56,7 +56,7 @@ public int getXOffset(float xpos) {
5656

5757
@Override
5858
public int getYOffset(float ypos) {
59-
// this will cause the marker-view to be above the selected value
59+
// this will cause the marker-view to be above the selected yValue
6060
return -getHeight();
6161
}
6262
}

MPChartExample/src/com/xxmassdeveloper/mpchartexample/notimportant/MainActivity.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ protected void onCreate(Bundle savedInstanceState) {
6868

6969
objects.add(new ContentItem("Line Chart", "A simple demonstration of the linechart."));
7070
objects.add(new ContentItem("Line Chart (Dual YAxis)",
71-
"Demonstration of the linechart with dual y-axis."));
71+
"Demonstration of the linechart with dual yPx-axis."));
7272
objects.add(new ContentItem("Bar Chart", "A simple demonstration of the bar chart."));
7373
objects.add(new ContentItem("Horizontal Bar Chart",
7474
"A simple demonstration of the horizontal bar chart."));
7575
objects.add(new ContentItem("Combined Chart",
7676
"Demonstrates how to create a combined chart (bar and line in this case)."));
7777
objects.add(new ContentItem("Pie Chart", "A simple demonstration of the pie chart."));
78-
objects.add(new ContentItem("Pie Chart with value lines", "A simple demonstration of the pie chart with polyline notes."));
78+
objects.add(new ContentItem("Pie Chart with yValue lines", "A simple demonstration of the pie chart with polyline notes."));
7979
objects.add(new ContentItem("Scatter Chart", "A simple demonstration of the scatter chart."));
8080
objects.add(new ContentItem("Bubble Chart", "A simple demonstration of the bubble chart."));
8181
objects.add(new ContentItem("Stacked Bar Chart",
@@ -99,7 +99,7 @@ protected void onCreate(Bundle savedInstanceState) {
9999
"Demonstrates the usage of different chart types inside a ListView."));
100100
objects.add(new ContentItem(
101101
"Inverted Line Chart",
102-
"Demonstrates the feature of inverting the y-axis."));
102+
"Demonstrates the feature of inverting the yPx-axis."));
103103
objects.add(new ContentItem(
104104
"Candle Stick Chart",
105105
"Demonstrates usage of the CandleStickChart."));
@@ -114,7 +114,7 @@ protected void onCreate(Bundle savedInstanceState) {
114114
"Shows a LineChart with different background and line color."));
115115
objects.add(new ContentItem(
116116
"Realtime Chart",
117-
"This chart is fed with new data in realtime. It also restrains the view on the x-axis."));
117+
"This chart is fed with new data in realtime. It also restrains the view on the xPx-axis."));
118118
objects.add(new ContentItem(
119119
"Dynamical data adding",
120120
"This Activity demonstrates dynamical adding of Entries and DataSets (real time graph)."));

MPChartExample/src/com/xxmassdeveloper/mpchartexample/realm/RealmBaseActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected void setup(Chart<?> chart) {
5555
mChart.setDragEnabled(true);
5656
mChart.setScaleEnabled(true);
5757

58-
// if disabled, scaling can be done on x- and y-axis separately
58+
// if disabled, scaling can be done on xPx- and yPx-axis separately
5959
mChart.setPinchZoom(false);
6060

6161
YAxis leftAxis = mChart.getAxisLeft();

MPChartExample/src/com/xxmassdeveloper/mpchartexample/realm/RealmDatabaseActivityBar.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private void setData() {
5050
RealmResults<RealmDemoData> result = mRealm.allObjects(RealmDemoData.class);
5151

5252
//RealmBarDataSet<RealmDemoData> set = new RealmBarDataSet<RealmDemoData>(result, "stackValues", "xIndex"); // normal entries
53-
RealmBarDataSet<RealmDemoData> set = new RealmBarDataSet<RealmDemoData>(result, "value", "xIndex"); // stacked entries
53+
RealmBarDataSet<RealmDemoData> set = new RealmBarDataSet<RealmDemoData>(result, "yValue", "xIndex"); // stacked entries
5454
set.setColors(new int[] {ColorTemplate.rgb("#FF5722"), ColorTemplate.rgb("#03A9F4")});
5555
set.setLabel("Realm BarDataSet");
5656

MPChartExample/src/com/xxmassdeveloper/mpchartexample/realm/RealmDatabaseActivityBubble.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private void setData() {
5353

5454
RealmResults<RealmDemoData> result = mRealm.allObjects(RealmDemoData.class);
5555

56-
RealmBubbleDataSet<RealmDemoData> set = new RealmBubbleDataSet<RealmDemoData>(result, "value", "xIndex", "bubbleSize");
56+
RealmBubbleDataSet<RealmDemoData> set = new RealmBubbleDataSet<RealmDemoData>(result, "yValue", "xIndex", "bubbleSize");
5757
set.setLabel("Realm BubbleDataSet");
5858
set.setColors(ColorTemplate.COLORFUL_COLORS, 110);
5959

MPChartExample/src/com/xxmassdeveloper/mpchartexample/realm/RealmDatabaseActivityLine.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private void setData() {
5454

5555
RealmResults<RealmDemoData> result = mRealm.allObjects(RealmDemoData.class);
5656

57-
RealmLineDataSet<RealmDemoData> set = new RealmLineDataSet<RealmDemoData>(result, "value", "xIndex");
57+
RealmLineDataSet<RealmDemoData> set = new RealmLineDataSet<RealmDemoData>(result, "yValue", "xIndex");
5858
set.setDrawCubic(false);
5959
set.setLabel("Realm LineDataSet");
6060
set.setDrawCircleHole(false);

0 commit comments

Comments
 (0)