Java Code Examples for com.github.mikephil.charting.utils.HorizontalViewPortHandler

The following examples show how to use com.github.mikephil.charting.utils.HorizontalViewPortHandler. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: StockChart-MPAndroidChart   Source File: HorizontalBarChart.java    License: MIT License 6 votes vote down vote up
@Override
protected void init() {

    mViewPortHandler = new HorizontalViewPortHandler();

    super.init();

    mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
    mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);

    mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
    setHighlighter(new HorizontalBarHighlighter(this));

    mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
    mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
    mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}
 
Example 2
Source Project: Ticket-Analysis   Source File: HorizontalBarChart.java    License: MIT License 6 votes vote down vote up
@Override
protected void init() {

    mViewPortHandler = new HorizontalViewPortHandler();

    super.init();

    mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
    mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);

    mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
    setHighlighter(new HorizontalBarHighlighter(this));

    mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
    mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
    mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}
 
Example 3
Source Project: android-kline   Source File: HorizontalBarChart.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void init() {

    mViewPortHandler = new HorizontalViewPortHandler();

    super.init();

    mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
    mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);

    mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
    setHighlighter(new HorizontalBarHighlighter(this));

    mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
    mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
    mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}