youleiy / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Xaxis Label over lapping, #484

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. XYChart Type 
2. X axis has Time Value which is every 5 min data
3.

What is the expected output? What do you see instead?

XLabel has 100 point to display so each label overlap because point is near. 
Need to display label X axis autoscalling so inplace of 100 label display only 
50 etc. To resolve same at present I have put counter and only add each 10 
label in Xaxistextlabel. 

Please provide a source code snippet that we can use to replicate the
issue.

            Flow = new XYSeriesRenderer();
            Flow.setColor(Color.YELLOW);
            myRendere=new XYMultipleSeriesRenderer();
            myRendere.addSeriesRenderer(Flow);
            myRendere.setShowGrid(true);
            myRendere.setZoomButtonsVisible(true);
            myRendere.setPanLimits(new double[]{-10, 20, -10, 40});
            myRendere.setZoomLimits(new double[]{-10, 20, -10, 40});
            myRendere.setLegendTextSize(18);
            myRendere.setFitLegend(true);
            myRendere.setYLabels(18);
            myRendere.setYLabelsAlign(Paint.Align.LEFT);
            myRendere.setXLabelsAlign(Paint.Align.CENTER);
            myRendere.setXLabels(0);
            myRendere.setXTitle("Time");
            myRendere.setYTitle("Liter Per Hour");
            myRendere.setAxisTitleTextSize(16);
            myRendere.setPanEnabled(true);
            myRendere.setLabelsTextSize(18);

            myRendere.setApplyBackgroundColor(true);
            myRendere.setBackgroundColor(Color.BLACK);
            myRendere.setMarginsColor(Color.BLACK);
            myRendere.setXLabelsAngle(-90);
            myRendere.setXLabelsPadding(100);

            FlowS = new XYSeries("Flow");

            mySeries = new XYMultipleSeriesDataset();
            mySeries.addSeries(FlowS);

            for(int i = 0;i<=AF.size()-1;i++)
            {
                Double D1,D2;
                D1 = Double.parseDouble(AF.get(i).toString());
                D2 = Double.parseDouble(ATime.get(i).toString().replace(":","."));
                FlowS.add(D2, D1);
                myRendere.addXTextLabel(D2, ATime.get(i).toString());
            }

What version of the product binary library are you using?

1.1.0

Please provide any additional information below.

Original issue reported on code.google.com by mkpancha...@gmail.com on 2 Jul 2015 at 2:29

Attachments: