Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BarChartView extends ChartView {
- public BarChartView(Context context) {
- this(context, null, 0);
- }
- public BarChartView(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
- public BarChartView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- }
- @Override
- public void setGridLinesHorizontal(int count) {
- throw new UnsupportedOperationException();
- }
- @Override
- protected void onDraw(Canvas canvas) {
- int maxItems = 0;
- for (AbstractSeries series : mSeries) {
- if (series.getPoints().size() > maxItems) {
- maxItems = series.getPoints().size();
- }
- }
- mGridLinesHorizontal = maxItems - 2;
- if (mBottomLabelAdapter!=null) {
- setBottomLabelAdapter(mBottomLabelAdapter);
- }
- super.onDraw(canvas);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement