如何根据要求在mpandroid2.0.9图表的网格线之间留出空间

时间:2019-03-26 09:17:37

标签: android mpandroidchart

我是此社区的Android stidio snd的新手。我正在构建一个ecg应用程序。因此,我想在两条小网格线之间设置1mm的间距,并突出显示5mm之间的网格线。怎么做??? ..

对此将提供任何帮助,我们将不胜感激。这是我的类人代码。

 XAxis x1 =  @mChart.getXAxis();
        x1.setTextColor(Color.MAGENTA);
        //x1.setAxisMaxValue(200f);
        x1.setDrawGridLines(true);
        //x1.setTypeface(Typeface.SANS_SERIF);
       // x1.setTextSize(14);
        x1.setEnabled(true);
       // x1.setPosition(XAxis.XAxisPosition.BOTTOM_INSIDE);





        //    xAxis.setGranularity(1f); // only intervals of 1 day
        //    xAxis.setTypeface(mTfLight);
        //    xAxis.setTextSize(8);
        //    xAxis.setTextColor(ContextCompat.getColor(this, R.color.colorYellow));
        //    xAxis.setValueFormatter(new GraphXAxisValueFormatter(range, interval, slot));

        // if set to true, the chart will avoid that the first and last label entry
        //     * in the chart "clip" off the edge of the chart
        x1.setAvoidFirstLastClipping(true);

        YAxis y1 = mChart.getAxisLeft();
        y1.setTextColor(Color.MAGENTA);
        y1.setAxisMaxValue(200f);
        y1.setDrawGridLines(true);
        y1.setEnabled(false);


        YAxis y12 = mChart.getAxisRight();
        y12.setEnabled(false);

0 个答案:

没有答案