Java Code Examples for com.github.mikephil.charting.charts.CombinedChart#setDescription()

The following examples show how to use com.github.mikephil.charting.charts.CombinedChart#setDescription() . 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 File: ReportAdapter.java    From privacy-friendly-pedometer with GNU General Public License v3.0 5 votes vote down vote up
public CombinedChartViewHolder(View itemView) {
    super(itemView);
    mChart = (CombinedChart) itemView.findViewById(R.id.chart);
    mChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
    mChart.getAxisRight().setEnabled(false);
    mChart.setTouchEnabled(false);
    mChart.setDoubleTapToZoomEnabled(false);
    mChart.setPinchZoom(false);
    mChart.setDescription("");
    mChart.setDrawOrder(new CombinedChart.DrawOrder[]{
            CombinedChart.DrawOrder.BAR, CombinedChart.DrawOrder.BUBBLE, CombinedChart.DrawOrder.CANDLE, CombinedChart.DrawOrder.LINE, CombinedChart.DrawOrder.SCATTER
    });
}
 
Example 2
Source File: CombinedChartActivity.java    From Stayfit with Apache License 2.0 5 votes vote down vote up
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_combined);

        mChart = (CombinedChart) findViewById(R.id.chart1);
        mChart.setDescription("");
        mChart.setBackgroundColor(Color.WHITE);
        mChart.setDrawGridBackground(false);
        mChart.setDrawBarShadow(false);
        
        // draw bars behind lines
        mChart.setDrawOrder(new DrawOrder[] {
                DrawOrder.BAR, DrawOrder.BUBBLE, DrawOrder.CANDLE, DrawOrder.LINE, DrawOrder.SCATTER
        });

        YAxis rightAxis = mChart.getAxisRight();
        rightAxis.setDrawGridLines(false);
        rightAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true)

        YAxis leftAxis = mChart.getAxisLeft();
        leftAxis.setDrawGridLines(false);
        leftAxis.setAxisMinValue(0f); // this replaces setStartAtZero(true)

        XAxis xAxis = mChart.getXAxis();
        xAxis.setPosition(XAxisPosition.BOTH_SIDED);

        CombinedData data = new CombinedData(mMonths);

        data.setData(generateLineData());
        data.setData(generateBarData());
//        data.setData(generateBubbleData());
//         data.setData(generateScatterData());
//         data.setData(generateCandleData());

        mChart.setData(data);
        mChart.invalidate();
    }
 
Example 3
Source File: ReportAdapter.java    From privacy-friendly-interval-timer with GNU General Public License v3.0 5 votes vote down vote up
public CombinedChartViewHolder(View itemView) {
    super(itemView);
    mChart = (CombinedChart) itemView.findViewById(R.id.chart);
    mChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
    mChart.getAxisRight().setEnabled(false);
    mChart.setTouchEnabled(false);
    mChart.setDoubleTapToZoomEnabled(false);
    mChart.setPinchZoom(false);
    mChart.setDescription("");
    mChart.setDrawOrder(new CombinedChart.DrawOrder[]{
            CombinedChart.DrawOrder.BAR, CombinedChart.DrawOrder.BUBBLE, CombinedChart.DrawOrder.CANDLE, CombinedChart.DrawOrder.LINE, CombinedChart.DrawOrder.SCATTER
    });
}