jjoe64 / GraphView

Android Graph Library for creating zoomable and scrollable line and bar graphs.
https://github.com/jjoe64/GraphView/wiki
Other
2.75k stars 811 forks source link

Xaxis date overlapped #674

Closed xiaolei1998 closed 3 years ago

xiaolei1998 commented 3 years ago

hello!

I am using the date plot and trying to display the date on x axis, but the date is overlapped, I don't know how to modify this.

    LineGraphSeries<DataPoint> series = new LineGraphSeries<>(arrayDataPoints);
    series.setDrawDataPoints(true);

    plot.addSeries(series);

    plot.getGridLabelRenderer().setLabelFormatter(new DateAsXAxisLabelFormatter(DisplayExpTimePlot.this));
    plot.getGridLabelRenderer().setNumHorizontalLabels(plotValue.size()-1);

    plot.getViewport().setXAxisBoundsManual(true);
    plot.getGridLabelRenderer().setHumanRounding(false);

    GridLabelRenderer glr = plot.getGridLabelRenderer();
    glr.setPadding(52);

looking forward for your reply.