This question is locked. New answers and comments are not allowed.
Hello,
I have a question is it possible to "shrink" the chart? I want to use the trackball behavior and tool tip, but the tooltip overdraws the chart in some areas.
the best solution I did come up with is the following:
mChartView.setOnLongClickListener(
new
View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
RadCartesianChartView chartView = (RadCartesianChartView) view;
LinearAxis axis = (LinearAxis) chartView.getVerticalAxis();
if
(axis !=
null
) {
double range = (axis.getMaximum() - axis.getMinimum()) * 1.12;
axis.setMaximum(axis.getMinimum() + range);
chartView.setVerticalAxis(axis);
}
return
false
;
}
});
mChartView.setOnTouchListener(
new
View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
// We're only interested in when the button is released.
if
(motionEvent.getAction() == MotionEvent.ACTION_UP) {
RadCartesianChartView chartView = (RadCartesianChartView) view;
LinearAxis axis = (LinearAxis) chartView.getVerticalAxis();
axis.setMaximum(mFinanceApiTask.getHigh());
chartView.setVerticalAxis(axis);
}
return
false
;
}
});
This makes a bit of space for the tooltip on top by increasing the vertical axis. Is there a better solution?